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

MKL adaptation ongoing

parent 0fae2601
No related branches found
No related tags found
No related merge requests found
Pipeline #3582 failed
# The base configuration of the benchmark
Base :
log: true
name: ["Plausible"]
log: True
name: ["control_vs_malade"]
label: "_"
type: ".hdf5"
views:
......@@ -18,18 +18,18 @@ Base :
# All the classification-realted configuration options
Classification:
multiclass_method: "oneVersusOne"
split: 0.8
nb_folds: 2
split: 0.4
nb_folds: 5
nb_class: 2
classes:
type: ["multiview"]
algos_monoview: ["all"]
algos_multiview: ["lp_norm_mkl",]
stats_iter: 2
stats_iter: 5
metrics: ["accuracy_score", "f1_score"]
metric_princ: "f1_score"
hps_type: "randomized_search"
hps_iter: 2
hps_iter: 30
#####################################
......
......@@ -68,7 +68,7 @@ class KernelConfigDistribution:
def __init__(self, seed=42):
self.random_state=np.random.RandomState(seed)
self.possible_config = {
"additive_chi2": {"gamma": CustomUniform()},
"chi2": {"gamma": CustomUniform()},
"rbf": {"gamma": CustomUniform()},
}
......@@ -95,7 +95,7 @@ class KernelDistribution:
def __init__(self, seed=42):
self.random_state=np.random.RandomState(seed)
self.available_kernels = ["rbf",]
self.available_kernels = ["rbf"]
def draw(self, nb_view):
return list(self.random_state.choice(self.available_kernels, nb_view))
......@@ -31,7 +31,8 @@ class LPNormMKL(KernelClassifier, MKL):
return super(LPNormMKL, self).fit(formatted_X, y[train_indices])
def predict(self, X, example_indices=None, view_indices=None):
print(self.C.shape)
# print(self.K_)
# import pdb;pdb.set_trace()
new_X, _ = self.format_X(X, example_indices, view_indices)
return self.extract_labels(super(LPNormMKL, self).predict(new_X))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment