Skip to main content
Glama
Axiomatic-AI

axiomatic-mcp

Official
by Axiomatic-AI

AxModelFitter_compare_models

Compare multiple fitted models on the same data and rank them using AIC/BIC to identify the statistically best model.

Instructions

Compare multiple models to find the best one using statistical criteria.

USE CASE: You have several competing models (linear, exponential, polynomial) fitted to the same data.
This tool tells you which model is statistically best.

REQUIRED INPUTS:
- models: List of your fitted models with their loss values and parameter counts
- data_file: Path to your data file (same data used for all models)
- output_data: Which columns contain your output data
- sigma: Noise level (required for MSE models, None for MAE models)

EXAMPLE MODELS INPUT:
[
    {"name": "Linear", "loss_value": 0.05, "cost_function_type": "mse", "n_parameters": 2},
    {"name": "Exponential", "loss_value": 0.02, "cost_function_type": "mse", "n_parameters": 3}
]

RETURNS: Ranked models with statistical evidence for which is best.
Lower AIC/BIC = better model. Akaike weights show relative model support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n_obsNoExplicit count of independent residuals for ALL models. If None, infers from output data
sigmaNoREQUIRED noise std dev for diagonal covariance Σ=σ²I applied to ALL models. For mse: provide from domain knowledge. For mae: use None.
modelsYesList of model dicts: [{'name': 'Model1', 'loss_value': 0.01, 'cost_function_type': 'mse', 'n_parameters': 3}, ...]
data_fileYesPath to data file (CSV, Excel, JSON, Parquet). All data must be provided via file.
file_formatNoFile format: 'csv', 'excel', 'json', 'parquet' (auto-detect if None)
output_dataYesOutput column mapping: {'columns': ['y'], 'name': 'y', 'unit': 'volt'} or {'columns': ['y1', 'y2'], 'name': 'y', 'unit': 'volt'}
df_effectiveNoEffective degrees of freedom for penalized models (EXCLUDING scale) - applied to ALL models
n_scale_paramsNoNumber of scale parameters: 1 for single-output, d for d-output with separate scales
aicc_include_scaleNoInclude scale parameter in AICc correction (literature varies)
include_scale_paramNoInclude scale parameter (σ² or b) in k count
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the tool uses AIC/BIC for ranking and returns ranked models with statistical evidence (Akaike weights). It also states 'Lower AIC/BIC = better model.' Since no annotations are provided, the description carries full burden and does so adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is logically structured with sections USE CASE, REQUIRED INPUTS, EXAMPLE MODELS INPUT, and RETURNS. It is front-loaded and efficient. Minor inefficiencies like 'REQUIRED INPUTS' and 'RETURNS' could be integrated, but overall it is concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters (3 required), complex nested objects, and no output schema, the description covers the main purpose and key inputs. It explains the model list structure and output behavior. Some parameters like n_obs and df_effective are not explained in the description but are covered in the schema. The description is sufficient for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter. The tool description adds value with an example models input, clarification that sigma is required for mse and None for mae, and explanation of data_file and output_data requirements. This goes beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Compare multiple models to find the best one using statistical criteria.' It specifies the verb (compare), resource (models), and outcome (best one). This distinguishes it from sibling tools like fit_model or cross_validate_model.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A use case is explicitly given: 'You have several competing models... This tool tells you which model is statistically best.' Required inputs are listed and an example is provided. However, it does not mention when not to use this tool or alternatives among siblings like calculate_information_criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Axiomatic-AI/ax-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server