public class BinaryLinearModel extends BinaryModel
bias
Constructor and Description |
---|
BinaryLinearModel() |
Modifier and Type | Method and Description |
---|---|
void |
addExample(float weight,
Example example)
Adds an example to the model with a given weight.
|
Vector |
getHyperplane() |
String |
getRepresentation() |
float |
getSquaredNorm()
Computes the squared norm of the hyperplane this model is based on
|
float |
getSquaredNorm(Example example)
Computes the squared norm of a given example according to the space in which the model
is operating
|
void |
reset()
Resets the model parameters to the default state.
|
void |
setHyperplane(Vector hyperplane) |
void |
setRepresentation(String representation) |
getBias, setBias
public Vector getHyperplane()
public void setHyperplane(Vector hyperplane)
hyperplane
- the hyperplane to setpublic String getRepresentation()
public void setRepresentation(String representation)
representation
- the identifier of the representation to set. The model operates
on that representationpublic void reset()
Model
public void addExample(float weight, Example example)
BinaryModel
addExample
in class BinaryModel
weight
- the weight of the new example to addexample
- the example to addpublic float getSquaredNorm(Example example)
BinaryModel
getSquaredNorm
in class BinaryModel
example
- the example whose squared norm is requiredpublic float getSquaredNorm()
BinaryModel
getSquaredNorm
in class BinaryModel
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.