src.eval.deeplearn.dl_model_evaluator
Classes
|
- class src.eval.deeplearn.dl_model_evaluator.DLModelEvaluator(**kwargs)
- Author:
Alberto M. Esmoris Pena
Class to evaluate deep learning models.
- Variables:
dlmodel (
Model) – The deep learning model to be evaluatedpwise_output_path (str) – Where to export the point-wise output.
pwise_activations_path (str) – Where to export the point-wise activations.
accept_pipeline_state_predictions (bool) – Whether to accept predictions from a pipeline’s state (True) or not (False).
- static extract_eval_args(spec)
Extract the arguments to initialize/instantiate a DLModelEValuator from a key-word specification.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a DLModelEvaluator.
- __init__(**kwargs)
Initialize/instantiate a DLModelEvaluator.
- Parameters:
kwargs – The attributes for the DLModelEvaluator.
- eval(X, y=None, **kwargs)
Evaluate the DL model.
Potential evaluations are the point-wise outputs of the model and the point-wise activations of a hidden layer.
- Parameters:
X – Input data for the evaluation.
y – Expected values for the evaluation.
- Returns:
The evaluation of the deep learning model.
- Return type:
- __call__(x, **kwargs)
Evaluate with extra logic that is convenient for pipeline-based execution.
See
evaluator.Evaluator.eval().
- lazy_prepare(state)
Prepare the DLModelEvaluator, so it can take the dlmodel from the pipeline’s state that was not available when instantiating the evaluator.
- Parameters:
state (
SimplePipelineState) – The pipeline’s state.- Returns:
Nothing, but the internal state of the DLModelEvaluator is updated.
- eval_args_from_state(state)
Obtain the arguments to call the DLModelEvaluator from the current pipeline’s state.
- Parameters:
state (
SimplePipelineState) – The pipeline’s state- Returns:
The dictionary of arguments for calling DLModelEvaluator
- Return type:
dict