---
title: Scoring Code for time series projects
description: How to use the Scoring Code feature for qualifying time series models, allowing you to use DataRobot-generated models outside of the DataRobot platform.

---

# Scoring Code for time series projects {: #scoring-code-for-time-series-projects }

[Scoring Code](scoring-code/index) is a portable, low-latency method of utilizing DataRobot models outside of the DataRobot application. You can export time series models in a Java-based Scoring Code package from:

* The [Leaderboard](sc-download-leaderboard): (**Leaderboard > Predict > Portable Predictions**)

* A [deployment](sc-download-deployment): (**Deployments > Predictions > Portable Predictions**)

{% include 'includes/scoring-code-consider-ts.md' %}

## Time series parameters for CLI scoring {: #time-series-parameters-for-cli-scoring }

DataRobot supports using [scoring at the command line](scoring-cli). The following table describes the time series parameters:

|  Field  | Required? | Default| Description  |
|---------|-----------|--------------|--------------|
| `--forecast_point=<value>` | No | None | Formatted date from which to forecast. |
| `--date_format=<value>` | No | None | Date format to use for output.
| `--predictions_start_date=<value>` | No | None | Timestamp that indicates when to start calculating predictions. |
| `--predictions_end_date=<value>` | No | None | Timestamp that indicates when to stop calculating predictions.
| `--with_intervals` | No | None | Turns on prediction interval calculations. |
| `--interval_length=<value>` | No | None |Interval length as `int` value from 1 to 99. |
| `--time_series_batch_processing` | No | Disabled | Enables performance-optimized batch processing for time-series models. |


## Scoring Code for segmented modeling projects {: #scoring-code-for-segmented-modeling-projects }

With [segmented modeling](ts-segmented), you can build individual models for segments of a multiseries project. DataRobot then merges these models into a Combined Model.

!!! note
     Scoring Code support is available for segments defined by an ID column in the dataset, not segments discovered by a clustering model.

### Verify that segment models have Scoring Code {: #verify-that-segment-models-have-scoring-code }

If the champion model for a segment does not have Scoring Code, select a model that does have Scoring Code:

1. Navigate to the Combined Model on the Leaderboard.

     ![](images/sc-segmented-combined-model.png)

2. From the **Segment** dropdown menu, select a segment. Locate the champion for the segment (designated by the SEGMENT CHAMPION [indicator](leaderboard-ref#tags-and-indicators)).

    ![](images/sc-segmented-no-scoring-code.png)

3. If the segment champion does not have a SCORING CODE indicator, select a new model that meets your modeling requirements and has the SCORING CODE indicator. Then select **Leaderboard options > Mark Model as Champion** from the **Menu** at the top.

    ![](images/sc-segmented-mark-champion.png)

    The segment now has a segment champion with Scoring Code:

    ![](images/sc-segmented-scoring-code.png)

4. Repeat the process for each segment of the Combined Model to ensure that all of the segment champions have Scoring Code.

### Download Scoring Code for a Combined Model {: #download-scoring-code-for-a-combined-model }

To download the Scoring Code JAR for a Combined Model:

* From the leaderboard: [Download the Scoring Code](sc-download-leaderboard) from the Combined Model.

* From a deployment: [Deploy your Combined Model](deploy-model), ensure that [each segment has Scoring Code](#verify-that-segment-models-have-scoring-code), and [download the Scoring Code](sc-download-deployment) from the Combined Model deployment.


## Prediction intervals in Scoring Code {: #prediction-intervals-in-scoring-code }

You can now include prediction intervals in the downloaded Scoring Code JAR for a time series model. Supported intervals are 1 to 99.

### Download Scoring Code with prediction intervals {: #download-scoring-code-with-prediction-intervals }

To download the Scoring Code JAR with prediction intervals enabled:

* From the leaderboard: [Download the Scoring Code](sc-download-leaderboard) with **Include Prediction Intervals** enabled.

* From a deployment: [Deploy your model](deploy-model) and [download the Scoring Code](sc-download-deployment) with **Include Prediction Intervals** enabled.

### CLI example using prediction intervals {: #cli-example-using-prediction-intervals }

The following is a CLI example for scoring models using prediction intervals:

``` bash
java -jar model.jar csv \
	--input=syph.csv \
	--output=output.csv \
	--with_intervals \
	--interval_length=87
```
