示例#1
0
    def copy(self, extra=None):
        """
        Creates a copy of this instance with a randomly generated uid
        and some extra params. This copies creates a deep copy of
        the embedded paramMap, and copies the embedded and extra parameters over.

        .. versionadded:: 2.0.0

        Parameters
        ----------
        extra : dict, optional
            Extra parameters to copy to the new instance

        Returns
        -------
        :py:class:`TrainValidationSplit`
            Copy of this instance
        """
        if extra is None:
            extra = dict()
        newTVS = Params.copy(self, extra)
        if self.isSet(self.estimator):
            newTVS.setEstimator(self.getEstimator().copy(extra))
        # estimatorParamMaps remain the same
        if self.isSet(self.evaluator):
            newTVS.setEvaluator(self.getEvaluator().copy(extra))
        return newTVS
示例#2
0
文件: tuning.py 项目: 308306362/spark
 def copy(self, extra={}):
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#3
0
 def copy(self, extra={}):
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#4
0
 def copy(self, extra=None):
     if extra is None:
         extra = dict()
     newEstimator = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newEstimator.setEstimator(self.getEstimator().copy(extra))
     if self.isSet(self.evaluator):
         newEstimator.setEvaluator(self.getEvaluator().copy(extra))
     return newEstimator
示例#5
0
文件: tuning.py 项目: EntilZha/spark
 def copy(self, extra=None):
     if extra is None:
         extra = dict()
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#6
0
 def copy(self, extra=None):
     if extra is None:
         extra = dict()
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#7
0
    def copy(self, extra=None):
        """
        Creates a copy of this instance.

        :param extra: extra parameters
        :returns: new instance
        """
        if extra is None:
            extra = dict()
        that = Params.copy(self, extra)
        stages = [stage.copy(extra) for stage in that.getStages()]
        return that.setStages(stages)
示例#8
0
    def copy(self, extra=None):
        """
        Creates a copy of this instance.

        :param extra: extra parameters
        :returns: new instance
        """
        if extra is None:
            extra = dict()
        that = Params.copy(self, extra)
        stages = [stage.copy(extra) for stage in that.getStages()]
        return that.setStages(stages)
示例#9
0
 def copy(self, extra=None):
     """
     Creates a copy of this instance with a randomly generated uid
     and some extra params. This copies creates a deep copy of
     the embedded paramMap, and copies the embedded and extra parameters over.
     :param extra: Extra parameters to copy to the new instance
     :return: Copy of this instance
     """
     if extra is None:
         extra = dict()
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#10
0
文件: tuning.py 项目: ksakellis/spark
 def copy(self, extra=None):
     """
     Creates a copy of this instance with a randomly generated uid
     and some extra params. This copies creates a deep copy of
     the embedded paramMap, and copies the embedded and extra parameters over.
     :param extra: Extra parameters to copy to the new instance
     :return: Copy of this instance
     """
     if extra is None:
         extra = dict()
     newCV = Params.copy(self, extra)
     if self.isSet(self.estimator):
         newCV.setEstimator(self.getEstimator().copy(extra))
     # estimatorParamMaps remain the same
     if self.isSet(self.evaluator):
         newCV.setEvaluator(self.getEvaluator().copy(extra))
     return newCV
示例#11
0
    def copy(self, extra=None):
        """
        Creates a copy of this instance.

        .. versionadded:: 1.4.0

        Parameters
        ----------
        extra : dict, optional
            extra parameters

        Returns
        -------
        :py:class:`Pipeline`
            new instance
        """
        if extra is None:
            extra = dict()
        that = Params.copy(self, extra)
        stages = [stage.copy(extra) for stage in that.getStages()]
        return that.setStages(stages)
示例#12
0
 def copy(self, extra={}):
     that = Params.copy(self, extra)
     stages = [stage.copy(extra) for stage in that.getStages()]
     return that.setStages(stages)
示例#13
0
 def copy(self, extra=None):
     if extra is None:
         extra = dict()
     that = Params.copy(self, extra)
     stages = [stage.copy(extra) for stage in that.getStages()]
     return that.setStages(stages)
示例#14
0
 def copy(self, extra=None):
     if extra is None:
         extra = dict()
     that = Params.copy(self, extra)
     stages = [stage.copy(extra) for stage in that.getStages()]
     return that.setStages(stages)
示例#15
0
 def copy(self, extra={}):
     that = Params.copy(self, extra)
     stages = [stage.copy(extra) for stage in that.getStages()]
     return that.setStages(stages)