Model guide

Decision Tree Regressor

A non-linear tree-based model that partitions the feature space into decision regions based on learned thresholds. Useful when business, product, customer, demand, or service behavior changes in step-like ways, such as after demand crosses a limit or a customer segment enters a different state. Good for capturing interactions and non-linear patterns with decision logic that is often easier to inspect than more complex ensembles.

Model ID: predict/decision_tree Feature-based prediction Trust-aware output guidance

Where to start

Use this guide to connect the route, request, and interpretation together

This page is focused on the practical path for Decision Tree Regressor: which prediction routes are available, what the request body should communicate, what the response shape means, and how to test the route without exposing service credentials to browser clients.

Good fit

Use this model when product, usage, cohort, demand, operational, capacity, or service features help explain a count or numeric outcome.

Integration guidance

Server-side applications can call eazePredict routes with service credentials. Keep credentials out of browser clients and use your application layer to expose application-facing workflows.

Available endpoints

Verified route paths for Decision Tree Regressor

These are the verified paths for this model family. Use the base URL /trace/engine/v1 before the route path in API mode.

POST /predict/decision_tree

Loads a saved model artifact and returns prediction rows for the provided feature or time-series context.

Relative URL: /trace/engine/v1/predict/decision_tree

POST /train/model/decision_tree

Trains and saves a model artifact for later prediction under the same workspace and model identity.

Relative URL: /trace/engine/v1/train/model/decision_tree

POST /train/model/decision_tree/gridsearchcv

Runs hyperparameter search and returns recommended parameters. It does not save a production model artifact.

Relative URL: /trace/engine/v1/train/model/decision_tree/gridsearchcv

Example request

Request shape for Decision Tree Regressor

This example shows the core JSON shape expected by this guide. In deployed service-to-service calls, include customerKey for protected train, predict, and model-forecast routes, and keep service credentials outside browser clients.

  • featureModel identifies the supervised model artifact family.
  • externalFeatures carries feature arrays such as active users, support requests, usage, demand, event activity, cohort behavior, inventory, capacity, workload, or service-health context.
  • featureOutput names the target output and includes training targets when fitting a model.
JSON request body
{
  "customerKey": "eazepredict-demo",
  "externalFeatures": [
    {
      "label": "website_visits",
      "output": [
        3000,
        3500
      ]
    },
    {
      "label": "discount_percent",
      "output": [
        15,
        20
      ]
    }
  ],
  "featureModel": "productSalesForecast",
  "featureOutput": {
    "label": "units_sold"
  },
  "startDate": "Wed, 01 Jan 2025 00:00:00 GMT",
  "timeSeriesFrequency": 1,
  "timeSeriesType": "d"
}

Example response

Successful response shape

Responses are JSON and vary by route. Training responses can include artifact metadata and trust summaries. Prediction and forecasting responses return rows keyed by timestamp, signal labels, model output, and any trust-aware warning fields produced by eazePredict.

  • result usually contains model fit, forecast, or analysis rows.
  • prediction appears on saved-model prediction routes.
  • error appears when validation, artifacts, or processing fail.
JSON response body
{
  "model": "decision_tree",
  "prediction": [
    {
      "discount_percent": 15.0,
      "timestamp": "Wed, 01 Jan 2025 10:00:00 GMT",
      "units_sold": 170,
      "website_visits": 3000.0
    },
    {
      "discount_percent": 20.0,
      "timestamp": "Wed, 01 Jan 2025 10:15:00 GMT",
      "units_sold": 188,
      "website_visits": 3500.0
    }
  ]
}

Example cURL

Test the route from a server-side app or terminal

This example uses the verified relative path selected for this model guide. Replace the token, deployment host, and request values with deployment-specific values.

cURL example
curl -X POST "/trace/engine/v1/predict/decision_tree" \
  -H "Authorization: Basic <aiml-service-token>" \
  -H "Content-Type: application/json" \
  -d '{"customerKey": "eazepredict-demo", "externalFeatures": [{"label": "website_visits", "output": [3000, 3500]}, {"label": "discount_percent", "output": [15, 20]}], "featureModel": "productSalesForecast", "featureOutput": {"label": "units_sold"}, "startDate": "Wed, 01 Jan 2025 00:00:00 GMT", "timeSeriesFrequency": 1, "timeSeriesType": "d"}'

Trust behavior

How to interpret trust signals from this model

Numeric output alone should not drive operational action. Use trust-aware fields and context checks to decide whether to escalate, review, compare, or suppress.

Model disagreement

If multiple models produce materially different outputs, treat the result as uncertain and review the operating context.

Unseen regime

If the request falls far outside historical feature ranges or known operating combinations, the prediction may be unreliable.

Suppression behavior

Responses may return null plus a trust_warning instead of a misleading number when unsafe conditions are detected.