Skip to content
Snippets Groups Projects
Commit 749cf91b authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Modified base stumps

parent f9bd449b
No related branches found
No related tags found
No related merge requests found
......@@ -143,13 +143,13 @@ class AdaBoostGP(BaseEstimator, ClassifierMixin, BaseBoost):
class AdaboostGraalpy(AdaBoostGP, BaseMonoviewClassifier):
def __init__(self, random_state=None, n_iterations=200, n_stumps=10, **kwargs):
def __init__(self, random_state=None, n_iterations=200, n_stumps=1, **kwargs):
super(AdaboostGraalpy, self).__init__(
n_iterations=n_iterations,
n_stumps=n_stumps
)
self.param_names = []
self.distribs = []
self.param_names = ["n_iterations",]
self.distribs = [CustomRandint(low=1, high=500)]
self.classed_params = []
self.weird_strings = {}
self.n_stumps = n_stumps
......
......@@ -17,7 +17,7 @@ __status__ = "Prototype" # Production, Development, Prototype
class AdaboostPregen(AdaBoostClassifier, BaseBoost, BaseMonoviewClassifier):
def __init__(self, random_state=None, n_estimators=50,
base_estimator=None, n_stumps=10, self_complemeted=True , **kwargs):
base_estimator=None, n_stumps=1, self_complemeted=True , **kwargs):
super(AdaboostPregen, self).__init__(
random_state=random_state,
n_estimators=n_estimators,
......
......@@ -5,7 +5,7 @@ from ..Monoview.Additions.QarBoostUtils import ColumnGenerationClassifierQar
class CGDesc(ColumnGenerationClassifierQar, BaseMonoviewClassifier):
def __init__(self, random_state=None, n_max_iterations=500, n_stumps_per_attribute=10, **kwargs):
def __init__(self, random_state=None, n_max_iterations=500, n_stumps_per_attribute=1, **kwargs):
super(CGDesc, self).__init__(n_max_iterations=n_max_iterations,
random_state=random_state,
self_complemented=True,
......
......@@ -7,7 +7,7 @@ import os
class CQBoost(ColumnGenerationClassifier, BaseMonoviewClassifier):
def __init__(self, random_state=None, mu=0.01, epsilon=1e-06, n_stumps=10, **kwargs):
def __init__(self, random_state=None, mu=0.01, epsilon=1e-06, n_stumps=1, **kwargs):
super(CQBoost, self).__init__(
random_state=random_state,
mu=mu,
......
......@@ -240,7 +240,9 @@ class RegularizedBinaryMinCqClassifier(MinCqClassifier):
n_examples, n_voters = np.shape(classification_matrix)
if self.zeta == 0:
ftf = classification_matrix.T.dot(classification_matrix)
print(classification_matrix.shape)
np.transpose(classification_matrix)
ftf = np.dot(np.transpose(classification_matrix),classification_matrix)
else:
I = np.eye(n_examples)
L = build_laplacian(X, n_neighbors=self.n_neighbors)
......@@ -324,11 +326,11 @@ def build_laplacian(X, n_neighbors=None):
class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier):
def __init__(self, random_state=None, mu=0.01, self_complemented=True, n_stumps_per_attribute=10 , **kwargs):
def __init__(self, random_state=None, mu=0.01, self_complemented=True, n_stumps_per_attribute=1, **kwargs):
super(MinCQGraalpy, self).__init__(mu=mu,
estimators_generator=StumpsClassifiersGenerator(n_stumps_per_attribute=n_stumps_per_attribute, self_complemented=self_complemented),
)
self.param_names = ["mu"]
self.param_names = ["mu",]
self.distribs = [CustomUniform(loc=0.5, state=2.0, multiplier="e-"),
]
self.n_stumps_per_attribute = n_stumps_per_attribute
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment