# Max Fit Predictions

The <mark style="color:red;">`maxfit`</mark> endpoint focuses on maximizing the fit of a relevance-based partial sample regression by evaluating [`psr`](/prediction-engine/psr.md) across a range of censors and censor thresholds. Whether you’re forecasting or analyzing outcomes, maxfit ensures that your results align closely with the underlying data patterns with confidence.

## Quick Start

Getting started with the <mark style="color:red;">`maxfit`</mark> endpoint is simple. Supply the access ID along with prediction inputs such as dependent variable, independent variables, and prediction settings. The API processes the task to optimize fit, offering valuable insights with minimal setup.

{% openapi src="<https://raw.githubusercontent.com/CambridgeSportsAnalytics/prediction_engine/refs/heads/main/docs/api_specs/basic.json>" path="/maxfit" method="post" %}
<https://raw.githubusercontent.com/CambridgeSportsAnalytics/prediction_engine/refs/heads/main/docs/api_specs/basic.json>
{% endopenapi %}

## Custom Settings

With the <mark style="color:red;">`maxfit`</mark> endpoint, you can fine-tune various settings to achieve optimal fit for your prediction tasks. Customize options like the threshold range and step-size resolution to optimize your results. This makes it ideal for users who need precision and control in their prediction task.

{% openapi src="<https://raw.githubusercontent.com/CambridgeSportsAnalytics/prediction_engine/refs/heads/main/docs/api_specs/extended.json>" path="/maxfit" method="post" %}
<https://raw.githubusercontent.com/CambridgeSportsAnalytics/prediction_engine/refs/heads/main/docs/api_specs/extended.json>
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.csanalytics.io/prediction-engine/maxfit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
