Constructor
new Grid(axisSet, _modelStatics, _sessionData, _callbackEvaluatePrediction, _userGridOptionsopt, _callbackReportIterationopt, _callbackReportEpochopt, _callbackReportBatchopt)
Creates an instance of Grid.
Example
// Sample CallbackEvaluatePrediction
function EvaluatePrediction(target: number[], prediction: number[]) {
// your logic here; determine whether the prediction is correct
return new tngs.PredictionEvaluation(correct);
}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
axisSet |
AxisSet | The hyperparameter ranges to search. | |
_modelStatics |
ModelStatics | The parameters that will be the same for every model. | |
_sessionData |
SessionData | The data set to be used for training and testing each model. | |
_callbackEvaluatePrediction |
function | A function which takes a prediction for a case's inputs, and that case's
actual targets. The function returns a score for the prediction.
These scores determine the 'quality' of each model. Arguments: target: number[], prediction: number[] Returns: PredictionEvaluation |
|
_userGridOptions |
GridOptions |
<optional> |
Settings for the search. |
_callbackReportIteration |
function |
<optional> |
A function
invoked at the end of every model's train-and-test sequence. Arguments: duration: number, predictions: number[][], proofInputs: Array Returns: void |
_callbackReportEpoch |
function |
<optional> |
A function invoked
at the end of every training epoch. If this is not included (i.e. it's
null or undefined), default reporting will be logged every epoch. See
EpochStats#WriteReport for the default report's format.Arguments: duration: number, epoch: number, logs: tf.Logs, epochStats: EpochStats Returns: void |
_callbackReportBatch |
function |
<optional> |
A function invoked
at the end of every train epoch. Note that this can get very
spammy! Arguments: duration: number, predictions: number[][], proofInputs: Array Returns: void |
- Source:
Methods
Run() → {Promise.<void>}
Begins the grid search. Async for the TF model.fit() https://js.tensorflow.org/api/latest/#tf.Sequential.fit
Returns:
- Type
- Promise.<void>
- Source: