Skip to content
Snippets Groups Projects
Commit 6542568e authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[ocsvm] added nu and gamma parameters

parent 054414a5
No related branches found
No related tags found
1 merge request!33WIP: added LDA and MLP
......@@ -25,6 +25,8 @@ class OCSVM(Algorithm):
self.gamma = gamma
self.machine = None
self.trainer = bob.learn.libsvm.Trainer(machine_type='ONE_CLASS', kernel_type='RBF', probability=True)
setattr(self.trainer, 'nu', self.nu)
setattr(self.trainer, 'gamma', self.gamma)
def train_projector(self, training_features, projector_file):
......@@ -51,9 +53,6 @@ class OCSVM(Algorithm):
# train
self.machine = self.trainer.train(pos)
print(self.machine.shape)
f = bob.io.base.HDF5File(projector_file, 'w')
self.machine.save(f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment