public class CachedTrainingData extends Object implements LabelledDataProvider
Constructor and Description |
---|
CachedTrainingData(List<SummedSqTiltAreaTable> positive,
List<SummedSqTiltAreaTable> negative,
List<HaarFeature> features) |
Modifier and Type | Method and Description |
---|---|
boolean[] |
getClasses() |
HaarFeature |
getFeature(int dimension) |
float[] |
getFeatureResponse(int dimension)
Get the response for all items for a specific dimension of each feature
vector
|
float[] |
getInstanceFeature(int idx)
Get the feature vector for a specific instance
|
int[] |
getSortedResponseIndices(int d)
Get the indices of the responses corresponding to a specific dimension
for all items ordered such that the responses are ascending.
|
int |
numDimensions() |
int |
numInstances() |
public CachedTrainingData(List<SummedSqTiltAreaTable> positive, List<SummedSqTiltAreaTable> negative, List<HaarFeature> features)
public float[] getFeatureResponse(int dimension)
LabelledDataProvider
getFeatureResponse
in interface LabelledDataProvider
dimension
- the dimension to selectpublic boolean[] getClasses()
getClasses
in interface LabelledDataProvider
public int numInstances()
numInstances
in interface LabelledDataProvider
public int numDimensions()
numDimensions
in interface LabelledDataProvider
public float[] getInstanceFeature(int idx)
LabelledDataProvider
getInstanceFeature
in interface LabelledDataProvider
idx
- the index of the instancepublic int[] getSortedResponseIndices(int d)
LabelledDataProvider
getSortedResponseIndices
in interface LabelledDataProvider
d
- the dimension to selectpublic HaarFeature getFeature(int dimension)