Example #1
0
    def to_super(self):
        if self.kernel == "linear":
            superinstance = SVC(kernel="linear")
            # superinstance.coef_ = self.coef_
        else:
            superinstance = SVC()

        superinstance.C = self.C
        superinstance._dual_coef_ = self._dual_coef_
        superinstance._gamma = self._gamma
        superinstance._impl = self._impl
        superinstance._intercept_ = self._intercept_
        superinstance._sparse = self._sparse
        superinstance.cache_size = self.cache_size
        superinstance.class_weight = self.class_weight
        superinstance.class_weight_ = self.class_weight_
        superinstance.classes_ = self.classes_
        superinstance.coef0 = self.coef0
        superinstance.decision_function_shape = self.decision_function_shape
        superinstance.degree = self.degree
        superinstance.dual_coef_ = self.dual_coef_
        superinstance.epsilon = self.epsilon
        superinstance.fit_status_ = self.fit_status_
        superinstance.gamma = self.gamma
        superinstance.intercept_ = self.intercept_
        superinstance.kernel = self.kernel
        superinstance.max_iter = self.max_iter
        superinstance.n_support_ = self.n_support_
        superinstance.nu = self.nu
        superinstance.probA_ = self.probA_
        superinstance.probB_ = self.probB_
        superinstance.probability = self.probability
        superinstance.random_state = self.random_state
        superinstance.shape_fit_ = self.shape_fit_
        superinstance.shrinking = self.shrinking
        superinstance.support_ = self.support_
        superinstance.support_vectors_ = self.support_vectors_
        superinstance.tol = self.tol
        superinstance.verbose = self.verbose
        return superinstance