diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py index a55d54ae7f8acf59acf4171c37a8ac9489743671..90e196aba1fe9b8fb6aa0fbd131ad6f713fd4bd6 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py @@ -8,7 +8,31 @@ from ..monoview.monoview_utils import BaseMonoviewClassifier, CustomUniform classifier_class_name = "MinCQGraalpy" class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state + mu + self_complemented + n_stumps_per_attribute + kwargs + + Attributes + ---------- + param_names + + distribs + + n_stumps_per_attribute + + classed_params + + weird_strings + + nbCores + + """ def __init__(self, random_state=None, mu=0.01, self_complemented=True, n_stumps_per_attribute=1, **kwargs): super(MinCQGraalpy, self).__init__(mu=mu, @@ -29,20 +53,59 @@ class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier): self.nbCores = kwargs["nbCores"] def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + Returns + ------- + False + """ return False def set_params(self, **params): + """ + set parameter 'self.mu', 'self.random_state + 'self.n_stumps_per_attribute + + Parameters + ---------- + params + + Returns + ------- + self : object + Returns self. + """ self.mu = params["mu"] self.random_state = params["random_state"] self.n_stumps_per_attribute = params["n_stumps_per_attribute"] return self def get_params(self, deep=True): + """ + + Parameters + ---------- + deep : bool (default : true) not used + + Returns + ------- + dictianary with "random_state", "mu", "n_stumps_per_attribute" + """ return {"random_state": self.random_state, "mu": self.mu, "n_stumps_per_attribute": self.n_stumps_per_attribute} def getInterpret(self, directory, y_test): + """ + + Parameters + ---------- + directory + y_test + + Returns + ------- + string of interpret_string + """ interpret_string = "Cbound on train :" + str(self.train_cbound) np.savetxt(directory + "times.csv", np.array([self.train_time, 0])) # interpret_string += "Train C_bound value : "+str(self.cbound_train) diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py index 0bc6b73d2f9561ad669b1207781cf613bc88d2b9..bc2a228cd46bdb2b73a53a3152caaaf034af2402 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py @@ -8,9 +8,21 @@ classifier_class_name = "MinCQGraalpyTree" class MinCQGraalpyTree(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state + mu + self_complemented + n_stumps_per_attribute + max_depth + kwargs + + """ def __init__(self, random_state=None, mu=0.01, self_complemented=True, n_stumps_per_attribute=1, max_depth=2, **kwargs): + super(MinCQGraalpyTree, self).__init__(mu=mu, estimators_generator=TreeClassifiersGenerator( n_trees=n_stumps_per_attribute, diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py index 54eb985b1c1f548f6ced4458e96399a62502eaed..8b2caef15dd827e0c30ec3984512d72f6a154c65 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py @@ -10,9 +10,43 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "RandomForest" class RandomForest(RandomForestClassifier, BaseMonoviewClassifier): + """RandomForest Classifier Class + Parameters + ---------- + random_state + + n_estimators + + max_depth : int maximum of depth (default : 10) + + criterion : criteria (default : 'gini') + + kwargs + + Attributes + ---------- + param_names + + distribs + + classed_params + + weird_strings + + """ def __init__(self, random_state=None, n_estimators=10, max_depth=None, criterion='gini', **kwargs): + """ + + Parameters + ---------- + random_state + n_estimators + max_depth + criterion + kwargs + """ super(RandomForest, self).__init__( n_estimators=n_estimators, max_depth=max_depth, @@ -28,13 +62,29 @@ class RandomForest(RandomForestClassifier, BaseMonoviewClassifier): self.weird_strings = {} def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """Used to know if the classifier can return label probabilities + + Returns + ------- + True + """ return True def getInterpret(self, directory, y_test): - interpretString = "" - interpretString += self.getFeatureImportance(directory) - return interpretString + """ + + Parameters + ---------- + directory + y_test + + Returns + ------- + string for interpretation interpret_string + """ + interpret_string = "" + interpret_string += self.getFeatureImportance(directory) + return interpret_string # def formatCmdArgs(args): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm.py index 4988a2a7e15a421e74043ab6d465a6156488e930..8cae0d38380bd850efc454dd13d4dc04b470a2df 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm.py @@ -44,9 +44,41 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SCM" class SCM(scm, BaseMonoviewClassifier): + """ + SCM Classifier + Parameters + ---------- + random_state (default : None) + model_type : string (default: "conjunction") + max_rules : int number maximum of rules (default : 10) + p : float value(default : 0.1 ) + + kwarg : others arguments + + Attributes + ---------- + param_names + + distribs + + classed_params + + weird_strings + + """ def __init__(self, random_state=None, model_type="conjunction", max_rules=10, p=0.1, **kwargs): + """ + + Parameters + ---------- + random_state + model_type + max_rules + p + kwargs + """ super(SCM, self).__init__( random_state=random_state, model_type=model_type, @@ -61,7 +93,13 @@ class SCM(scm, BaseMonoviewClassifier): self.weird_strings = {} def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + return False in any case + """ return False def getInterpret(self, directory, y_test): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py index ced608365e87a9f0e80daf5f2a6db941b5062808..57026c02e2ba84d4a16deac4a6f8554e02f636fc 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py @@ -14,7 +14,32 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SCMPregen" class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): + """ + Parameters + ---------- + random_state + model_type + max_rules + p + n_stumps + self_complemented + estimators_generator + max_depth + kwargs + + Attributes + ---------- + param_names + + distribs + classed_params + weird_strings + self_complemented + n_stumps + estimators_generator + max_depth + """ def __init__(self, random_state=None, model_type="conjunction", max_rules=10, p=0.1, n_stumps=10, self_complemented=True, estimators_generator="Stumps", max_depth=1, **kwargs): @@ -39,13 +64,46 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): self.max_depth=1 def get_params(self, deep=True): + """ + + Parameters + ---------- + deep : boolean (default : True) not used + + Returns + ------- + parame + """ params = super(SCMPregen, self).get_params(deep) params["estimators_generator"] = self.estimators_generator params["max_depth"] = self.max_depth params["n_stumps"] = self.n_stumps return params - def fit(self, X, y, tiebreaker=None, iteration_callback=None, **fit_params): + def fit(self, X, y, tiebreaker=None, iteration_callback=None, + **fit_params): + """ + fit function + + Parameters + ---------- + X {array-like, sparse matrix}, shape (n_samples, n_features) + For kernel="precomputed", the expected shape of X is + (n_samples_test, n_samples_train). + y : { array-like, shape (n_samples,) + Target values class labels in classification + + tiebreaker + + iteration_callback : (default : None) + + fit_params : others parameters + + Returns + ------- + self : object + Returns self. + """ pregen_X, _ = self.pregen_voters(X, y) list_files = os.listdir(".") a = int(self.random_state.randint(0, 10000)) @@ -66,6 +124,20 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): return self def predict(self, X): + """ + + Parameters + ---------- + X : {array-like, sparse matrix}, shape (n_samples, n_features) + Training vectors, where n_samples is the number of samples + and n_features is the number of features. + For kernel="precomputed", the expected shape of X is + (n_samples, n_samples). + + Returns + ------- + y_pred : array, shape (n_samples,) + """ pregen_X, _ = self.pregen_voters(X) list_files = os.listdir(".") a = int(self.random_state.randint(0, 10000)) @@ -83,12 +155,29 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): return self.classes_[self.model_.predict(place_holder)] def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + Returns + ------- + False in any case + """ + return False def getInterpret(self, directory, y_test): - interpretString = "Model used : " + str(self.model_) - return interpretString + """ + + Parameters + ---------- + directory + y_test + + Returns + ------- + interpret_string string of interpretation + """ + interpret_string = "Model used : " + str(self.model_) + return interpret_string # def formatCmdArgs(args): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py index 22bbad8dcb3c3c8df9248597a0f7716725dca43b..f8a10d6fa5df4f5b39d4c7681fb9bc72303be47a 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py @@ -9,9 +9,19 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SGD" class SGD(SGDClassifier, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state + loss + penalty + alpha + kwargs + """ def __init__(self, random_state=None, loss='hinge', penalty='l2', alpha=0.0001, **kwargs): + super(SGD, self).__init__( loss=loss, penalty=penalty, @@ -26,12 +36,31 @@ class SGD(SGDClassifier, BaseMonoviewClassifier): self.weird_strings = {} def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + return True in all case + """ + return True def getInterpret(self, directory, y_test): - interpretString = "" - return interpretString + """ + + Parameters + ---------- + directory + + y_test + + Returns + ------- + interpret_string str to interpreted + """ + interpret_string = "" + return interpret_string # def formatCmdArgs(args): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py index 87f4c4ed4511f41e160223178f023780fa87f6e9..e26e5796256450cff500f416469900c1d08c1d46 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py @@ -9,8 +9,17 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SVMLinear" class SVMLinear(SVCClassifier, BaseMonoviewClassifier): + """SVMLinear + Parameters + ---------- + random_state + C + kwargs + + """ def __init__(self, random_state=None, C=1.0, **kwargs): + super(SVMLinear, self).__init__( C=C, kernel='linear', diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py index 386868656e84286bb1979539f1c93e197a4f011a..3d389802abb7fe0ba56a384c3e27074aef8db4c2 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py @@ -9,8 +9,28 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SVMPoly" class SVMPoly(SVCClassifier, BaseMonoviewClassifier): + """ + Class of SVMPoly for SVC Classifier + Parameters + ---------- + random_state + + C + + degree + + kwargs + + Attributes + ---------- + + param_names : list of parameters names + + distribs : list of random_state distribution + """ def __init__(self, random_state=None, C=1.0, degree=3, **kwargs): + super(SVMPoly, self).__init__( C=C, kernel='poly', diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py index f2ac82543e90b47a2e9126116ef98846ef765740..16727901006e0e451b18c82c8f7008f56916701b 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py @@ -9,8 +9,24 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "SVMRBF" class SVMRBF(SVCClassifier, BaseMonoviewClassifier): + """ + class SVMRBF for classifier SVCC + Parameters + ---------- + random_state + C + kwargs + + Attributes + ---------- + + param_names : list of parameters names + + distribs : list of random_state distribution + """ def __init__(self, random_state=None, C=1.0, **kwargs): + super(SVMRBF, self).__init__( C=C, kernel='rbf', @@ -27,6 +43,18 @@ class SVMRBF(SVCClassifier, BaseMonoviewClassifier): def paramsToSet(nIter, randomState): + """ + + Parameters + ---------- + nIter : int number of iterations + + randomState : + + Returns + ------- + paramsSet list of parameters dictionary with key "C" + """ paramsSet = [] for _ in range(nIter): paramsSet.append({"C": randomState.randint(1, 10000), }) diff --git a/multiview_platform/mono_multi_view_classifiers/multiview/analyze_results.py b/multiview_platform/mono_multi_view_classifiers/multiview/analyze_results.py index 2c4a90e159d9fd7b1df1500b4e429e236b430524..90637f5d70b256275e0cad083701c3f748b2a422 100644 --- a/multiview_platform/mono_multi_view_classifiers/multiview/analyze_results.py +++ b/multiview_platform/mono_multi_view_classifiers/multiview/analyze_results.py @@ -6,26 +6,60 @@ __status__ = "Prototype" # Production, Development, Prototype def printMetricScore(metricScores, metric_list): - metricScoreString = "\n\n" + """ + this function print the metrics scores + + Parameters + ---------- + metricScores : the score of metrics + + metric_list : list of metrics + + Returns + ------- + metric_score_string string constaining all metric results + """ + metric_score_string = "\n\n" for metric in metric_list: - metricModule = getattr(metrics, metric[0]) + metric_module = getattr(metrics, metric[0]) if metric[1] is not None: - metricKWARGS = dict((index, metricConfig) for index, metricConfig in + metric_kwargs = dict((index, metricConfig) for index, metricConfig in enumerate(metric[1])) else: - metricKWARGS = {} - metricScoreString += "\tFor " + metricModule.getConfig( - **metricKWARGS) + " : " - metricScoreString += "\n\t\t- Score on train : " + str( + metric_kwargs = {} + metric_score_string += "\tFor " + metric_module.getConfig( + **metric_kwargs) + " : " + metric_score_string += "\n\t\t- Score on train : " + str( metricScores[metric[0]][0]) - metricScoreString += "\n\t\t- Score on test : " + str( + metric_score_string += "\n\t\t- Score on test : " + str( metricScores[metric[0]][1]) - metricScoreString += "\n\n" - return metricScoreString + metric_score_string += "\n\n" + return metric_score_string def getTotalMetricScores(metric, trainLabels, testLabels, validationIndices, learningIndices, labels): + """ + + Parameters + ---------- + + metric : + + trainLabels : labels of train + + testLabels : labels of test + + validationIndices : + + learningIndices : + + labels : + + Returns + ------- + list of [trainScore, testScore] + """ metricModule = getattr(metrics, metric[0]) if metric[1] is not None: metricKWARGS = dict((index, metricConfig) for index, metricConfig in @@ -63,6 +97,52 @@ def execute(classifier, trainLabels, name, KFolds, hyper_param_search, nIter, metric_list, views_indices, random_state, labels, classifierModule): + """ + + Parameters + ---------- + classifier : classifier used + + trainLabels : labels of train + + testLabels : labels of test + + DATASET : + + classificationKWARGS + + classificationIndices + + labels_dictionary + + views + + nbCores + + times + + name + + KFolds + + hyper_param_search + + nIter + + metric_list + + views_indices + + random_state + + labels + + classifierModule + + Returns + ------- + retuern tuple of (stringAnalysis, imagesAnalysis, metricsScore) + """ classifier_name = classifier.short_name learningIndices, validationIndices, testIndicesMulticlass = classificationIndices diff --git a/multiview_platform/mono_multi_view_classifiers/multiview/exec_multiview.py b/multiview_platform/mono_multi_view_classifiers/multiview/exec_multiview.py index bf68fa9b1680a91779c5884d361ba888d6f1c941..7cca55ea9613cc0b33d16a6524c17789d9f31673 100644 --- a/multiview_platform/mono_multi_view_classifiers/multiview/exec_multiview.py +++ b/multiview_platform/mono_multi_view_classifiers/multiview/exec_multiview.py @@ -18,9 +18,33 @@ __author__ = "Baptiste Bauvin" __status__ = "Prototype" # Production, Development, Prototype -def init_constants(kwargs, classification_indices, metrics, name, nb_cores, k_folds, +def init_constants(kwargs, classification_indices, metrics, + name, nb_cores, k_folds, dataset_var): - """Used to init the constants""" + """ + Used to init the constants + Parameters + ---------- + kwargs : + + classification_indices : + + metrics : + + name : + + nb_cores : nint number of cares to execute + + k_folds : + + dataset_var : {array-like} shape (n_samples, n_features) + dataset variable + + Returns + ------- + tuple of (classifier_name, t_start, views_indices, + classifier_config, views, learning_rate) + """ views = kwargs["view_names"] views_indices = kwargs["view_indices"] if not metrics: @@ -39,12 +63,40 @@ def init_constants(kwargs, classification_indices, metrics, name, nb_cores, k_fo for view_index, view_name in zip(views_indices, views): logging.info("Info:\t Shape of " + str(view_name) + " :" + str( dataset_var.get_shape())) - return classifier_name, t_start, views_indices, classifier_config, views, learning_rate + return classifier_name, t_start, views_indices,\ + classifier_config, views, learning_rate def save_results(classifier, labels_dictionary, string_analysis, views, classifier_module, classification_kargs, directory, learning_rate, name, images_analysis): + """ + Save results in derectory + + Parameters + ---------- + + classifier : classifier class + + labels_dictionary : dict dictionary of labels + + string_analysis : str + + views : + + classifier_module : module of the classifier + + classification_kargs : + + directory : str directory + + learning_rate : + + name : + + images_analysis : + + """ labels_set = set(labels_dictionary.values()) logging.info(string_analysis) views_string = "-".join(views) @@ -83,6 +135,52 @@ def exec_multiview_multicore(directory, core_index, name, learning_rate, nb_fold random_state, labels, hyper_param_search=False, nb_cores=1, metrics=None, n_iter=30, **arguments): + """ + execute multiview process on + + Parameters + ---------- + + directory : indicate the directory + + core_index : + + name : name of the data file to perform + + learning_rate : + + nb_folds : + + database_type : + + path : path to the data name + + labels_dictionary + + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + labels : + + hyper_param_search : + + nb_cores : in number of cores + + metrics : metric to use + + n_iter : int number of iterations + + arguments : others arguments + + Returns + ------- + exec_multiview on directory, dataset_var, name, learning_rate, nb_folds, 1, + database_type, path, labels_dictionary, + random_state, labels, + hyper_param_search=hyper_param_search, metrics=metrics, + n_iter=n_iter, **arguments + """ """Used to load an HDF5 dataset_var for each parallel job and execute multiview classification""" dataset_var = h5py.File(path + name + str(core_index) + ".hdf5", "r") return exec_multiview(directory, dataset_var, name, learning_rate, nb_folds, 1, @@ -96,7 +194,50 @@ def exec_multiview(directory, dataset_var, name, classification_indices, k_folds nb_cores, database_type, path, labels_dictionary, random_state, labels, hyper_param_search=False, metrics=None, n_iter=30, **kwargs): - """Used to execute multiview classification and result analysis""" + """Used to execute multiview classification and result analysis + + Parameters + ---------- + + directory : indicate the directory + + + dataset_var : + + name + + classification_indices + + k_folds + + nb_cores + + database_type + + path + + labels_dictionary : dict dictionary of labels + + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + labels + + hyper_param_search + + metrics + + n_iter : int number of iterations + + kwargs + + Returns + ------- + + ``MultiviewResult`` + """ + logging.debug("Start:\t Initialize constants") cl_type, \ t_start, \ diff --git a/multiview_platform/mono_multi_view_classifiers/multiview/multiview_utils.py b/multiview_platform/mono_multi_view_classifiers/multiview/multiview_utils.py index 02956fa810e828b35f7e66f04d3b2ad748abd269..5a2deaa365bbab9cd1bf7796f6a550f7e837ea3f 100644 --- a/multiview_platform/mono_multi_view_classifiers/multiview/multiview_utils.py +++ b/multiview_platform/mono_multi_view_classifiers/multiview/multiview_utils.py @@ -28,13 +28,34 @@ def get_names(classed_list): class BaseMultiviewClassifier(BaseEstimator, ClassifierMixin): + """ + BaseMultiviewClassifier base of Multiview classifiers + + Parameters + ---------- + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + """ def __init__(self, random_state): + self.random_state = random_state self.short_name = self.__class__.__name__ self.weird_strings = {} - def genBestParams(self, detector): + def gen_best_params(self, detector): + """ + return best parameters of detector + Parameters + ---------- + detector : + + Returns + ------- + best param : dictionary with param name as key and best parameters + value + """ return dict((param_name, detector.best_params_[param_name]) for param_name in self.param_names) diff --git a/multiview_platform/mono_multi_view_classifiers/multiview_classifiers/weighted_linear_early_fusion.py b/multiview_platform/mono_multi_view_classifiers/multiview_classifiers/weighted_linear_early_fusion.py index 46a5cb9844870dd5a58b646786b7a90d8dc93b9e..e63ebbb63b35e5d69baa113f68889ee9ca389ce4 100644 --- a/multiview_platform/mono_multi_view_classifiers/multiview_classifiers/weighted_linear_early_fusion.py +++ b/multiview_platform/mono_multi_view_classifiers/multiview_classifiers/weighted_linear_early_fusion.py @@ -15,10 +15,23 @@ classifier_class_name = "WeightedLinearEarlyFusion" class WeightedLinearEarlyFusion(BaseMultiviewClassifier, BaseFusionClassifier): - + """ + WeightedLinearEarlyFusion + + Parameters + ---------- + random_state + view_weights + monoview_classifier_name + monoview_classifier_config + + Attributes + ---------- + """ def __init__(self, random_state=None, view_weights=None, monoview_classifier_name="decision_tree", monoview_classifier_config={}): + super(WeightedLinearEarlyFusion, self).__init__(random_state=random_state) self.view_weights = view_weights self.monoview_classifier_name = monoview_classifier_name