public interface IGeneratedModel
Modifier and Type | Method and Description |
---|---|
int |
getColIdx(java.lang.String name)
Returns index of column with give name or -1 if column is not found.
|
java.lang.String[][] |
getDomainValues()
Returns domain values for all columns
|
java.lang.String[] |
getDomainValues(int i)
Returns domain values for i-th column.
|
java.lang.String[] |
getDomainValues(java.lang.String name)
Gets domain of given column.
|
java.lang.String[] |
getNames()
The names of columns used in the model.
|
int |
getNumClasses(int i)
Get number of classes in in given column.
|
int |
getNumCols()
Returns number of columns used as input for training (i.e., exclude response column).
|
int |
getNumResponseClasses()
Return a number of classes in response column.
|
int |
getPredsSize()
Returns the expected size of preds array which is passed to
predict(double[], float[]) function. |
int |
getResponseIdx()
Returns an index of the response column.
|
java.lang.String |
getResponseName()
The name of the response column.
|
boolean |
isClassifier()
Return true if this model represents a classifier, else it is used for regression.
|
int |
mapEnum(int colIdx,
java.lang.String enumValue)
Maps given column's enum to integer used by this model.
|
float[] |
predict(double[] data,
float[] preds)
Predict the given row and return prediction.
|
float[] |
predict(double[] data,
float[] preds,
int maxIters)
Predict the given row and return prediction using given number of iterations (e.g., number of trees from forest).
|
int getNumCols()
java.lang.String[] getNames()
java.lang.String getResponseName()
int getResponseIdx()
int getNumClasses(int i)
int getNumResponseClasses()
boolean isClassifier()
float[] predict(double[] data, float[] preds)
data
- row holding the data. Ordering should follow ordering of columns returned by getNames()preds
- allocated array to hold a predictionfloat[] predict(double[] data, float[] preds, int maxIters)
data
- row holding the data. Ordering should follow ordering of columns returned by getNames()preds
- allocated array to hold a predictionmaxIters
- maximum number of iterations to use during predicting processjava.lang.String[] getDomainValues(java.lang.String name)
name
- column namejava.lang.String[] getDomainValues(int i)
i
- index of columnjava.lang.String[][] getDomainValues()
int getColIdx(java.lang.String name)
int mapEnum(int colIdx, java.lang.String enumValue)
int getPredsSize()
predict(double[], float[])
function.