MP - type of model build parameterspublic class Grid<MP extends Model.Parameters> extends Lockable<Grid<MP>> implements ModelContainer<Model>, Recoverable<Grid<MP>>
| Modifier and Type | Class and Description |
|---|---|
static class |
Grid.SearchFailure<MP extends Model.Parameters>
Failure that occurred during hyperspace exploration.
|
| Modifier and Type | Field and Description |
|---|---|
static Grid |
GRID_PROTO
Publicly available Grid prototype - used by REST API.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Grid(Key key,
HyperSpaceWalker<MP,?> walker,
int parallelism) |
protected |
Grid(Key key,
MP params,
java.lang.String[] hyperNames,
java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
HyperSpaceSearchCriteria searchCriteria,
PojoUtils.FieldNaming fieldNaming,
int parallelism)
Construct a new grid object to store results of grid search.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
checksum_impl()
High-quality 64-bit checksum of the content of the object.
|
protected void |
clearNonRelatedFailures()
Removes failures found while walking the hyperspace related to models not present in Grid.
|
int |
countTotalFailures() |
TwoDimTable |
createScoringHistoryTable() |
TwoDimTable |
createSummaryTable(Key<Model>[] model_ids,
java.lang.String sort_by,
boolean decreasing) |
java.util.List<java.lang.String> |
exportBinary(java.lang.String gridExportDir,
boolean exportModels,
ModelExportOption... options)
Exports this Grid in a binary format using
AutoBuffer. |
java.util.Set<Key<?>> |
getDependentKeys() |
Grid.SearchFailure |
getFailures()
Returns all failures currently listed in this Grid instance, including failures related to models not present in
the grid that failed during the last run.
|
java.lang.String[] |
getHyperNames()
Returns an array of used hyper parameters names.
|
java.util.Map<java.lang.String,java.lang.Object[]> |
getHyperParams() |
java.lang.Object[] |
getHyperValues(MP parms)
Return value of hyper parameters used for this grid search.
|
Model |
getModel(MP params)
Returns model for given combination of model parameters or null if the model does not exist.
|
int |
getModelCount()
Returns number of models in this grid.
|
Key<Model> |
getModelKey(MP params) |
Key<Model>[] |
getModelKeys()
Returns keys of all models included in this object.
|
java.lang.String |
getModelName()
Returns name of model included in this object.
|
Model[] |
getModels()
Return all models included in this grid object.
|
int |
getParallelism() |
MP |
getParams() |
ScoringInfo[] |
getScoringInfos() |
HyperSpaceSearchCriteria |
getSearchCriteria() |
Frame |
getTrainingFrame()
Returns the data frame used to train all these models.
|
static Grid |
importBinary(java.lang.String gridPath,
boolean loadReferences) |
java.lang.Class<KeyV3.GridKeyV3> |
makeSchema() |
protected Keyed |
readAll_impl(AutoBuffer ab,
Futures fs) |
protected Futures |
remove_impl(Futures fs,
boolean cascade)
Override to remove subparts, but not self, of composite Keyed objects.
|
void |
setScoringInfos(ScoringInfo[] scoring_infos) |
void |
update(java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
HyperSpaceSearchCriteria searchCriteria,
int parallelism) |
protected AutoBuffer |
writeAll_impl(AutoBuffer ab)
Write out K/V pairs
|
delete_and_lock, delete_and_lock, delete_and_lock, delete_and_lock, delete, delete, delete, delete, read_lock, read_lock, read_lock, unlock_all, unlock, unlock, unlock, unlock, update, update, update, write_lock_to_read_lock, write_lock, write_lock, write_lockchecksum_impl, checksum, checksum, getKey, readAll, remove_impl, remove_self_key_impl, remove, remove, remove, remove, remove, remove, removeQuietly, writeAllasBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSONequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeypublic static final Grid GRID_PROTO
GridSchemaV99protected Grid(Key key, MP params, java.lang.String[] hyperNames, java.util.Map<java.lang.String,java.lang.Object[]> hyperParams, HyperSpaceSearchCriteria searchCriteria, PojoUtils.FieldNaming fieldNaming, int parallelism)
key - reference to this objectparams - initial parameters used by grid searchhyperNames - names of used hyper parametersprotected Grid(Key key, HyperSpaceWalker<MP,?> walker, int parallelism)
public void update(java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
HyperSpaceSearchCriteria searchCriteria,
int parallelism)
public java.util.Map<java.lang.String,java.lang.Object[]> getHyperParams()
public HyperSpaceSearchCriteria getSearchCriteria()
public int getParallelism()
public java.lang.String getModelName()
public ScoringInfo[] getScoringInfos()
public void setScoringInfos(ScoringInfo[] scoring_infos)
public Frame getTrainingFrame()
All models are trained on the same data frame, but might be validated on multiple different frames.
public Model getModel(MP params)
params - parameters of the modelpublic Key<Model>[] getModelKeys()
getModelKeys in interface ModelContainer<Model>public Model[] getModels()
getModels in interface ModelContainer<Model>public int getModelCount()
getModelCount in interface ModelContainer<Model>public Grid.SearchFailure getFailures()
Grid.SearchFailure with all failures currently linked to this Grid.
An empty Grid.SearchFailure instance is returned if there are no failures listed.public int countTotalFailures()
protected void clearNonRelatedFailures()
public java.lang.Object[] getHyperValues(MP parms)
parms - model parameterspublic java.lang.String[] getHyperNames()
protected Futures remove_impl(Futures fs, boolean cascade)
KeyedVec (removing associated Chunk keys)
and Frame (removing associated Vec keys.)remove_impl in class Keyed<Grid<MP extends Model.Parameters>>protected AutoBuffer writeAll_impl(AutoBuffer ab)
writeAll_impl in class Keyed<Grid<MP extends Model.Parameters>>protected Keyed readAll_impl(AutoBuffer ab, Futures fs)
readAll_impl in class Keyed<Grid<MP extends Model.Parameters>>protected long checksum_impl()
Keyedchecksum_impl in class Keyed<Grid<MP extends Model.Parameters>>public java.lang.Class<KeyV3.GridKeyV3> makeSchema()
makeSchema in class Keyed<Grid<MP extends Model.Parameters>>public TwoDimTable createSummaryTable(Key<Model>[] model_ids, java.lang.String sort_by, boolean decreasing)
public TwoDimTable createScoringHistoryTable()
public java.util.List<java.lang.String> exportBinary(java.lang.String gridExportDir,
boolean exportModels,
ModelExportOption... options)
AutoBuffer. Related models are not saved.exportBinary in interface Recoverable<Grid<MP extends Model.Parameters>>gridExportDir - Full path to the folder this Grid should be saved topublic static Grid importBinary(java.lang.String gridPath, boolean loadReferences)
public java.util.Set<Key<?>> getDependentKeys()
getDependentKeys in interface Recoverable<Grid<MP extends Model.Parameters>>public MP getParams()