---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# PredictabilityEstimateStore - Global

# PredictabilityEstimateStore - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Enables storing and retrieving predictability estimates.

The PredictabilityEstimateStore
API requires the Predictive Intelligence plugin (com.glide.platform_ml) and is provided within the `sn_ml` namespace.

## PredictabilityEstimateStore - add(Object mlEstimate) {#ariaid-title2}

Adds a new predictability estimate object to the store and returns a unique name.
Note:  
Label values do not need to be unique. For example, if you run this method with the same label 10 times, this method adds 10 different uniquely-named objects to the store.
{#PredictbltyEstStore-add_O__table_vwy_1fr_llb__entry__3}

| Name | Type | Description |
|-|-|-|
| mlEstimate | [PredictabilityEstimate](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PredictabilityEstimateAPI "The PredictabilityEstimate API is a scriptable object used in Predictive Intelligence stores. This object provides estimation of how predictable fields of a dataset can be, and which features can be useful for predicting those fields.") | [PredictabilityEstimate()](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PrdctbltE-PredictabilityEstimate_O "Creates a predictability estimate.") object to add to the store. |
[Table 1. Parameters]

{#PredictbltyEstStore-add_O__table_vwy_1fr_llb} {#PredictbltyEstStore-add_O__table_wwy_1fr_llb__entry__2}

| Type | Description |
|-|-|
| String | System-generated predictability estimate name. |
[Table 2. Returns]

{#PredictbltyEstStore-add_O__table_wwy_1fr_llb}  
The following example shows how to add a predictability estimate to the store. Use [PredictabilityEstimate - submitTrainingJob()](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PrdctbltE-submitTrainingJob "Submits a training job.")
to run the training job after adding it to the store.

    // Create a dataset 
    var myData = new sn_ml.DatasetDefinition({

      'tableName' : 'incident',
      'fieldNames' : ['assignment_group', 'short_description', 'description'],
      'encodedQuery' : 'activeANYTHING'

    });

    // Create an estimate 
    var myEstimate = new sn_ml.PredictabilityEstimate({

      'label': "my estimate definition",
      'dataset' : myData,
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames':['short_description']

    });

    // Add the estimate to the store to later be able to retrieve it.
    var my_unique_name = sn_ml.PredictabilityEstimateStore.add(myEstimate);

## PredictabilityEstimateStore - deleteObject(String name) {#ariaid-title3}

Removes a specified predictability estimate object from the store.
{#PredictbltyEstStore-deleteObject_S__table_rmj_lfr_llb__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | Name of the [PredictabilityEstimate()](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PrdctbltE-PredictabilityEstimate_O "Creates a predictability estimate.") object to be deleted. |
[Table 3. Parameters]

{#PredictbltyEstStore-deleteObject_S__table_rmj_lfr_llb} {#PredictbltyEstStore-deleteObject_S__table_smj_lfr_llb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 4. Returns]

{#PredictbltyEstStore-deleteObject_S__table_smj_lfr_llb}  
The following example shows how to delete a predictability estimate from the store.

    sn_ml.PredictabilityEstimateStore.deleteObject("ml_sn_global_global_estimate");

## PredictabilityEstimateStore - get(String name) {#ariaid-title4}

Gets a predictability estimate object from a store.
{#PredictbltyEstStore-get_S__table_zvw_v2r_llb__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | Name of a predictability estimate in a store. |
[Table 5. Parameters]

{#PredictbltyEstStore-get_S__table_zvw_v2r_llb} {#PredictbltyEstStore-get_S__table_aww_v2r_llb__entry__2}

| Type | Description |
|-|-|
| Object | [PredictabilityEstimate](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PredictabilityEstimateAPI "The PredictabilityEstimate API is a scriptable object used in Predictive Intelligence stores. This object provides estimation of how predictable fields of a dataset can be, and which features can be useful for predicting those fields.") object. Returns an error if the object does not exist. |
[Table 6. Returns]

{#PredictbltyEstStore-get_S__table_aww_v2r_llb}  
The following example shows how to get a predictability estimate object from the store
using the get() method and view its training status using the [PredictabilityEstimate - getActiveVersion()](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PrdctbltE-getActiveVersion "Gets the active PredictabilityEstimateVersion object.") and [PredictabilityEstimateVersion - getStatus()](https://servicenow-prod.fluidtopics.net/te3rOtHieLlcBoL_8P_Rzg#PredictbltyEstV-getStatus_B "Gets training completion status.") methods.

    // Get status
    var mlEstimate = sn_ml.PredictabilityEstimateStore.get('ml_incident_categorization');

    gs.print(JSON.stringify(JSON.parse(mlEstimate.getActiveVersion().getStatus(), null, 2)));

Output:

    {
     "state":"solution_complete",
     "percentComplete":"100",
     "hasJobEnded":"true"
    }

## PredictabilityEstimateStore - getAllNames(Object options) {#ariaid-title5}

Gets the names of all predictability estimate definition records in the
store.
{#PredictbltyEstStore-getAllNames__id_bfn_kwh_wnb__entry__3}

| Name | Type | Description |
|-|-|-|
| options | Object | Options for restricting results within the specified properties. { "label": "String", "domainName": "String", "scope": "String" }; |
| options.label | String | Optional. Label of your solution object. |
| options.domainName | String | Optional. Name of the domain for your solution object. Refer to [Domain separation and Predictive Intelligence](https://www.servicenow.com/docs/access?context=domain-separation-predictive-intelligence&version=xanadu&pubname=xanadu-intelligent-experiences&ft:locale=en-US). |
| options.scope | String | Optional. Name of an [application scope](https://www.servicenow.com/docs/access?context=c_ApplicationScope&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US) for your solution object. |
[Table 7. Parameters]

{#PredictbltyEstStore-getAllNames__id_bfn_kwh_wnb} {#PredictbltyEstStore-getAllNames__table_aww_v2r_llb__entry__2}

| Type | Description |
|-|-|
| Array | List of strings representing predictability estimate object names in the store. |
[Table 8. Returns]

{#PredictbltyEstStore-getAllNames__table_aww_v2r_llb}  
In the following example, the
getAllNames() method returns a list of all names in the
store.

    gs.print(JSON.stringify(JSON.parse(sn_ml.PredictabilityEstimateStore.getAllNames()), null, 2));

Output:

    [
      "ml_x_snc_global_global_predictability_estimate_1",
      "ml_x_snc_global_global_predictability_estimate",
      "ml_x_snc_global_global_predictability_estimate_2",
      "ml_x_snc_global_global_my_estimate_definition"
    ]

In the following example, the
getAllNames() method returns only names associated with
values set in the options parameter.

    var options = {
      'label' : 'my estimate definition',
      'domainName' : 'global',
      'scope' : 'global'
    };
    var solNames = sn_ml.PredictabilityEstimateStore.getAllNames(options);
    gs.print(JSON.stringify(JSON.parse(solNames), null, 2));

Output:

    [
      "ml_x_snc_global_global_my_estimate_definition"
    ]

## PredictabilityEstimateStore - update(String name, Object mlEstimate) {#ariaid-title6}

Updates a predictability estimate object in a store.
{#PredictbltyEstStore-update_S_O__table_v5p_wxr_llb__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | Name of the predictability estimate to update. |
| mlEstimate | [PredictabilityEstimate](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PredictabilityEstimateAPI "The PredictabilityEstimate API is a scriptable object used in Predictive Intelligence stores. This object provides estimation of how predictable fields of a dataset can be, and which features can be useful for predicting those fields.") | [PredictabilityEstimate()](https://servicenow-prod.fluidtopics.net/13sZDEHepHKxiQarQCAddQ#PrdctbltE-PredictabilityEstimate_O "Creates a predictability estimate.") object properties to update. |
[Table 9. Parameters]

{#PredictbltyEstStore-update_S_O__table_v5p_wxr_llb} {#PredictbltyEstStore-update_S_O__table_w5p_wxr_llb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 10. Returns]

{#PredictbltyEstStore-update_S_O__table_w5p_wxr_llb}  
The following example shows how to update a predictability estimate object in the
store.

    var estimateUpdate = new sn_ml.PredictabilityEstimate({
      'label': 'my estimate definition',
      'dataset' : myData,
      'predictedFieldName' : 'assignment_group',
      'inputFieldNames': ['short_description']
    });

    sn_ml.PredictabilityEstimateStore.update('ml_sn_global_global_incident_service', estimateUpdate);


