--- title: ClassificationSolutionVersion - Global description: The ClassificationSolutionVersion API is a scriptable object used in Predictive Intelligence stores.Calculates solution precision and coverage.Gets estimated precision, estimated coverage, estimated recall values from the ML Solutions \[ml\_solution\] table and records from the Class Confidence \[ml\_class\] table.Gets solution object properties and version number.Gets training completion status.Gets all the training statistics for a given solution.Gets the version number of a solution object.Gets the input data for a prediction.Sets precision, coverage, or recall values at solution level or class level. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/ClassificationSolutionVersionAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 12 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # ClassificationSolutionVersion- Global The ClassificationSolutionVersion API is a scriptable object used in Predictive Intelligence stores. This API requires the Predictive Intelligence plugin \(com.glide.platform\_ml\) and is provided within the `sn_ml` namespace. This API is used for working with solution versions based on [ClassificationSolution API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) objects in the [ClassificationSolution store](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionStoreAPI.md). The system creates a solution version each time you train a solution definition. Most versions are created during scheduled solution training. Methods in this API are accessible using the following [ClassificationSolution - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) methods: - [getActiveVersion\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) - [getAllVersions\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) - [getLatestVersion\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) - [getVersion\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## ClassificationSolutionVersion - getPredictionPerformance\(Object options\) Calculates solution precision and coverage. To use this method, you must first create settings using the setPredictionSettings\(\) method.
| Name | Type | Description |
|---|---|---|
| options | Object | Selects a metric to retrieve within a span of dates. For more information, see [Configuring target metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configuring-target-metrics-trained-classification-solution.md).``` { "fromDate": "String", "metricName": "String", "toDate": "String" } ``` |
| options.fromDate | String | Optional. Start date from which to retrieve metrics in system date time format. |
| options.metricName | String | Name of the metric.Valid values: - **precision** - **coverage** |
| options.toDate | String | Optional. End date from which to retrieve metrics.Formnt: System date time format. |
| Type | Description |
|---|---|
| Object | Parseable JavaScript object containing the results for the input metric.``` { "metricName" : "String", "metricValue" : "String", "numberOfPredictionsConsidered" : "String" } ``` |
| Object.metricName | Name of metric selected as input.Data type: String |
| Object.metricValue | Value of the selected metric.Data type: String |
| Object.numberOfRecordsConsidered | Number of records in the Predictor Results \[ml\_predictor\_results\] table considered for calculations.Data type: String |
| Type | Description |
|---|---|
| Object |
Returns prediction settings for each class. Data includes precision, coverage, recall, and distribution values of all classes included in the trained model from the ML Solutions \[ml\_solution\] table. For details, see [Predictive model components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/predictive-intelligence.md).```
{
" |
| <Object>.<class name> | Training statistics data from the Class Confidence \[ml\_class\] table. For more information, see [Configuring target metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configuring-target-metrics-trained-classification-solution.md).Data type: Object ``` { "precision": "String", "coverage": "String", "recall": "String" } ``` |
| <Object>.<class name>.precision | Estimated solution precision metric for this class.Data type: String \(numerical value\) |
| <Object>.<class name>.coverage | Estimated solution coverage metric for this class.Data type: String \(numerical value\) |
| <Object>.<class name>.recall | Estimated solution recall metric for this class.Data type: String \(numerical value\) |
| Type | Description |
|---|---|
| Object | Contents of the Dataset and [ClassificationSolution](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) version details. Results vary by object property setup.``` { "algorithmConfig": { "algorithm": "String", "targetClassRecall": "String" }, "datasetProperties": {Object}, "domainName": "String", "encoder": {Object}, "groupByFieldName": "String", "inputFieldNames": [Array], "isActive": Boolean, "label": "String", "name": "String", "predictedFieldName": "String", "processingLanguage": "String", "scope": "String", "stopwords": [Array], "stopwords": [Array], "trainingFrequency": "String", "versionNumber": "Number" } ``` |
| <Object>.algorithmConfig | Method for encoding the solution. Data type: Object |
| <Object>.algorithmConfig.algorithm | Name of the encoding algorithm for training this solution. Possible values: - **xgboost**: XGBoost encoding to optimize the training. - **logisticRegression**: Method using the logistic regression model for categorical targets such as nominal or ordinal. Data type: String |
| <Object>.algorithmConfig.targetClassRecall | Class recall parameter to steer a solution's training to bias a specific class. The recall value is a number between 0 and 100 representing a percentage.Data type: String |
| <Object>.datasetProperties | Lists the properties of the [DatasetDefinition\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DatasetDefinitionAPI.md) object associated with the solution. Data type: Object ``` { "encodedQuery": "String", "fieldDetails": [Array], "fieldNames": [Array], "tableName": "String" } ``` |
| <Object>.datasetProperties.tableName | Name of the table for the dataset. For example, `"tableName" : "Incident"`. Data type: String |
| <Object>.datasetProperties.fieldNames | List of field names from the specified table as strings. For example, `"fieldNames" : ["short_description", "priority"]`. Data type: Array |
| <Object>.datasetProperties.fieldNames.fieldDetails | List of JavaScript objects that specify field properties. Data type: Array of Objects ``` [ { "name": "String", "type": "String" } ] ``` |
| <Object>.datasetProperties.fieldNames.fieldDetails.<object>.name | Name of the field defining the type of information to restrict this dataset to. Data type: String |
| <Object>.datasetProperties.fieldDetails.<object>.type | Machine-learning field type. Data type: String |
| <Object>.datasetProperties.fieldDetails.encodedQuery | Encoded query string in the standard platform format. See [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).Data type: String. |
| <Object>.domainName | Domain name associated with this dataset. See [Domain separation and Predictive Intelligence](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/domain-separation-predictive-intelligence.md).Type: String |
| <Object>.encoder | Encoder object assigned to this solution. See [Encoder - Encoder\(Object config\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/EncoderAPI.md).Data type: Object |
| <Object>.groupByFieldName | Field name by which the system groups records to build classification solutions. Data type: String |
| <Object>.inputFieldNames | List of input field names as strings. The model uses these fields used to make predictions. Data type: String |
| <Object>.isActive | Flag that indicates whether this version is active.Valid values: - true: Version is active. - false: Version is not active. Data type: String |
| <Object>.label | Identifies the prediction task. ``` { "label": "my first prediction" } ``` Data type: String |
| <Object>.name | System-assigned name. Data type: String |
| <Object>.predictedFieldName | Identifies a field to be trained for predictability. Data type: String |
| <Object>.processingLanguage | Processing language in two-letter ISO 639-1 language code format. Data type: String |
| <Object>.scope | Object scope. Currently the only valid value is `global`.Data type: String |
| <Object>.stopwords | Optional. Preset list of strings that the system automatically generates based on the **language** property setting. For details, see [Create a custom stopwords list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/create-custom-stopwords-list.md). Data type: Array |
| <Object>.trainingFrequency | The frequency to retrain the model. Possible values: - every\_30\_days - every\_60\_days - every\_90\_days - every\_120\_days - every\_180\_days - run\_once Default: run\_once Data type: String |
| <Object>.versionNumber | Version number of the ClassificationSolution object.Data type: String |
| Name | Type | Description |
|---|---|---|
| includeDetails | Boolean | Flag that indicates whether to return status **details**.Valid values: - true: Return additional details. - false: Don't return additional details. Default: False |
| Type | Description |
|---|---|
| Object | JavaScript object containing training status information for a [ClassificationSolution](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionAPI.md) object.``` { "state": "String", "percentComplete": "Number as a String", "hasJobEnded": "Boolean value as a String", "details": {Object} } ``` |
| <Object>.state | Training completion state. If the training job reaches a terminal state, the job does not leave that state. If the state is terminal, the **hasJobEnded** property is set to `true`.Possible values: - `fetching_files_for_training` - `preparing_data` - `retry` - `solution_cancelled` \(terminal\) - `solution_complete`\(terminal\) - `solution_error` \(terminal\) - `solution_incomplete` - `training_request_received` - `training_request_timed_out` \(terminal\) - `training_solution` - `uploading_solution` - `waiting_for_training` Data type: String |
| <Object>.hasJobEnded | Flag that indicates whether training is complete.Valid values: - true: Training is complete. - false: Training is incomplete. Data type: Boolean value as a String |
| <Object>.percentComplete | Training percent complete. If the completion percentage is less than 100, the job might be in a terminal state. For example, if training times out.Data type: Number as a String Range: 0 thru 100 |
| <Object>.details | Object containing a list of additional training details.Data type: Object |
| Type | Description |
|---|---|
| Object | JavaScript object with statistics for each class included in training and values for each class that was excluded from training. For details, see [Predictive model components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/predictive-intelligence.md).``` { "includedClasses": {Object}, "excludedClasses": {Object} } ``` |
| <Object>.includedClasses |
Object containing precision, coverage, recall, and distribution values of each class in the trained model.Data type: Object
```
"includedClasses": {
" |
| <Object>.includedClasses.<class name>.distribution | Value of the outcome probability distribution for this class.Data type: String |
| <Object>.includedClasses.<class name>.statistics | List of objects providing training statistics data. For more information, see [Configuring target metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configuring-target-metrics-trained-classification-solution.md).Data type: Array of Objects ``` [ { "coverage": "String", "precision": "String", "recall": "String", "selected": "String" } ] ``` |
| <Object>.includedClasses.<class name>.statistics.coverage | Estimated solution coverage metric for this class.Data type: String \(numerical value\) |
| <Object>.includedClasses.<class name>.statistics.precision | Estimated solution precision metric for this class.Data type: String \(numerical value\) |
| <Object>.includedClasses.<class name>.statistics.recall | Estimated solution recall metric for this class.Data type: String \(numerical value\) |
| <Object>.includedClasses.<class name>.statistics.selected | Flag that indicates whether this class contains records included in solution training.Valid values: - true: This class contains records selected for training the solution. - false: This class is excluded from training. Data type: String \(Boolean value\) Default: false |
| <Object>.excludedClasses |
Distribution and row count of all the classes excluded from training.Data type: Object
```
"excludedClasses": {
" |
| <Object>.excludedClasses.<class name>.distribution | Value of the outcome probability distribution for this class.Data type: String |
| <Object>.excludedClasses.<class name>.rowCount | Number of rows excluded from training.Data type: String \(numerical value\) |
| Name | Type | Description |
|---|---|---|
| input | Object | [GlideRecord](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideRecordAPI.md) or array of JSON objects containing field names and values as key-value pairs. |
| options | Object | Optional values for filtering prediction results.``` { "apply_threshold": Boolean, "top_n": Number } ``` |
| options.apply\_threshold | Boolean | Flag that indicates whether to check the threshold value for the solution and apply it to the result set.Valid values: - true: Return results in which confidence is greater than threshold. - false: Return all results. Default: True |
| options.top\_n | Number | If provided, returns the top results, up to the specified number of predictions. |
| Type | Description |
|---|---|
| Object |
JSON object containing the prediction results sorted by sys\_id or record\_number. ```
{
|
| <Object>.<identifier> |
List of objects with details for each prediction result.Data type: Array of Objects
```
|
| <Object>.<identifier>.<object>.confidence | Value of the confidence associated with the prediction. For example, 53.84. Data type: Number |
| <Object>.<identifier>.<object>.predictedSysId | The sys\_id of the predicted value. Results can be from any table on which information is being predicted. Data type: String |
| <Object>.<identifier>.<object>.predictedValue | Value representing the prediction result. Data type: String |
| <Object>.<identifier>.<object>.threshold | Value of the configured threshold associated with the prediction. Data type: Number |
| Name | Type | Description |
|---|---|---|
| options | Object | Metric configuration values. For information about these features, see [Configuring target metrics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configuring-target-metrics-trained-classification-solution.md).``` { "metricName" : "String", "metricValue" : "String", "className" : "String" } ``` |
| options.metricName | String | Name of the metric to set.Valid values: - **coverage** - **precision** - **recall** |
| options.metricValue | String | Numeric value to assign to the metric. |
| options.className | String | Optional. Name of the class to restrict results to. Use the [getTrainingStatistics\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/ClassificationSolutionVersionAPI.md) method to retrieve a complete list of classes for a solution. |