Commit 6542568e authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[ocsvm] added nu and gamma parameters

parent 054414a5
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment