Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reverting merge and adding change that would fix merge conflict (maki…
…ng OneVsRest and OneVsRest model JavaMLReadable and JavaMLWritable)
  • Loading branch information
ajaysaini725 committed Jul 19, 2017
commit 30ac62d476e72fd2f70ef2f4a74a735ea5d98509
38 changes: 3 additions & 35 deletions python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ def weights(self):
return self._call_java("weights")


class OneVsRestParams(HasFeaturesCol, HasLabelCol, HasParallelism, HasPredictionCol):
class OneVsRestParams(HasFeaturesCol, HasLabelCol, HasPredictionCol):
"""
Parameters for OneVsRest and OneVsRestModel.
"""
Expand All @@ -1469,7 +1469,7 @@ def getClassifier(self):


@inherit_doc
class OneVsRest(Estimator, OneVsRestParams, MLReadable, MLWritable):
class OneVsRest(Estimator, OneVsRestParams, HasParallelism, JavaMLReadable, JavaMLWritable):
"""
.. note:: Experimental

Expand Down Expand Up @@ -1590,22 +1590,6 @@ def copy(self, extra=None):
newOvr.setClassifier(self.getClassifier().copy(extra))
return newOvr

@since("2.0.0")
def write(self):
"""Returns an MLWriter instance for this ML instance."""
return JavaMLWriter(self)

@since("2.0.0")
def save(self, path):
"""Save this ML instance to the given path, a shortcut of `write().save(path)`."""
self.write().save(path)

@classmethod
@since("2.0.0")
def read(cls):
"""Returns an MLReader instance for this class."""
return JavaMLReader(cls)

@classmethod
def _from_java(cls, java_stage):
"""
Expand Down Expand Up @@ -1638,7 +1622,7 @@ def _to_java(self):
return _java_obj


class OneVsRestModel(Model, OneVsRestParams, MLReadable, MLWritable):
class OneVsRestModel(Model, OneVsRestParams, JavaMLReadable, JavaMLWritable):
"""
.. note:: Experimental

Expand Down Expand Up @@ -1718,22 +1702,6 @@ def copy(self, extra=None):
newModel.models = [model.copy(extra) for model in self.models]
return newModel

@since("2.0.0")
def write(self):
"""Returns an MLWriter instance for this ML instance."""
return JavaMLWriter(self)

@since("2.0.0")
def save(self, path):
"""Save this ML instance to the given path, a shortcut of `write().save(path)`."""
self.write().save(path)

@classmethod
@since("2.0.0")
def read(cls):
"""Returns an MLReader instance for this class."""
return JavaMLReader(cls)

@classmethod
def _from_java(cls, java_stage):
"""
Expand Down