Partial-Sample Regression

Post a relevance-based partial sample regression prediction task to the CSA Prediction Engine

The psr (partial sample regression) endpoint implements a two-step prediction process that identifies a subset of relevant observations and forms predictions as a relevance-weighted average of past outcomes. This approach allows for more targeted insights by focusing on the most pertinent data. When the subset equals the full sample, the process converges to classical linear regression, providing a flexible solution that adapts to varying levels of relevance.

Quick Start

Getting started with the psr endpoint is straightforward. Provide the access ID along with key prediction inputs: dependent variable, independent variables, and prediction parameters. The API will submit your prediction task for partial sample regression analysis, providing rapid insights tailored to your data.

post

Essential input arguments for invoking relevance-based partial sample regression predictions.

Authorizations
x-api-keystringRequired

API key required to access the CSA Prediction Engine API

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
access_idstringRequired

User access identification string for the CSA Prediction Engine

Example: CSA_ACCESS_ID
Responses
chevron-right
200

The response body returns a job id and job code.

application/json
job_idintegerOptional

Prediction task job ID

Example: 1074
job_codestringOptional

Prediction task job code

Example: 66cfc21f7effa501
post
/psr
Python Example
200

The response body returns a job id and job code.

Custom Settings

The psr endpoint allows for extensive customization, giving you the flexibility to modify key options such as censor evaluation types, censor thresholds, and censor sign direction. These settings help refine the regression process, ensuring the outputs are tailored to the specific nuances of your experiment. Perfect for users seeking more control over the relevance-based analysis.

post

Extended specifications for invoking relevance-based partial sample regression predictions.

Authorizations
x-api-keystringRequired

API key required to access the CSA Prediction Engine API

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
access_idstringRequired

User access identification string for the CSA Prediction Engine

Example: CSA_ACCESS_ID
thresholdone ofOptional

Threshold(s) to evaluate the censor function (relevance or similarity). Accepts a single number or an array of values. For PSR, if not specified, the model evaluates across thresholds from [0, 0.99) in 0.20 increments.

Default: nullExample: 0.5
numberOptional

Single threshold value

or
number · float[]Optional

Array of threshold values [1-by-T]

verify_missing_databooleanOptional

Affects how mean and covariance are computed. When true, uses only complete rows (observations with no missing values) for mean and covariance. When false, mean and covariance use nan-aware methods (column-wise nanmean, pairwise valid counts). In both modes, rows with missing values receive zero prediction weight because relevance cannot be computed for them.

Default: falseExample: false
is_threshold_percentbooleanOptional

Specify whether the thresholds specified is in percentage (decimal) units.

Default: trueExample: true
eval_typestring · enumOptional

Specify evaluation censor type: relevance, similarity, or both.

Default: bothExample: bothPossible values:
most_evalbooleanOptional

Specify the direction of the threshold evaluation on the corresponding censor type.

  • true: [eval_type] score > threshold
  • false: [eval_type] score < threshold
Default: trueExample: true
Responses
chevron-right
200

Response body of a successful post job (psr).

application/json
job_idintegerOptional

Prediction task job ID

Example: 1074
job_codestringOptional

Prediction task job code

Example: 66cfc21f7effa501
post
/psr
Python Example
200

Response body of a successful post job (psr).

Last updated