Comparison

Compare the structure of two trained models.
View as Markdown

The Comparison view compares two trained models.

Use it to understand how a baseline model differs from another trained model, especially after changing training data, schema settings, training configuration, constraints, or model version.

When to use

Use caseDescription
Compare training runsCheck whether a new training run changed the model structure.
Review model changesSee which modules or partitions were added, deleted, or edited.
Inspect structural driftCompare module and partition changes across two models trained from different data or settings.
Support model reviewUse structural differences to guide review before selecting a model for deployment.

Generate the view

Generate the Comparison view from the baseline model.

The model in the path is treated as the baseline model. The request body must include comparison_model_id, which identifies the model to compare against the baseline.

1{
2 "data": [
3 {
4 "view_type": "MODEL_COMPARISON",
5 "comparison_model_id": "comparison-model-id"
6 }
7 ]
8}

A Fern example for MODEL_COMPARISON should be added before replacing this request body with endpoint snippets.

Output

The response follows the shared Response structure format.

The Comparison view returns multiple named dataframes inside view_data.

DataframeDescription
summaryHigh-level differences between the baseline model and comparison model.
modulesModule-level differences, including added, deleted, or edited modules and changes to partition and parameter counts.
partitionsPartition-level differences, including changed rules, intercepts, coefficients, and transformed features.

Interpret the result

The Comparison view is easiest to read from broad differences to detailed differences: start with summary, then inspect changed modules, then review changed partitions.

Start with the summary

Use summary to understand which high-level model attributes changed.

The attributes column identifies the attribute being compared. baseline_model and comparison_model show the values on each side. delta shows the change, and edit_operation describes whether the attribute was added, deleted, or edited.

This is the fastest way to see whether the two models differ in overall structure before inspecting the detailed dataframes.

Inspect module changes

Use modules to understand how the model organisation changed.

The module_operation columns identify the module and whether it was added, deleted, or edited. The baseline_model and comparison_model columns show the module identifiers, indexes, partition counts, parameter counts, and non-zero parameter counts on each side. The delta columns show the size of the change.

Focus first on added or deleted modules, then inspect edited modules with large changes in delta.n_partitions, delta.n_params, or delta.non_zero_params.

Review partition changes

Use partitions to inspect changes inside modules.

The partition_operation columns identify the rule and edit operation. The baseline_partition and comparison_partition columns show the module, rule, intercept, coefficients, and transformed features on each side. The delta columns show the changes to the rule expression components.

Partition changes are useful when the model appears similar at the module level but behaves differently because the rules inside a module changed.

Compare models before deployment

Use the Comparison view before deployment when you need to choose between two trained models or understand the impact of a training change.

For prediction-level differences, deploy the relevant model and use deployed model views to compare predictions, attributions, diagnostics, or evaluation results.

Field reference

The Comparison view returns dataframes, so individual columns are not documented as standalone API schema properties. This section describes the main columns returned in each dataframe.

summary

The summary dataframe contains high-level differences between the baseline model and the comparison model.

FieldDescription
attributesModel attribute being compared.
baseline_modelValue of the attribute in the baseline model.
comparison_modelValue of the attribute in the comparison model.
deltaDifference between the baseline and comparison values, when a difference can be calculated.
edit_operationType of change detected for the attribute, such as added, deleted, or edited.

modules

The modules dataframe contains module-level differences between the two models.

FieldDescription
module_operation.module_stable_labelStable label of the module being compared.
module_operation.module_featuresFeatures used by the module.
module_operation.edit_operationType of change detected for the module, such as added, deleted, or edited.
baseline_model.module_idModule ID in the baseline model.
baseline_model.module_indexModule index in the baseline model.
baseline_model.n_partitionsNumber of partitions in the baseline model module.
baseline_model.n_paramsNumber of parameters in the baseline model module.
baseline_model.non_zero_paramsNumber of non-zero parameters in the baseline model module.
comparison_model.module_idModule ID in the comparison model.
comparison_model.module_indexModule index in the comparison model.
comparison_model.n_partitionsNumber of partitions in the comparison model module.
comparison_model.n_paramsNumber of parameters in the comparison model module.
comparison_model.non_zero_paramsNumber of non-zero parameters in the comparison model module.
delta.n_partitionsChange in partition count between the baseline and comparison modules.
delta.n_paramsChange in parameter count between the baseline and comparison modules.
delta.non_zero_paramsChange in non-zero parameter count between the baseline and comparison modules.

partitions

The partitions dataframe contains partition-level differences between the two models.

FieldDescription
partition_operation.rule_canonical_labelCanonical label of the rule being compared.
partition_operation.rule_friendly_conditionFriendly condition expression for the rule, when available.
partition_operation.edit_operationType of change detected for the partition, such as added, deleted, or edited.
baseline_partition.module_idModule ID for the partition in the baseline model.
baseline_partition.module_indexModule index for the partition in the baseline model.
baseline_partition.rule_idRule ID in the baseline model.
baseline_partition.interceptIntercept for the partition expression in the baseline model.
baseline_partition.coefficientsCoefficients for the partition expression in the baseline model.
baseline_partition.transformed_featuresTransformed features used by the partition in the baseline model.
comparison_partition.module_idModule ID for the partition in the comparison model.
comparison_partition.module_indexModule index for the partition in the comparison model.
comparison_partition.rule_idRule ID in the comparison model.
comparison_partition.interceptIntercept for the partition expression in the comparison model.
comparison_partition.coefficientsCoefficients for the partition expression in the comparison model.
comparison_partition.transformed_featuresTransformed features used by the partition in the comparison model.
delta.interceptChange in intercept between the baseline and comparison partitions.
delta.coefficientsChange in coefficients between the baseline and comparison partitions.
delta.transformed_featuresChange in transformed features between the baseline and comparison partitions.