tabensemb.model.PytorchTabular.inspect_attr#
method
- PytorchTabular.inspect_attr(model_name: str, attributes: List[str], df=None, derived_data=None, to_numpy=True) Dict[str, Any]#
Get attributes of the model after evaluating the model on training, validation, and testing sets respectively. If
dfis given, values after evaluating the given set are returned.- Parameters:
- model_name
The name of the inspected model.
- attributes
The requested attributes. If the model does not have the attribute, None is returned.
- df
The tabular dataset.
- derived_data:
Unstacked data derived from
tabensemb.data.datamodule.DataModule.derive_unstacked(). If None, unstacked data will be re-derived.- to_numpy
If True, call
numpy()if the attribute is a torch.Tensor.
- Returns:
- dict
A dict with keys
train,val, andtestifdfis not given, and each value contains the attributes requested. Ifdfis given, a dict with a single keyUSER_INPUTand the corresponding value contains the attributes. The prediction is also included with the keyprediction.