fdl.ModelInfo

Stores information about a model.

Input ParametersTypeDefaultDescription
display_namestrA display name for the model.
input_typefdl.ModelInputTypeA ModelInputType object containing the input type of the model.
model_taskfdl.ModelTaskA ModelTask object containing the model task.
inputslistA list of Column objects corresponding to the inputs (features) of the model.
outputslistA list of Column objects corresponding to the outputs (predictions) of the model.
metadataOptional [list]NoneA list of Column objects corresponding to any metadata fields.
decisionsOptional [list]NoneA list of Column objects corresponding to any decision fields (post-prediction business decisions).
targetsOptional [list]NoneA list of Column objects corresponding to the targets (ground truth) of the model.
frameworkOptional [str]NoneA string providing information about the software library and version used to train and run this model.
descriptionOptional [str]NoneA description of the model.
datasetsOptional [list]NoneA list of the dataset IDs used by the model.
mlflow_paramsOptional [fdl.MLFlowParams]NoneA MLFlowParams object containing information about MLFlow parameters.
model_deployment_paramsOptional [fdl.ModelDeploymentParams]NoneA ModelDeploymentParams object containing information about model deployment.
artifact_statusOptional [fdl.ArtifactStatus]NoneAn ArtifactStatus object containing information about the model artifact.
preferred_explanation_methodOptional [fdl.ExplanationMethod]NoneAn ExplanationMethod object that specifies the default explanation algorithm to use for the model.
custom_explanation_namesOptional [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_thresholdOptional [float].5The threshold used for classifying inferences for binary classifiers.
ranking_top_kOptional [int]50Used only for ranking models. Sets the top k results to take into consideration when computing performance metrics like MAP and NDCG.
group_byOptional [str]NoneUsed only for ranking models. The column by which to group events for certain performance metrics like MAP and NDCG.
fall_backOptional [dict]NoneA dictionary mapping a column name to custom missing value encodings for that column.
target_class_orderOptional [list]NoneA 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. You need to 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.
**kwargsAdditional arguments to be passed.
inputs = [
    fdl.Column(
        name='feature_1',
        data_type=fdl.DataType.FLOAT
    ),
    fdl.Column(
        name='feature_2',
        data_type=fdl.DataType.INTEGER
    ),
    fdl.Column(
        name='feature_3',
        data_type=fdl.DataType.BOOLEAN
    )
]

outputs = [
    fdl.Column(
        name='output_column',
        data_type=fdl.DataType.FLOAT
    )
]

targets = [
    fdl.Column(
        name='target_column',
        data_type=fdl.DataType.INTEGER
    )
]

model_info = fdl.ModelInfo(
    display_name='Example Model',
    input_type=fdl.ModelInputType.TABULAR,
    model_task=fdl.ModelTask.BINARY_CLASSIFICATION,
    inputs=inputs,
    outputs=outputs,
    targets=targets
)