public class WekaInterfaces
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
WekaInterfaces.WekaClassifierGenerator |
Constructor and Description |
---|
WekaInterfaces() |
Modifier and Type | Method and Description |
---|---|
static weka.core.Instance |
getInstance(double[] fv,
double targetValue,
weka.core.Instances dataset)
Creates a Weka
Instance from the provided feature vector and target supervised output value and
adds it to the provided dataset. |
static weka.core.Instance |
getInstance(State s,
StateToFeatureVectorGenerator fvgen,
double targetValue,
weka.core.Instances dataset)
Creates a Weka
Instance for a state by first converting the state into a feature vector and then creating
the Instance to hold that feature vector with the provided target supervised output value. |
static weka.core.Instances |
getInstancesShell(double[] exfv,
int capacity)
Creates an empty Weka dataset (
Instances ) that can accommodate the provided feature vector. |
static weka.core.Instances |
getInstancesShell(State s,
StateToFeatureVectorGenerator fvgen,
int capacity)
Creates an empty Weka dataset (
Instances ) that can accommodate the feature set necessary for the input state. |
public static weka.core.Instance getInstance(State s, StateToFeatureVectorGenerator fvgen, double targetValue, weka.core.Instances dataset)
Instance
for a state by first converting the state into a feature vector and then creating
the Instance to hold that feature vector with the provided target supervised output value. The Weka
Instance
is associated added to the provided Instances
object. If it is null, then it makes one and
adds it to that.s
- the state for which the instance is to be constructedfvgen
- the StateToFeatureVectorGenerator
to turn the state into a feature vector.targetValue
- the target supervised output value for the instancedataset
- the dataset to which the created instance will be added.Instance
public static weka.core.Instances getInstancesShell(State s, StateToFeatureVectorGenerator fvgen, int capacity)
Instances
) that can accommodate the feature set necessary for the input state.s
- the input state from which the Weka dataset features will be modeled.fvgen
- The StateToFeatureVectorGenerator
that converts the state into a feature vectorcapacity
- the reserved capacity for the dataset.Instances
Weka dataset.public static weka.core.Instance getInstance(double[] fv, double targetValue, weka.core.Instances dataset)
Instance
from the provided feature vector and target supervised output value and
adds it to the provided dataset. If the dataset is null, then it is created first.fv
- the input feature vector.targetValue
- the target supervised output valuedataset
- the dataset (Instances
) to which the created Instance
will be added.Instance
.public static weka.core.Instances getInstancesShell(double[] exfv, int capacity)
Instances
) that can accommodate the provided feature vector.exfv
- the input feature vector for which the dataset is to be modeled.capacity
- the reserved capacity for the dataset.Instances
Weka dataset.