RegressionSolution - Global
-
- UpdatedJan 30, 2025
- 6 minutes to read
- Yokohama
- API reference
The RegressionSolution 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.
- Create a dataset using the DatasetDefinition API.
- Optional. Build an encoder using the Encoder API.
- Use the constructor to create a regression solution object.
- Add the solution object to the regression solution store using the RegressionSolutionStore - add() method.
- Train the solution using the submitTrainingJob() method. This creates a version of the object that you can manage using the RegressionSolutionVersion API.
- Get predictions using the RegressionSolutionVersion – predict() method.
For usage guidelines, refer to Using ML APIs.
RegressionSolution - RegressionSolution(Object config)
Creates a regression solution.
Example
The following example shows how to create an object and add it to the RegressionSolution store.
Example
The following example shows how to create an object to train using the predictedInterval property.
RegressionSolution - cancelTrainingJob()
Cancels a job for a solution object that has been submitted for training.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
None |
Example
The following example shows how to cancel an existing training job.
RegressionSolution - getActiveVersion()
Gets the active RegressionSolutionVersion object.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Object | Active RegressionSolutionVersion object. |
Example
The following example shows how to get an active RegressionSolution version from the store and return its training status.
Output:
RegressionSolution - getAllVersions()
Gets all versions of a RegressionSolution object.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Array | Existing versions of a solution object. See also RegressionSolutionVersion API. |
Example
The following example shows how to get all RegressionSolution version objects and call the getVersionNumber() and getStatus() solution version methods on them.
Output:
RegressionSolution - getLatestVersion()
Gets the latest version of a solution.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Object | RegressionSolutionVersion object corresponding to the latest version of a RegressionSolution(). |
Example
The following example shows how to get the latest version of a solution and return its training status.
Output:
RegressionSolution - getName()
Gets the name of the object to use for interaction with the store.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | Name of the solution object. |
Example
The following example shows how to update RegressionSolution dataset information and print the name of the object.
Output:
RegressionSolution - getProperties()
Gets solution object properties.
Name | Type | Description |
---|---|---|
None |
Example
The following example gets properties of a solution object in the store.
RegressionSolution - getVersion(String version)
Gets a solution by provided version number.
Name | Type | Description |
---|---|---|
version | String | Existing version number of a solution. |
Type | Description |
---|---|
Object | Specified version of the RegressionSolution() object on which you can call RegressionSolutionVersion API methods. |
Example
The following example shows how to get the training status of a solution by version number.
Output:
RegressionSolution - setActiveVersion(String version)
Activates a specified version of a solution in the store.
Name | Type | Description |
---|---|---|
version | String | Name of the RegressionSolution() object version to activate. Activating this version deactivates any other version. |
Type | Description |
---|---|
None |
Example
The following example shows how to activate a solution version in the store.
RegressionSolution - submitTrainingJob()
Submits a training job.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Object | RegressionSolutionVersion object corresponding to the RegressionSolution being trained. |
Example
The following example shows how to create a dataset, apply it to a solution, add the solution to a store, and submit the training job.
On this page
- RegressionSolution - RegressionSolution(Object config)
- RegressionSolution - cancelTrainingJob()
- RegressionSolution - getActiveVersion()
- RegressionSolution - getAllVersions()
- RegressionSolution - getLatestVersion()
- RegressionSolution - getName()
- RegressionSolution - getProperties()
- RegressionSolution - getVersion(String version)
- RegressionSolution - setActiveVersion(String version)
- RegressionSolution - submitTrainingJob()