Context#
- class Context[source]#
Contains all the data + properties the user has passed to a check/suite, and validates it seamlessly.
- Parameters
- trainVisionData , default: None
Dataset or DataFrame object, representing data an estimator was fitted on
- testVisionData , default: None
Dataset or DataFrame object, representing data an estimator predicts on
- modelBasicModel , default: None
A scikit-learn-compatible fitted estimator instance
- model_name: str , default: ‘’
The name of the model
- scorersMapping[str, Metric] , default: None
dict of scorers names to a Metric
- scorers_per_classMapping[str, Metric] , default: None
dict of scorers for classification without averaging of the classes. See <a href= “https://scikit-learn.org/stable/modules/model_evaluation.html#from-binary-to-multiclass-and-multilabel”> scikit-learn docs</a>
- deviceUnion[str, torch.device], default: ‘cpu’
processing unit for use
- random_stateint
A seed to set for pseudo-random functions
- n_samplesint, default: None
- __init__(train: Optional[VisionData] = None, test: Optional[VisionData] = None, model: Optional[Module] = None, model_name: str = '', scorers: Optional[Mapping[str, Metric]] = None, scorers_per_class: Optional[Mapping[str, Metric]] = None, device: Optional[Union[str, device]] = None, random_state: int = 42, n_samples: Optional[int] = None, train_predictions: Optional[Union[List[Tensor], Tensor]] = None, test_predictions: Optional[Union[List[Tensor], Tensor]] = None)[source]#
- __new__(*args, **kwargs)#
Attributes
Return device specified by the user. |
|
Return & validate model if model exists, otherwise raise error. |
|
Return model name. |
|
Return the static_predictions. |
|
Return test if exists, otherwise raise error. |
|
Return train if exists, otherwise raise error. |
Methods
|
Assert that for given DatasetKind the model & dataset infer_on_batch return predictions in right format. |
|
Assert task_type matching given types. |
|
Return the relevant VisionData by given kind. |
|
Get footnote to display when the datasets are sampled. |
Return whether there is test dataset defined. |