Grid Predictions

Post a grid prediction task to the CSA Prediction Engine

The grid prediction endpoint calculates maxfit solutions across all possible combinations of attributes (independent variables). It evaluates these solutions over relevance and similarity censors, ultimately producing an adjusted-fit weighted average of all outcomes. By taking this comprehensive approach, grid prediction ensures a robust and holistic understanding of the data, making it ideal for uncovering deeper patterns and insights across multiple variable combinations without overfitting.

Whether you’re looking for high-level overviews or fine-grained control with custom settings, the grid prediction system adapts to your needs, ensuring accurate and relevant results tailored to your task. This versatile method is ideal for discovering patterns, optimizing decisions, and forecasting outcomes.

Quick Start

Getting started with the grid endpoint is straightforward. Just provide the required access ID along with the key prediction inputs: dependent variable, independent variables, and the prediction conditions. The API will then post your prediction task to the CSA Prediction Engine for processing. This approach is ideal for quickly deriving insights and making data-driven decisions, without the need for complex customizations.

post

Essential input arguments for invoking relevance-based grid predictions.

Authorizations
Header parameters
Content-TypestringOptional

The content type of the request (application/json)

Example: application/json
ConnectionstringOptional

Connection header value (keep-alive)

Example: keep-alive
Body
all ofOptional
Responses
200

Response body of a successful post job (grid).

application/json
post
Python Example
import requests
import json

url = "https://api.csanalytics.io/v2/prediction-engine/grid"

payload = {
    "y": [[18.8], [2.3], [3.0], [6.7], [15.2], [20.9], [4.0]],
    "X": [[25.0,2.0,76.0,53.7,23.1],[29.0,1.0,78.0,39.1,5.7],[32.0,2.0,77.0,54.1,5.3],[30.0,5.0,82.0,68.7,8.7],[24.0,1.0,69.0,51.0,20.3],[25.0,2.0,79.0,50.2,20.0],[35.0,3.0,80.0,51.5,9.4]],
    "theta": [[24.0, 5.0, 81.0, 60.0, 11.0]]
}

headers = {
  'x-api-key': 'CSA_API_KEY',
  'Content-Type': 'application/json',
  'Connection': 'keep-alive'
}

response = requests.request("POST", url, headers=headers, data=json.dumps(payload))

200

Response body of a successful post job (grid).

{
  "job_id": 1074,
  "job_code": "66cfc21f7effa501"
}

Custom Settings

The grid endpoint offers extensive customization options, allowing you to fine-tune prediction options. Whether you’re adjusting relevance threshold resolution or specifying attribute combinations, these settings ensure the output is precisely aligned with your objectives. This flexibility is ideal for advanced users looking to optimize predictive performance.

post

Extended specifications for invoking relevance-based grid predictions.

Authorizations
Header parameters
Content-TypestringOptional

The content type of the request (application/json)

Example: application/json
ConnectionstringOptional

Connection header value (keep-alive)

Example: keep-alive
Body
all ofOptional
Responses
200

Response body of a successful post job (grid).

application/json
post
Python Example
import requests
import json

url = "https://api.csanalytics.io/v2/prediction-engine/grid"

payload = {
    "y": [[18.8], [2.3], [3.0], [6.7], [15.2], [20.9], [4.0]],
    "X": [[25.0, 2.0, 76.0, 53.7, 23.1], [29.0, 1.0, 78.0, 39.1, 5.7], [32.0, 2.0, 77.0, 54.1, 5.3], [30.0, 5.0, 82.0, 68.7, 8.7], [24.0, 1.0, 69.0, 51.0, 20.3], [25.0, 2.0, 79.0, 50.2, 20.0], [35.0, 3.0, 80.0, 51.5, 9.4]],
    "theta": [[24.0, 5.0, 81.0, 60.0, 11.0]],
    "threshold_range": [0, 0.20, 0.50, 0.80],
    "is_threshold_percent": true,
    "most_eval": true,
    "eval_type": "both",
    "stepsize": 0.2,
    "attribute_combi": null,
    "k": 1
}

headers = {
  'x-api-key': 'CSA_API_KEY',
  'Content-Type': 'application/json',
  'Connection': 'keep-alive'
}

response = requests.request("POST", url, headers=headers, data=json.dumps(payload))

print(response.text)
200

Response body of a successful post job (grid).

{
  "job_id": 1074,
  "job_code": "66cfc21f7effa501"
}

Last updated