Constructs a ModelInfo object from a DatasetInfo object.
Input Parameters | Type | Default | Description |
---|---|---|---|
dataset_info | fdl.DatasetInfo() | The DatasetInfo object from which to construct the ModelInfo object. | |
target | str | The column to be used as the target (ground truth). | |
model_task | fdl.ModelTask | None | A ModelTask object containing the model task. |
dataset_id | Optional [str] | None | The unique identifier for the dataset. |
features | Optional [list] | None | A list of columns to be used as features. |
custom_features | Optional[List[CustomFeature]] | None | List of Custom Features definitions for a model. Objects of type Multivariate, Vector, ImageEmbedding or TextEmbedding derived from CustomFeature can be provided. |
metadata_cols | Optional [list] | None | A list of columns to be used as metadata fields. |
decision_cols | Optional [list] | None | A list of columns to be used as decision fields. |
display_name | Optional [str] | None | A display name for the model. |
description | Optional [str] | None | A description of the model. |
input_type | Optional [fdl.ModelInputType] | fdl.ModelInputType.TABULAR | A ModelInputType object containing the input type of the model. |
outputs | Optional [list] | A list of Column objects corresponding to the outputs (predictions) of the model. | |
targets | Optional [list] | None | A list of Column objects corresponding to the targets (ground truth) of the model. |
model_deployment_params | Optional [fdl.ModelDeploymentParams] | None | A ModelDeploymentParams object containing information about model deployment. |
framework | Optional [str] | None | A string providing information about the software library and version used to train and run this model. |
datasets | Optional [list] | None | A list of the dataset IDs used by the model. |
mlflow_params | Optional [fdl.MLFlowParams] | None | A MLFlowParams object containing information about MLFlow parameters. |
preferred_explanation_method | Optional [fdl.ExplanationMethod] | None | An ExplanationMethod object that specifies the default explanation algorithm to use for the model. |
custom_explanation_names | Optional [list] | [ ] | A list of names that can be passed to the explanation_name _argument of the optional user-defined _explain_custom method of the model object defined in package.py. |
binary_classification_threshold | Optional [float] | .5 | The threshold used for classifying inferences for binary classifiers. |
ranking_top_k | Optional [int] | 50 | Used only for ranking models. Sets the top k results to take into consideration when computing performance metrics like MAP and NDCG. |
group_by | Optional [str] | None | Used only for ranking models. The column by which to group events for certain performance metrics like MAP and NDCG. |
fall_back | Optional [dict] | None | A dictionary mapping a column name to custom missing value encodings for that column. |
categorical_target_class_details | Optional [Union[list, int, str]] | None | A list denoting the order of classes in the target. This parameter is required in the following cases: - Binary classification tasks: If the target is of type string, you must tell Fiddler which class is considered the positive class for your output column. If you provide a single element, it is considered the positive class. Alternatively, you can provide a list with two elements. The 0th element by convention is considered the negative class, and the 1st element is considered the positive class. When your target is boolean, you don't need to specify this argument. By default Fiddler considers True as the positive class. In case your target is numerical, you don't need to specify this argument, by default Fiddler considers the higher of the two possible values as the positive class.- Multi-class classification tasks: You must tell Fiddler which class corresponds to which output by giving an ordered list of classes. This order should be the same as the order of the outputs. - Ranking tasks: If the target is of type string, you must provide a list of all the possible target values in the order of relevance. The first element will be considered as the least relevant grade and the last element from the list will be considered the most relevant grade. In the case your target is numerical, Fiddler considers the smallest value to be the least relevant grade and the biggest value from the list will be considered the most relevant grade. |
import pandas as pd
df = pd.read_csv('example_dataset.csv')
dataset_info = fdl.DatasetInfo.from_dataframe(
df=df
)
model_info = fdl.ModelInfo.from_dataset_info(
dataset_info=dataset_info,
features=[
'feature_1',
'feature_2',
'feature_3'
],
outputs=[
'output_column'
],
target='target_column',
input_type=fdl.ModelInputType.TABULAR,
model_task=fdl.ModelTask.BINARY_CLASSIFICATION
)
Return Type | Description |
---|---|
fdl.ModelInfo | A fdl.ModelInfo() object constructed from the fdl.DatasetInfo() object provided. |