Model guide

Random Forest Regressor

An ensemble of decision trees that improves robustness by averaging predictions across many trees instead of relying on a single path. Useful when outcomes depend on non-linear feature interactions across product usage, customer behavior, sales activity, demand, revenue, operations, or service health. Often a strong default when you want more flexibility than a linear model and more stability than a single decision tree.

Model ID: predict/randomforest 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 Random Forest 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, customer, sales, demand, operational, business, 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 customer-facing workflows.

Available endpoints

Verified route paths for Random Forest 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/randomforest

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

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

POST /train/model/randomforest

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

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

POST /train/model/randomforest/gridsearchcv

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

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

Example request

Request shape for Random Forest 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 website visits, discount levels, usage, demand, campaign activity, customer behavior, inventory, capacity, revenue, 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,
        3800
      ]
    },
    {
      "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": "randomforest",
  "prediction": [
    {
      "discount_percent": 15.0,
      "timestamp": "Wed, 01 Jan 2025 10:00:00 GMT",
      "units_sold": 174,
      "website_visits": 3000.0
    },
    {
      "discount_percent": 20.0,
      "timestamp": "Wed, 01 Jan 2025 10:15:00 GMT",
      "units_sold": 196,
      "website_visits": 3800.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/randomforest" \
  -H "Authorization: Basic <aiml-service-token>" \
  -H "Content-Type: application/json" \
  -d '{"customerKey": "eazepredict-demo", "externalFeatures": [{"label": "website_visits", "output": [3000, 3800]}, {"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 or business 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.