public abstract class OldModel extends Lockable<OldModel>
Modifier and Type | Field and Description |
---|---|
Key |
_dataKey
Dataset key used to *build* the model, for models for which this makes
sense, or null otherwise.
|
ValueArray |
_va
Columns used in the model.
|
static DocGen.FieldDoc[] |
DOC_FIELDS |
Constructor and Description |
---|
OldModel()
Empty constructor for deserialization
|
OldModel(Key key) |
OldModel(Key key,
int[] cols,
Key dataKey)
Default model, built from the selected columns of the given dataset.
|
OldModel(Key key,
OldModel m)
Simple shallow copy constructor
|
OldModel(Key key,
java.lang.String[] colNames,
java.lang.String[] classNames)
Default artificial model, built from given column names.
|
OldModel(Key key,
ValueArray va,
Key dataKey)
Artificial model.
|
Modifier and Type | Method and Description |
---|---|
OldModel |
adapt(java.lang.String[] colNames)
Adapt model for given columns.
|
OldModel |
adapt(ValueArray ary)
Adapt model for the given dataset.
|
boolean |
columnFilter(ValueArray.Column C) |
int[] |
columnMapping(java.lang.String[] names)
Map from the model's columns to the given column names, or to -1 if no
column name maps.
|
Futures |
delete_impl(Futures fs)
Remove any Model internal Keys
|
java.lang.String |
errStr() |
void |
fromJson(com.google.gson.JsonObject json) |
double |
getThreshold() |
static boolean |
identityMap(int[] mapping)
Check that this is the identity map
|
static boolean |
isCompatible(int[] mapping)
Check if this mapping is compatible.
|
boolean |
isCompatible(java.lang.String[] names)
Check if this model is compatible with this collection of column names.
|
boolean |
isCompatible(ValueArray data)
Check if this dataset is compatible with this model.
|
ValueArray.Column |
response()
Response column info
|
java.lang.String |
responseName() |
double |
score(double[] data) |
Frame |
score(Frame data) |
double |
score(ValueArray ary,
AutoBuffer bits,
int rid) |
protected abstract double |
score0(double[] data) |
protected double |
score0(ValueArray data,
AutoBuffer ab,
int row_in_chunk)
Bulk scoring API, on a compatible ValueArray (when pushed throw the mapping)
|
protected double |
score0(ValueArray data,
int row)
Single row scoring, on a compatible ValueArray (when pushed throw the mapping)
|
com.google.gson.JsonObject |
toJson() |
delete_and_lock, delete, delete, delete, delete, is_unlocked, is_wlocked, read_lock, read_lock, unlock_all, unlock, update, write_lock
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
public static DocGen.FieldDoc[] DOC_FIELDS
@Request.API(help="Underlying ValueArray, not used in Fluid Vec models") public final ValueArray _va
@Request.API(help="Datakey used to *build* the model") public final Key _dataKey
public OldModel()
public OldModel(Key key)
public OldModel(Key key, int[] cols, Key dataKey)
public OldModel(Key key, java.lang.String[] colNames, java.lang.String[] classNames)
public OldModel(Key key, ValueArray va, Key dataKey)
public boolean columnFilter(ValueArray.Column C)
public final ValueArray.Column response()
public final java.lang.String responseName()
public final int[] columnMapping(java.lang.String[] names)
public static boolean identityMap(int[] mapping)
public static boolean isCompatible(int[] mapping)
public final boolean isCompatible(java.lang.String[] names)
public final boolean isCompatible(ValueArray data)
public Futures delete_impl(Futures fs)
delete_impl
in class Lockable<OldModel>
public OldModel adapt(ValueArray ary)
ary
- - tst datasetpublic OldModel adapt(java.lang.String[] colNames)
colNames
- public double score(double[] data)
public double score(ValueArray ary, AutoBuffer bits, int rid)
protected abstract double score0(double[] data)
protected double score0(ValueArray data, int row)
protected double score0(ValueArray data, AutoBuffer ab, int row_in_chunk)
public com.google.gson.JsonObject toJson()
public void fromJson(com.google.gson.JsonObject json)
public double getThreshold()