(self, one_vs_rest_result)
Load OneVsRest model
Load OneVsRest model
Load OneVsRest model
def load_model(self, one_vs_rest_result):
        """
        Load OneVsRest model
        """
        completed_models = one_vs_rest_result.completed_models
        one_vs_rest_classes = one_vs_rest_result.one_vs_rest_classes
        self.classes = [int(x) for x in one_vs_rest_classes]  # Support other label type in the future
        self.models = []
        for classifier_obj in list(completed_models):
            classifier = copy.deepcopy(self.classifier)
            classifier.load_single_model(classifier_obj)
            classifier.need_one_vs_rest = False
            self.models.append(classifier)
def load_model ( self , one_vs_rest_result ) : completed_models = one_vs_rest_result . completed_models one_vs_rest_classes = one_vs_rest_result . one_vs_rest_classes self . classes = [ int ( x ) for x in one_vs_rest_classes ] # Support other label type in the future self . models = [ ] for classifier_obj in list ( completed_models ) : classifier = copy . deepcopy ( self . classifier ) classifier . load_single_model ( classifier_obj ) classifier . need_one_vs_rest = False self . models . append ( classifier )