You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.MachineLearning

Inherits:
AWS.Service show all
Identifier:
machinelearning
API Version:
2014-12-12
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Definition of the public APIs exposed by Amazon Machine Learning

Sending a Request Using MachineLearning

var machinelearning = new AWS.MachineLearning();
machinelearning.addTags(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the MachineLearning object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var machinelearning = new AWS.MachineLearning({apiVersion: '2014-12-12'});

You can also set the API version globally in AWS.config.apiVersions using the machinelearning service identifier:

AWS.config.apiVersions = {
  machinelearning: '2014-12-12',
  // other service API versions
};

var machinelearning = new AWS.MachineLearning();

Version:

  • 2014-12-12

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

dataSourceAvailable, mLModelAvailable, evaluationAvailable, batchPredictionAvailable

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, defineService

Constructor Details

new AWS.MachineLearning(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a MachineLearning object

var machinelearning = new AWS.MachineLearning({apiVersion: '2014-12-12'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.MachineLearning.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.MachineLearning.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MachineLearning.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

addTags(params = {}, callback) ⇒ AWS.Request

Adds one or more tags to an object, up to a limit of 10. Each tag consists of a key and an optional value. If you add a tag using a key that is already associated with the ML object, AddTags updates the tag's value.

Service Reference:

Examples:

Calling the addTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  ResourceType: BatchPrediction | DataSource | Evaluation | MLModel, /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
machinelearning.addTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Tags — (Array<map>)

      The key-value pairs to use to create tags. If you specify a key without specifying a value, Amazon ML creates a tag with the specified key and a value of null.

      • Key — (String)

        A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

      • Value — (String)

        An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

    • ResourceId — (String)

      The ID of the ML object to tag. For example, exampleModelId.

    • ResourceType — (String)

      The type of the ML object to tag.

      Possible values include:
      • "BatchPrediction"
      • "DataSource"
      • "Evaluation"
      • "MLModel"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceId — (String)

        The ID of the ML object that was tagged.

      • ResourceType — (String)

        The type of the ML object that was tagged.

        Possible values include:
        • "BatchPrediction"
        • "DataSource"
        • "Evaluation"
        • "MLModel"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createBatchPrediction(params = {}, callback) ⇒ AWS.Request

Generates predictions for a group of observations. The observations to process exist in one or more data files referenced by a DataSource. This operation creates a new BatchPrediction, and uses an MLModel and the data files referenced by the DataSource as information sources.

CreateBatchPrediction is an asynchronous operation. In response to CreateBatchPrediction, Amazon Machine Learning (Amazon ML) immediately returns and sets the BatchPrediction status to PENDING. After the BatchPrediction completes, Amazon ML sets the status to COMPLETED.

You can poll for status updates by using the GetBatchPrediction operation and checking the Status parameter of the result. After the COMPLETED status appears, the results are available in the location specified by the OutputUri parameter.

Service Reference:

Examples:

Calling the createBatchPrediction operation

var params = {
  BatchPredictionDataSourceId: 'STRING_VALUE', /* required */
  BatchPredictionId: 'STRING_VALUE', /* required */
  MLModelId: 'STRING_VALUE', /* required */
  OutputUri: 'STRING_VALUE', /* required */
  BatchPredictionName: 'STRING_VALUE'
};
machinelearning.createBatchPrediction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BatchPredictionId — (String)

      A user-supplied ID that uniquely identifies the BatchPrediction.

    • BatchPredictionName — (String)

      A user-supplied name or description of the BatchPrediction. BatchPredictionName can only use the UTF-8 character set.

    • MLModelId — (String)

      The ID of the MLModel that will generate predictions for the group of observations.

    • BatchPredictionDataSourceId — (String)

      The ID of the DataSource that points to the group of observations to predict.

    • OutputUri — (String)

      The location of an Amazon Simple Storage Service (Amazon S3) bucket or directory to store the batch prediction results. The following substrings are not allowed in the s3 key portion of the outputURI field: ':', '//', '/./', '/../'.

      Amazon ML needs permissions to store and retrieve the logs on your behalf. For information about how to set permissions, see the Amazon Machine Learning Developer Guide.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BatchPredictionId — (String)

        A user-supplied ID that uniquely identifies the BatchPrediction. This value is identical to the value of the BatchPredictionId in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDataSourceFromRDS(params = {}, callback) ⇒ AWS.Request

Creates a DataSource object from an Amazon Relational Database Service (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations.

If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response.

Service Reference:

Examples:

Calling the createDataSourceFromRDS operation

var params = {
  DataSourceId: 'STRING_VALUE', /* required */
  RDSData: { /* required */
    DatabaseCredentials: { /* required */
      Password: 'STRING_VALUE', /* required */
      Username: 'STRING_VALUE' /* required */
    },
    DatabaseInformation: { /* required */
      DatabaseName: 'STRING_VALUE', /* required */
      InstanceIdentifier: 'STRING_VALUE' /* required */
    },
    ResourceRole: 'STRING_VALUE', /* required */
    S3StagingLocation: 'STRING_VALUE', /* required */
    SecurityGroupIds: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    SelectSqlQuery: 'STRING_VALUE', /* required */
    ServiceRole: 'STRING_VALUE', /* required */
    SubnetId: 'STRING_VALUE', /* required */
    DataRearrangement: 'STRING_VALUE',
    DataSchema: 'STRING_VALUE',
    DataSchemaUri: 'STRING_VALUE'
  },
  RoleARN: 'STRING_VALUE', /* required */
  ComputeStatistics: true || false,
  DataSourceName: 'STRING_VALUE'
};
machinelearning.createDataSourceFromRDS(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      A user-supplied ID that uniquely identifies the DataSource. Typically, an Amazon Resource Number (ARN) becomes the ID for a DataSource.

    • DataSourceName — (String)

      A user-supplied name or description of the DataSource.

    • RDSData — (map)

      The data specification of an Amazon RDS DataSource:

      • DatabaseInformation -

        • DatabaseName - The name of the Amazon RDS database.

        • InstanceIdentifier - A unique identifier for the Amazon RDS database instance.

      • DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.

      • ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see Role templates for data pipelines.

      • ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

      • SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [SubnetId, SecurityGroupIds] pair for a VPC-based RDS DB instance.

      • SelectSqlQuery - A query that is used to retrieve the observation data for the Datasource.

      • S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

      • DataSchemaUri - The Amazon S3 location of the DataSchema.

      • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

      • DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the Datasource.

        Sample - "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

      • DatabaseInformationrequired — (map)

        Describes the DatabaseName and InstanceIdentifier of an Amazon RDS database.

        • InstanceIdentifierrequired — (String)

          The ID of an RDS DB instance.

        • DatabaseNamerequired — (String)

          The name of a database hosted on an RDS DB instance.

      • SelectSqlQueryrequired — (String)

        The query that is used to retrieve the observation data for the DataSource.

      • DatabaseCredentialsrequired — (map)

        The AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon RDS database.

        • Usernamerequired — (String)

          The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

        • Passwordrequired — (String)

          The password to be used by Amazon ML to connect to a database on an RDS DB instance. The password should have sufficient permissions to execute the RDSSelectQuery query.

      • S3StagingLocationrequired — (String)

        The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using SelectSqlQuery is stored in this location.

      • DataRearrangement — (String)

        A JSON string that represents the splitting and rearrangement processing to be applied to a DataSource. If the DataRearrangement parameter is not provided, all of the input data is used to create the Datasource.

        There are multiple parameters that control what data is used to create a datasource:

        • percentBegin

          Use percentBegin to indicate the beginning of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • percentEnd

          Use percentEnd to indicate the end of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • complement

          The complement parameter instructs Amazon ML to use the data that is not included in the range of percentBegin to percentEnd to create a datasource. The complement parameter is useful if you need to create complementary datasources for training and evaluation. To create a complementary datasource, use the same values for percentBegin and percentEnd, along with the complement parameter.

          For example, the following two datasources do not share any data, and can be used to train and evaluate a model. The first datasource has 25 percent of the data, and the second one has 75 percent of the data.

          Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}

          Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25, "complement":"true"}}

        • strategy

          To change how Amazon ML splits the data for a datasource, use the strategy parameter.

          The default value for the strategy parameter is sequential, meaning that Amazon ML takes all of the data records between the percentBegin and percentEnd parameters for the datasource, in the order that the records appear in the input data.

          The following two DataRearrangement lines are examples of sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential", "complement":"true"}}

          To randomly split the input data into the proportions indicated by the percentBegin and percentEnd parameters, set the strategy parameter to random and provide a string that is used as the seed value for the random data splitting (for example, you can use the S3 path to your data as the random seed string). If you choose the random split strategy, Amazon ML assigns each row of data a pseudo-random number between 0 and 100, and then selects the rows that have an assigned number between percentBegin and percentEnd. Pseudo-random numbers are assigned using both the input seed string value and the byte offset as a seed, so changing the data results in a different split. Any existing ordering is preserved. The random splitting strategy ensures that variables in the training and evaluation data are distributed similarly. It is useful in the cases where the input data may have an implicit sort order, which would otherwise result in training and evaluation datasources containing non-similar data records.

          The following two DataRearrangement lines are examples of non-sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}

      • DataSchema — (String)

        A JSON string that represents the schema for an Amazon RDS DataSource. The DataSchema defines the structure of the observation data in the data file(s) referenced in the DataSource.

        A DataSchema is not required if you specify a DataSchemaUri

        Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames have an array of key-value pairs for their value. Use the following format to define your DataSchema.

        { "version": "1.0",

        "recordAnnotationFieldName": "F1",

        "recordWeightFieldName": "F2",

        "targetFieldName": "F3",

        "dataFormat": "CSV",

        "dataFileContainsHeader": true,

        "attributes": [

        { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType": "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName": "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL" }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType": "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE" } ],

        "excludedVariableNames": [ "F6" ] }

      • DataSchemaUri — (String)

        The Amazon S3 location of the DataSchema.

      • ResourceRolerequired — (String)

        The role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute Cloud (Amazon EC2) instance to carry out the copy operation from Amazon RDS to an Amazon S3 task. For more information, see Role templates for data pipelines.

      • ServiceRolerequired — (String)

        The role (DataPipelineDefaultRole) assumed by AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

      • SubnetIdrequired — (String)

        The subnet ID to be used to access a VPC-based RDS DB instance. This attribute is used by Data Pipeline to carry out the copy task from Amazon RDS to Amazon S3.

      • SecurityGroupIdsrequired — (Array<String>)

        The security group IDs to be used to access a VPC-based RDS DB instance. Ensure that there are appropriate ingress rules set up to allow access to the RDS DB instance. This attribute is used by Data Pipeline to carry out the copy operation from Amazon RDS to an Amazon S3 task.

    • RoleARN — (String)

      The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's account and copy data using the SelectSqlQuery query from Amazon RDS to Amazon S3.

    • ComputeStatistics — (Boolean)

      The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        A user-supplied ID that uniquely identifies the datasource. This value should be identical to the value of the DataSourceID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDataSourceFromRedshift(params = {}, callback) ⇒ AWS.Request

Creates a DataSource from a database hosted on an Amazon Redshift cluster. A DataSource references data that can be used to perform either CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

CreateDataSourceFromRedshift is an asynchronous operation. In response to CreateDataSourceFromRedshift, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in COMPLETED or PENDING states can be used to perform only CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

If Amazon ML can't accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response.

The observations should be contained in the database hosted on an Amazon Redshift cluster and should be specified by a SelectSqlQuery query. Amazon ML executes an Unload command in Amazon Redshift to transfer the result set of the SelectSqlQuery query to S3StagingLocation.

After the DataSource has been created, it's ready for use in evaluations and batch predictions. If you plan to use the DataSource to train an MLModel, the DataSource also requires a recipe. A recipe describes how each input variable will be used in training an MLModel. Will the variable be included or excluded from training? Will the variable be manipulated; for example, will it be combined with another variable or will it be split apart into word combinations? The recipe provides answers to these questions.

You can't change an existing datasource, but you can copy and modify the settings from an existing Amazon Redshift datasource to create a new datasource. To do so, call GetDataSource for an existing datasource and copy the values to a CreateDataSource call. Change the settings that you want to change and make sure that all required fields have the appropriate values.

Service Reference:

Examples:

Calling the createDataSourceFromRedshift operation

var params = {
  DataSourceId: 'STRING_VALUE', /* required */
  DataSpec: { /* required */
    DatabaseCredentials: { /* required */
      Password: 'STRING_VALUE', /* required */
      Username: 'STRING_VALUE' /* required */
    },
    DatabaseInformation: { /* required */
      ClusterIdentifier: 'STRING_VALUE', /* required */
      DatabaseName: 'STRING_VALUE' /* required */
    },
    S3StagingLocation: 'STRING_VALUE', /* required */
    SelectSqlQuery: 'STRING_VALUE', /* required */
    DataRearrangement: 'STRING_VALUE',
    DataSchema: 'STRING_VALUE',
    DataSchemaUri: 'STRING_VALUE'
  },
  RoleARN: 'STRING_VALUE', /* required */
  ComputeStatistics: true || false,
  DataSourceName: 'STRING_VALUE'
};
machinelearning.createDataSourceFromRedshift(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      A user-supplied ID that uniquely identifies the DataSource.

    • DataSourceName — (String)

      A user-supplied name or description of the DataSource.

    • DataSpec — (map)

      The data specification of an Amazon Redshift DataSource:

      • DatabaseInformation -

        • DatabaseName - The name of the Amazon Redshift database.

        • ClusterIdentifier - The unique ID for the Amazon Redshift cluster.

      • DatabaseCredentials - The AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon Redshift database.

      • SelectSqlQuery - The query that is used to retrieve the observation data for the Datasource.

      • S3StagingLocation - The Amazon Simple Storage Service (Amazon S3) location for staging Amazon Redshift data. The data retrieved from Amazon Redshift using the SelectSqlQuery query is stored in this location.

      • DataSchemaUri - The Amazon S3 location of the DataSchema.

      • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

      • DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the DataSource.

        Sample - "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

      • DatabaseInformationrequired — (map)

        Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.

        • DatabaseNamerequired — (String)

          The name of a database hosted on an Amazon Redshift cluster.

        • ClusterIdentifierrequired — (String)

          The ID of an Amazon Redshift cluster.

      • SelectSqlQueryrequired — (String)

        Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift DataSource.

      • DatabaseCredentialsrequired — (map)

        Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.

        • Usernamerequired — (String)

          A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

        • Passwordrequired — (String)

          A password to be used by Amazon ML to connect to a database on an Amazon Redshift cluster. The password should have sufficient permissions to execute a RedshiftSelectSqlQuery query. The password should be valid for an Amazon Redshift USER.

      • S3StagingLocationrequired — (String)

        Describes an Amazon S3 location to store the result set of the SelectSqlQuery query.

      • DataRearrangement — (String)

        A JSON string that represents the splitting and rearrangement processing to be applied to a DataSource. If the DataRearrangement parameter is not provided, all of the input data is used to create the Datasource.

        There are multiple parameters that control what data is used to create a datasource:

        • percentBegin

          Use percentBegin to indicate the beginning of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • percentEnd

          Use percentEnd to indicate the end of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • complement

          The complement parameter instructs Amazon ML to use the data that is not included in the range of percentBegin to percentEnd to create a datasource. The complement parameter is useful if you need to create complementary datasources for training and evaluation. To create a complementary datasource, use the same values for percentBegin and percentEnd, along with the complement parameter.

          For example, the following two datasources do not share any data, and can be used to train and evaluate a model. The first datasource has 25 percent of the data, and the second one has 75 percent of the data.

          Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}

          Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25, "complement":"true"}}

        • strategy

          To change how Amazon ML splits the data for a datasource, use the strategy parameter.

          The default value for the strategy parameter is sequential, meaning that Amazon ML takes all of the data records between the percentBegin and percentEnd parameters for the datasource, in the order that the records appear in the input data.

          The following two DataRearrangement lines are examples of sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential", "complement":"true"}}

          To randomly split the input data into the proportions indicated by the percentBegin and percentEnd parameters, set the strategy parameter to random and provide a string that is used as the seed value for the random data splitting (for example, you can use the S3 path to your data as the random seed string). If you choose the random split strategy, Amazon ML assigns each row of data a pseudo-random number between 0 and 100, and then selects the rows that have an assigned number between percentBegin and percentEnd. Pseudo-random numbers are assigned using both the input seed string value and the byte offset as a seed, so changing the data results in a different split. Any existing ordering is preserved. The random splitting strategy ensures that variables in the training and evaluation data are distributed similarly. It is useful in the cases where the input data may have an implicit sort order, which would otherwise result in training and evaluation datasources containing non-similar data records.

          The following two DataRearrangement lines are examples of non-sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}

      • DataSchema — (String)

        A JSON string that represents the schema for an Amazon Redshift DataSource. The DataSchema defines the structure of the observation data in the data file(s) referenced in the DataSource.

        A DataSchema is not required if you specify a DataSchemaUri.

        Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames have an array of key-value pairs for their value. Use the following format to define your DataSchema.

        { "version": "1.0",

        "recordAnnotationFieldName": "F1",

        "recordWeightFieldName": "F2",

        "targetFieldName": "F3",

        "dataFormat": "CSV",

        "dataFileContainsHeader": true,

        "attributes": [

        { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType": "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName": "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL" }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType": "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE" } ],

        "excludedVariableNames": [ "F6" ] }

      • DataSchemaUri — (String)

        Describes the schema location for an Amazon Redshift DataSource.

    • RoleARN — (String)

      A fully specified role Amazon Resource Name (ARN). Amazon ML assumes the role on behalf of the user to create the following:

      • A security group to allow Amazon ML to execute the SelectSqlQuery query on an Amazon Redshift cluster

      • An Amazon S3 bucket policy to grant Amazon ML read/write permissions on the S3StagingLocation

    • ComputeStatistics — (Boolean)

      The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        A user-supplied ID that uniquely identifies the datasource. This value should be identical to the value of the DataSourceID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDataSourceFromS3(params = {}, callback) ⇒ AWS.Request

Creates a DataSource object. A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.

CreateDataSourceFromS3 is an asynchronous operation. In response to CreateDataSourceFromS3, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource has been created and is ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used to perform only CreateMLModel, CreateEvaluation or CreateBatchPrediction operations.

If Amazon ML can't accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response.

The observation data used in a DataSource should be ready to use; that is, it should have a consistent structure, and missing data values should be kept to a minimum. The observation data must reside in one or more .csv files in an Amazon Simple Storage Service (Amazon S3) location, along with a schema that describes the data items by name and type. The same schema must be used for all of the data files referenced by the DataSource.

After the DataSource has been created, it's ready to use in evaluations and batch predictions. If you plan to use the DataSource to train an MLModel, the DataSource also needs a recipe. A recipe describes how each input variable will be used in training an MLModel. Will the variable be included or excluded from training? Will the variable be manipulated; for example, will it be combined with another variable or will it be split apart into word combinations? The recipe provides answers to these questions.

Service Reference:

Examples:

Calling the createDataSourceFromS3 operation

var params = {
  DataSourceId: 'STRING_VALUE', /* required */
  DataSpec: { /* required */
    DataLocationS3: 'STRING_VALUE', /* required */
    DataRearrangement: 'STRING_VALUE',
    DataSchema: 'STRING_VALUE',
    DataSchemaLocationS3: 'STRING_VALUE'
  },
  ComputeStatistics: true || false,
  DataSourceName: 'STRING_VALUE'
};
machinelearning.createDataSourceFromS3(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      A user-supplied identifier that uniquely identifies the DataSource.

    • DataSourceName — (String)

      A user-supplied name or description of the DataSource.

    • DataSpec — (map)

      The data specification of a DataSource:

      • DataLocationS3 - The Amazon S3 location of the observation data.

      • DataSchemaLocationS3 - The Amazon S3 location of the DataSchema.

      • DataSchema - A JSON string representing the schema. This is not required if DataSchemaUri is specified.

      • DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the Datasource.

        Sample - "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"

      • DataLocationS3required — (String)

        The location of the data file(s) used by a DataSource. The URI specifies a data file or an Amazon Simple Storage Service (Amazon S3) directory or bucket containing data files.

      • DataRearrangement — (String)

        A JSON string that represents the splitting and rearrangement processing to be applied to a DataSource. If the DataRearrangement parameter is not provided, all of the input data is used to create the Datasource.

        There are multiple parameters that control what data is used to create a datasource:

        • percentBegin

          Use percentBegin to indicate the beginning of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • percentEnd

          Use percentEnd to indicate the end of the range of the data used to create the Datasource. If you do not include percentBegin and percentEnd, Amazon ML includes all of the data when creating the datasource.

        • complement

          The complement parameter instructs Amazon ML to use the data that is not included in the range of percentBegin to percentEnd to create a datasource. The complement parameter is useful if you need to create complementary datasources for training and evaluation. To create a complementary datasource, use the same values for percentBegin and percentEnd, along with the complement parameter.

          For example, the following two datasources do not share any data, and can be used to train and evaluate a model. The first datasource has 25 percent of the data, and the second one has 75 percent of the data.

          Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}

          Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25, "complement":"true"}}

        • strategy

          To change how Amazon ML splits the data for a datasource, use the strategy parameter.

          The default value for the strategy parameter is sequential, meaning that Amazon ML takes all of the data records between the percentBegin and percentEnd parameters for the datasource, in the order that the records appear in the input data.

          The following two DataRearrangement lines are examples of sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"sequential", "complement":"true"}}

          To randomly split the input data into the proportions indicated by the percentBegin and percentEnd parameters, set the strategy parameter to random and provide a string that is used as the seed value for the random data splitting (for example, you can use the S3 path to your data as the random seed string). If you choose the random split strategy, Amazon ML assigns each row of data a pseudo-random number between 0 and 100, and then selects the rows that have an assigned number between percentBegin and percentEnd. Pseudo-random numbers are assigned using both the input seed string value and the byte offset as a seed, so changing the data results in a different split. Any existing ordering is preserved. The random splitting strategy ensures that variables in the training and evaluation data are distributed similarly. It is useful in the cases where the input data may have an implicit sort order, which would otherwise result in training and evaluation datasources containing non-similar data records.

          The following two DataRearrangement lines are examples of non-sequentially ordered training and evaluation datasources:

          Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}

          Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100, "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}

      • DataSchema — (String)

        A JSON string that represents the schema for an Amazon S3 DataSource. The DataSchema defines the structure of the observation data in the data file(s) referenced in the DataSource.

        You must provide either the DataSchema or the DataSchemaLocationS3.

        Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames have an array of key-value pairs for their value. Use the following format to define your DataSchema.

        { "version": "1.0",

        "recordAnnotationFieldName": "F1",

        "recordWeightFieldName": "F2",

        "targetFieldName": "F3",

        "dataFormat": "CSV",

        "dataFileContainsHeader": true,

        "attributes": [

        { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType": "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName": "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL" }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType": "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE" } ],

        "excludedVariableNames": [ "F6" ] }

      • DataSchemaLocationS3 — (String)

        Describes the schema location in Amazon S3. You must provide either the DataSchema or the DataSchemaLocationS3.

    • ComputeStatistics — (Boolean)

      The compute statistics for a DataSource. The statistics are generated from the observation data referenced by a DataSource. Amazon ML uses the statistics internally during MLModel training. This parameter must be set to true if the DataSource needs to be used for MLModel training.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        A user-supplied ID that uniquely identifies the DataSource. This value should be identical to the value of the DataSourceID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createEvaluation(params = {}, callback) ⇒ AWS.Request

Creates a new Evaluation of an MLModel. An MLModel is evaluated on a set of observations associated to a DataSource. Like a DataSource for an MLModel, the DataSource for an Evaluation contains values for the Target Variable. The Evaluation compares the predicted result for each observation to the actual outcome and provides a summary so that you know how effective the MLModel functions on the test data. Evaluation generates a relevant performance metric, such as BinaryAUC, RegressionRMSE or MulticlassAvgFScore based on the corresponding MLModelType: BINARY, REGRESSION or MULTICLASS.

CreateEvaluation is an asynchronous operation. In response to CreateEvaluation, Amazon Machine Learning (Amazon ML) immediately returns and sets the evaluation status to PENDING. After the Evaluation is created and ready for use, Amazon ML sets the status to COMPLETED.

You can use the GetEvaluation operation to check progress of the evaluation during the creation operation.

Service Reference:

Examples:

Calling the createEvaluation operation

var params = {
  EvaluationDataSourceId: 'STRING_VALUE', /* required */
  EvaluationId: 'STRING_VALUE', /* required */
  MLModelId: 'STRING_VALUE', /* required */
  EvaluationName: 'STRING_VALUE'
};
machinelearning.createEvaluation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EvaluationId — (String)

      A user-supplied ID that uniquely identifies the Evaluation.

    • EvaluationName — (String)

      A user-supplied name or description of the Evaluation.

    • MLModelId — (String)

      The ID of the MLModel to evaluate.

      The schema used in creating the MLModel must match the schema of the DataSource used in the Evaluation.

    • EvaluationDataSourceId — (String)

      The ID of the DataSource for the evaluation. The schema of the DataSource must match the schema used to create the MLModel.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EvaluationId — (String)

        The user-supplied ID that uniquely identifies the Evaluation. This value should be identical to the value of the EvaluationId in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createMLModel(params = {}, callback) ⇒ AWS.Request

Creates a new MLModel using the DataSource and the recipe as information sources.

An MLModel is nearly immutable. Users can update only the MLModelName and the ScoreThreshold in an MLModel without creating a new MLModel.

CreateMLModel is an asynchronous operation. In response to CreateMLModel, Amazon Machine Learning (Amazon ML) immediately returns and sets the MLModel status to PENDING. After the MLModel has been created and ready is for use, Amazon ML sets the status to COMPLETED.

You can use the GetMLModel operation to check the progress of the MLModel during the creation operation.

CreateMLModel requires a DataSource with computed statistics, which can be created by setting ComputeStatistics to true in CreateDataSourceFromRDS, CreateDataSourceFromS3, or CreateDataSourceFromRedshift operations.

Service Reference:

Examples:

Calling the createMLModel operation

var params = {
  MLModelId: 'STRING_VALUE', /* required */
  MLModelType: REGRESSION | BINARY | MULTICLASS, /* required */
  TrainingDataSourceId: 'STRING_VALUE', /* required */
  MLModelName: 'STRING_VALUE',
  Parameters: {
    '<StringType>': 'STRING_VALUE',
    /* '<StringType>': ... */
  },
  Recipe: 'STRING_VALUE',
  RecipeUri: 'STRING_VALUE'
};
machinelearning.createMLModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      A user-supplied ID that uniquely identifies the MLModel.

    • MLModelName — (String)

      A user-supplied name or description of the MLModel.

    • MLModelType — (String)

      The category of supervised learning that this MLModel will address. Choose from the following types:

      • Choose REGRESSION if the MLModel will be used to predict a numeric value.

      • Choose BINARY if the MLModel result has two possible values.

      • Choose MULTICLASS if the MLModel result has a limited number of values.

      For more information, see the Amazon Machine Learning Developer Guide.

      Possible values include:
      • "REGRESSION"
      • "BINARY"
      • "MULTICLASS"
    • Parameters — (map<String>)

      A list of the training parameters in the MLModel. The list is implemented as a map of key-value pairs.

      The following is the current set of training parameters:

      • sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

        The value is an integer that ranges from 100000 to 2147483648. The default value is 33554432.

      • sgd.maxPasses - The number of times that the training process traverses the observations to build the MLModel. The value is an integer that ranges from 1 to 10000. The default value is 10.

      • sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling the data improves a model's ability to find the optimal solution for a variety of data types. The valid values are auto and none. The default value is none. We strongly recommend that you shuffle your data.

      • sgd.l1RegularizationAmount - The coefficient regularization L1 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to zero, resulting in a sparse feature set. If you use this parameter, start by specifying a small value, such as 1.0E-08.

        The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L1 normalization. This parameter can't be used when L2 is specified. Use this parameter sparingly.

      • sgd.l2RegularizationAmount - The coefficient regularization L2 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as 1.0E-08.

        The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L2 normalization. This parameter can't be used when L1 is specified. Use this parameter sparingly.

    • TrainingDataSourceId — (String)

      The DataSource that points to the training data.

    • Recipe — (String)

      The data recipe for creating the MLModel. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.

    • RecipeUri — (String)

      The Amazon Simple Storage Service (Amazon S3) location and file name that contains the MLModel recipe. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        A user-supplied ID that uniquely identifies the MLModel. This value should be identical to the value of the MLModelId in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRealtimeEndpoint(params = {}, callback) ⇒ AWS.Request

Creates a real-time endpoint for the MLModel. The endpoint contains the URI of the MLModel; that is, the location to send real-time prediction requests for the specified MLModel.

Service Reference:

Examples:

Calling the createRealtimeEndpoint operation

var params = {
  MLModelId: 'STRING_VALUE' /* required */
};
machinelearning.createRealtimeEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      The ID assigned to the MLModel during creation.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        A user-supplied ID that uniquely identifies the MLModel. This value should be identical to the value of the MLModelId in the request.

      • RealtimeEndpointInfo — (map)

        The endpoint information of the MLModel

        • PeakRequestsPerSecond — (Integer)

          The maximum processing rate for the real-time endpoint for MLModel, measured in incoming requests per second.

        • CreatedAt — (Date)

          The time that the request to create the real-time endpoint for the MLModel was received. The time is expressed in epoch time.

        • EndpointUrl — (String)

          The URI that specifies where to send real-time prediction requests for the MLModel.

          Note: The application must wait until the real-time endpoint is ready before using this URI.

        • EndpointStatus — (String)

          The current status of the real-time endpoint for the MLModel. This element can have one of the following values:

          • NONE - Endpoint does not exist or was previously deleted.

          • READY - Endpoint is ready to be used for real-time predictions.

          • UPDATING - Updating/creating the endpoint.

          Possible values include:
          • "NONE"
          • "READY"
          • "UPDATING"
          • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteBatchPrediction(params = {}, callback) ⇒ AWS.Request

Assigns the DELETED status to a BatchPrediction, rendering it unusable.

After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction operation to verify that the status of the BatchPrediction changed to DELETED.

Caution: The result of the DeleteBatchPrediction operation is irreversible.

Service Reference:

Examples:

Calling the deleteBatchPrediction operation

var params = {
  BatchPredictionId: 'STRING_VALUE' /* required */
};
machinelearning.deleteBatchPrediction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BatchPredictionId — (String)

      A user-supplied ID that uniquely identifies the BatchPrediction.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BatchPredictionId — (String)

        A user-supplied ID that uniquely identifies the BatchPrediction. This value should be identical to the value of the BatchPredictionID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDataSource(params = {}, callback) ⇒ AWS.Request

Assigns the DELETED status to a DataSource, rendering it unusable.

After using the DeleteDataSource operation, you can use the GetDataSource operation to verify that the status of the DataSource changed to DELETED.

Caution: The results of the DeleteDataSource operation are irreversible.

Service Reference:

Examples:

Calling the deleteDataSource operation

var params = {
  DataSourceId: 'STRING_VALUE' /* required */
};
machinelearning.deleteDataSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      A user-supplied ID that uniquely identifies the DataSource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        A user-supplied ID that uniquely identifies the DataSource. This value should be identical to the value of the DataSourceID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEvaluation(params = {}, callback) ⇒ AWS.Request

Assigns the DELETED status to an Evaluation, rendering it unusable.

After invoking the DeleteEvaluation operation, you can use the GetEvaluation operation to verify that the status of the Evaluation changed to DELETED.

Caution: The results of the DeleteEvaluation operation are irreversible.

Service Reference:

Examples:

Calling the deleteEvaluation operation

var params = {
  EvaluationId: 'STRING_VALUE' /* required */
};
machinelearning.deleteEvaluation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EvaluationId — (String)

      A user-supplied ID that uniquely identifies the Evaluation to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EvaluationId — (String)

        A user-supplied ID that uniquely identifies the Evaluation. This value should be identical to the value of the EvaluationId in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMLModel(params = {}, callback) ⇒ AWS.Request

Assigns the DELETED status to an MLModel, rendering it unusable.

After using the DeleteMLModel operation, you can use the GetMLModel operation to verify that the status of the MLModel changed to DELETED.

Caution: The result of the DeleteMLModel operation is irreversible.

Service Reference:

Examples:

Calling the deleteMLModel operation

var params = {
  MLModelId: 'STRING_VALUE' /* required */
};
machinelearning.deleteMLModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      A user-supplied ID that uniquely identifies the MLModel.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        A user-supplied ID that uniquely identifies the MLModel. This value should be identical to the value of the MLModelID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRealtimeEndpoint(params = {}, callback) ⇒ AWS.Request

Deletes a real time endpoint of an MLModel.

Service Reference:

Examples:

Calling the deleteRealtimeEndpoint operation

var params = {
  MLModelId: 'STRING_VALUE' /* required */
};
machinelearning.deleteRealtimeEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      The ID assigned to the MLModel during creation.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        A user-supplied ID that uniquely identifies the MLModel. This value should be identical to the value of the MLModelId in the request.

      • RealtimeEndpointInfo — (map)

        The endpoint information of the MLModel

        • PeakRequestsPerSecond — (Integer)

          The maximum processing rate for the real-time endpoint for MLModel, measured in incoming requests per second.

        • CreatedAt — (Date)

          The time that the request to create the real-time endpoint for the MLModel was received. The time is expressed in epoch time.

        • EndpointUrl — (String)

          The URI that specifies where to send real-time prediction requests for the MLModel.

          Note: The application must wait until the real-time endpoint is ready before using this URI.

        • EndpointStatus — (String)

          The current status of the real-time endpoint for the MLModel. This element can have one of the following values:

          • NONE - Endpoint does not exist or was previously deleted.

          • READY - Endpoint is ready to be used for real-time predictions.

          • UPDATING - Updating/creating the endpoint.

          Possible values include:
          • "NONE"
          • "READY"
          • "UPDATING"
          • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTags(params = {}, callback) ⇒ AWS.Request

Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags.

If you specify a tag that doesn't exist, Amazon ML ignores it.

Service Reference:

Examples:

Calling the deleteTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  ResourceType: BatchPrediction | DataSource | Evaluation | MLModel, /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
machinelearning.deleteTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TagKeys — (Array<String>)

      One or more tags to delete.

    • ResourceId — (String)

      The ID of the tagged ML object. For example, exampleModelId.

    • ResourceType — (String)

      The type of the tagged ML object.

      Possible values include:
      • "BatchPrediction"
      • "DataSource"
      • "Evaluation"
      • "MLModel"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceId — (String)

        The ID of the ML object from which tags were deleted.

      • ResourceType — (String)

        The type of the ML object from which tags were deleted.

        Possible values include:
        • "BatchPrediction"
        • "DataSource"
        • "Evaluation"
        • "MLModel"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeBatchPredictions(params = {}, callback) ⇒ AWS.Request

Returns a list of BatchPrediction operations that match the search criteria in the request.

Service Reference:

Examples:

Calling the describeBatchPredictions operation

var params = {
  EQ: 'STRING_VALUE',
  FilterVariable: CreatedAt | LastUpdatedAt | Status | Name | IAMUser | MLModelId | DataSourceId | DataURI,
  GE: 'STRING_VALUE',
  GT: 'STRING_VALUE',
  LE: 'STRING_VALUE',
  LT: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NE: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  Prefix: 'STRING_VALUE',
  SortOrder: asc | dsc
};
machinelearning.describeBatchPredictions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FilterVariable — (String)

      Use one of the following variables to filter a list of BatchPrediction:

      • CreatedAt - Sets the search criteria to the BatchPrediction creation date.

      • Status - Sets the search criteria to the BatchPrediction status.

      • Name - Sets the search criteria to the contents of the BatchPrediction Name.

      • IAMUser - Sets the search criteria to the user account that invoked the BatchPrediction creation.

      • MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.

      • DataSourceId - Sets the search criteria to the DataSource used in the BatchPrediction.

      • DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "MLModelId"
      • "DataSourceId"
      • "DataURI"
    • EQ — (String)

      The equal to operator. The BatchPrediction results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The BatchPrediction results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The BatchPrediction results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The BatchPrediction results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The BatchPrediction results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The BatchPrediction results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, a Batch Prediction operation could have the Name 2014-09-09-HolidayGiftMailer. To search for this BatchPrediction, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of MLModels.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      An ID of the page in the paginated results.

    • Limit — (Integer)

      The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of BatchPrediction objects that meet the search criteria.

        • BatchPredictionId — (String)

          The ID assigned to the BatchPrediction at creation. This value should be identical to the value of the BatchPredictionID in the request.

        • MLModelId — (String)

          The ID of the MLModel that generated predictions for the BatchPrediction request.

        • BatchPredictionDataSourceId — (String)

          The ID of the DataSource that points to the group of observations to predict.

        • InputDataLocationS3 — (String)

          The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

        • CreatedByIamUser — (String)

          The AWS user account that invoked the BatchPrediction. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the BatchPrediction was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the BatchPrediction. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the BatchPrediction.

        • Status — (String)

          The status of the BatchPrediction. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate predictions for a batch of observations.

          • INPROGRESS - The process is underway.

          • FAILED - The request to perform a batch prediction did not run to completion. It is not usable.

          • COMPLETED - The batch prediction process completed successfully.

          • DELETED - The BatchPrediction is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • OutputUri — (String)

          The location of an Amazon S3 bucket or directory to receive the operation results. The following substrings are not allowed in the s3 key portion of the outputURI field: ':', '//', '/./', '/../'.

        • Message — (String)

          A description of the most recent details about processing the batch prediction request.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

        • TotalRecordCount — (Integer)

          Long integer type that is a 64-bit signed number.

        • InvalidRecordCount — (Integer)

          Long integer type that is a 64-bit signed number.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeDataSources(params = {}, callback) ⇒ AWS.Request

Returns a list of DataSource that match the search criteria in the request.

Service Reference:

Examples:

Calling the describeDataSources operation

var params = {
  EQ: 'STRING_VALUE',
  FilterVariable: CreatedAt | LastUpdatedAt | Status | Name | DataLocationS3 | IAMUser,
  GE: 'STRING_VALUE',
  GT: 'STRING_VALUE',
  LE: 'STRING_VALUE',
  LT: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NE: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  Prefix: 'STRING_VALUE',
  SortOrder: asc | dsc
};
machinelearning.describeDataSources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FilterVariable — (String)

      Use one of the following variables to filter a list of DataSource:

      • CreatedAt - Sets the search criteria to DataSource creation dates.

      • Status - Sets the search criteria to DataSource statuses.

      • Name - Sets the search criteria to the contents of DataSource Name.

      • DataUri - Sets the search criteria to the URI of data files used to create the DataSource. The URI can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

      • IAMUser - Sets the search criteria to the user account that invoked the DataSource creation.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "DataLocationS3"
      • "IAMUser"
    • EQ — (String)

      The equal to operator. The DataSource results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The DataSource results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The DataSource results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The DataSource results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The DataSource results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The DataSource results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, a DataSource could have the Name 2014-09-09-HolidayGiftMailer. To search for this DataSource, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of DataSource.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The maximum number of DataSource to include in the result.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of DataSource that meet the search criteria.

        • DataSourceId — (String)

          The ID that is assigned to the DataSource during creation.

        • DataLocationS3 — (String)

          The location and name of the data in Amazon Simple Storage Service (Amazon S3) that is used by a DataSource.

        • DataRearrangement — (String)

          A JSON string that represents the splitting and rearrangement requirement used when this DataSource was created.

        • CreatedByIamUser — (String)

          The AWS user account from which the DataSource was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the DataSource was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the BatchPrediction. The time is expressed in epoch time.

        • DataSizeInBytes — (Integer)

          The total number of observations contained in the data files that the DataSource references.

        • NumberOfFiles — (Integer)

          The number of data files referenced by the DataSource.

        • Name — (String)

          A user-supplied name or description of the DataSource.

        • Status — (String)

          The current status of the DataSource. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create a DataSource.

          • INPROGRESS - The creation process is underway.

          • FAILED - The request to create a DataSource did not run to completion. It is not usable.

          • COMPLETED - The creation process completed successfully.

          • DELETED - The DataSource is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • Message — (String)

          A description of the most recent details about creating the DataSource.

        • RedshiftMetadata — (map)

          Describes the DataSource details specific to Amazon Redshift.

          • RedshiftDatabase — (map)

            Describes the database details required to connect to an Amazon Redshift database.

            • DatabaseNamerequired — (String)

              The name of a database hosted on an Amazon Redshift cluster.

            • ClusterIdentifierrequired — (String)

              The ID of an Amazon Redshift cluster.

          • DatabaseUserName — (String)

            A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

          • SelectSqlQuery — (String)

            The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.

        • RDSMetadata — (map)

          The datasource details that are specific to Amazon RDS.

          • Database — (map)

            The database details required to connect to an Amazon RDS.

            • InstanceIdentifierrequired — (String)

              The ID of an RDS DB instance.

            • DatabaseNamerequired — (String)

              The name of a database hosted on an RDS DB instance.

          • DatabaseUserName — (String)

            The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

          • SelectSqlQuery — (String)

            The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

          • ResourceRole — (String)

            The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

          • ServiceRole — (String)

            The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

          • DataPipelineId — (String)

            The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

        • RoleARN — (String)

          The Amazon Resource Name (ARN) of an AWS IAM Role, such as the following: arn:aws:iam::account:role/rolename.

        • ComputeStatistics — (Boolean)

          The parameter is true if statistics need to be generated from the observation data.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        An ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeEvaluations(params = {}, callback) ⇒ AWS.Request

Returns a list of DescribeEvaluations that match the search criteria in the request.

Service Reference:

Examples:

Calling the describeEvaluations operation

var params = {
  EQ: 'STRING_VALUE',
  FilterVariable: CreatedAt | LastUpdatedAt | Status | Name | IAMUser | MLModelId | DataSourceId | DataURI,
  GE: 'STRING_VALUE',
  GT: 'STRING_VALUE',
  LE: 'STRING_VALUE',
  LT: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NE: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  Prefix: 'STRING_VALUE',
  SortOrder: asc | dsc
};
machinelearning.describeEvaluations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FilterVariable — (String)

      Use one of the following variable to filter a list of Evaluation objects:

      • CreatedAt - Sets the search criteria to the Evaluation creation date.

      • Status - Sets the search criteria to the Evaluation status.

      • Name - Sets the search criteria to the contents of Evaluation Name.

      • IAMUser - Sets the search criteria to the user account that invoked an Evaluation.

      • MLModelId - Sets the search criteria to the MLModel that was evaluated.

      • DataSourceId - Sets the search criteria to the DataSource used in Evaluation.

      • DataUri - Sets the search criteria to the data file(s) used in Evaluation. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "MLModelId"
      • "DataSourceId"
      • "DataURI"
    • EQ — (String)

      The equal to operator. The Evaluation results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The Evaluation results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The Evaluation results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The Evaluation results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The Evaluation results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The Evaluation results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, an Evaluation could have the Name 2014-09-09-HolidayGiftMailer. To search for this Evaluation, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of Evaluation.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The maximum number of Evaluation to include in the result.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of Evaluation that meet the search criteria.

        • EvaluationId — (String)

          The ID that is assigned to the Evaluation at creation.

        • MLModelId — (String)

          The ID of the MLModel that is the focus of the evaluation.

        • EvaluationDataSourceId — (String)

          The ID of the DataSource that is used to evaluate the MLModel.

        • InputDataLocationS3 — (String)

          The location and name of the data in Amazon Simple Storage Server (Amazon S3) that is used in the evaluation.

        • CreatedByIamUser — (String)

          The AWS user account that invoked the evaluation. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the Evaluation was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the Evaluation. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the Evaluation.

        • Status — (String)

          The status of the evaluation. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to evaluate an MLModel.

          • INPROGRESS - The evaluation is underway.

          • FAILED - The request to evaluate an MLModel did not run to completion. It is not usable.

          • COMPLETED - The evaluation process completed successfully.

          • DELETED - The Evaluation is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • PerformanceMetrics — (map)

          Measurements of how well the MLModel performed, using observations referenced by the DataSource. One of the following metrics is returned, based on the type of the MLModel:

          • BinaryAUC: A binary MLModel uses the Area Under the Curve (AUC) technique to measure performance.

          • RegressionRMSE: A regression MLModel uses the Root Mean Square Error (RMSE) technique to measure performance. RMSE measures the difference between predicted and actual values for a single variable.

          • MulticlassAvgFScore: A multiclass MLModel uses the F1 score technique to measure performance.

          For more information about performance metrics, please see the Amazon Machine Learning Developer Guide.

          • Properties — (map<String>)
        • Message — (String)

          A description of the most recent details about evaluating the MLModel.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeMLModels(params = {}, callback) ⇒ AWS.Request

Returns a list of MLModel that match the search criteria in the request.

Service Reference:

Examples:

Calling the describeMLModels operation

var params = {
  EQ: 'STRING_VALUE',
  FilterVariable: CreatedAt | LastUpdatedAt | Status | Name | IAMUser | TrainingDataSourceId | RealtimeEndpointStatus | MLModelType | Algorithm | TrainingDataURI,
  GE: 'STRING_VALUE',
  GT: 'STRING_VALUE',
  LE: 'STRING_VALUE',
  LT: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NE: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  Prefix: 'STRING_VALUE',
  SortOrder: asc | dsc
};
machinelearning.describeMLModels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FilterVariable — (String)

      Use one of the following variables to filter a list of MLModel:

      • CreatedAt - Sets the search criteria to MLModel creation date.

      • Status - Sets the search criteria to MLModel status.

      • Name - Sets the search criteria to the contents of MLModel Name.

      • IAMUser - Sets the search criteria to the user account that invoked the MLModel creation.

      • TrainingDataSourceId - Sets the search criteria to the DataSource used to train one or more MLModel.

      • RealtimeEndpointStatus - Sets the search criteria to the MLModel real-time endpoint status.

      • MLModelType - Sets the search criteria to MLModel type: binary, regression, or multi-class.

      • Algorithm - Sets the search criteria to the algorithm that the MLModel uses.

      • TrainingDataURI - Sets the search criteria to the data file(s) used in training a MLModel. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "TrainingDataSourceId"
      • "RealtimeEndpointStatus"
      • "MLModelType"
      • "Algorithm"
      • "TrainingDataURI"
    • EQ — (String)

      The equal to operator. The MLModel results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The MLModel results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The MLModel results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The MLModel results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The MLModel results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The MLModel results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, an MLModel could have the Name 2014-09-09-HolidayGiftMailer. To search for this MLModel, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of MLModel.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of MLModel that meet the search criteria.

        • MLModelId — (String)

          The ID assigned to the MLModel at creation.

        • TrainingDataSourceId — (String)

          The ID of the training DataSource. The CreateMLModel operation uses the TrainingDataSourceId.

        • CreatedByIamUser — (String)

          The AWS user account from which the MLModel was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the MLModel was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the MLModel. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the MLModel.

        • Status — (String)

          The current status of an MLModel. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create an MLModel.

          • INPROGRESS - The creation process is underway.

          • FAILED - The request to create an MLModel didn't run to completion. The model isn't usable.

          • COMPLETED - The creation process completed successfully.

          • DELETED - The MLModel is marked as deleted. It isn't usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • SizeInBytes — (Integer)

          Long integer type that is a 64-bit signed number.

        • EndpointInfo — (map)

          The current endpoint of the MLModel.

          • PeakRequestsPerSecond — (Integer)

            The maximum processing rate for the real-time endpoint for MLModel, measured in incoming requests per second.

          • CreatedAt — (Date)

            The time that the request to create the real-time endpoint for the MLModel was received. The time is expressed in epoch time.

          • EndpointUrl — (String)

            The URI that specifies where to send real-time prediction requests for the MLModel.

            Note: The application must wait until the real-time endpoint is ready before using this URI.

          • EndpointStatus — (String)

            The current status of the real-time endpoint for the MLModel. This element can have one of the following values:

            • NONE - Endpoint does not exist or was previously deleted.

            • READY - Endpoint is ready to be used for real-time predictions.

            • UPDATING - Updating/creating the endpoint.

            Possible values include:
            • "NONE"
            • "READY"
            • "UPDATING"
            • "FAILED"
        • TrainingParameters — (map<String>)

          A list of the training parameters in the MLModel. The list is implemented as a map of key-value pairs.

          The following is the current set of training parameters:

          • sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

            The value is an integer that ranges from 100000 to 2147483648. The default value is 33554432.

          • sgd.maxPasses - The number of times that the training process traverses the observations to build the MLModel. The value is an integer that ranges from 1 to 10000. The default value is 10.

          • sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling the data improves a model's ability to find the optimal solution for a variety of data types. The valid values are auto and none. The default value is none.

          • sgd.l1RegularizationAmount - The coefficient regularization L1 norm, which controls overfitting the data by penalizing large coefficients. This parameter tends to drive coefficients to zero, resulting in sparse feature set. If you use this parameter, start by specifying a small value, such as 1.0E-08.

            The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L1 normalization. This parameter can't be used when L2 is specified. Use this parameter sparingly.

          • sgd.l2RegularizationAmount - The coefficient regularization L2 norm, which controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as 1.0E-08.

            The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L2 normalization. This parameter can't be used when L1 is specified. Use this parameter sparingly.

        • InputDataLocationS3 — (String)

          The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

        • Algorithm — (String)

          The algorithm used to train the MLModel. The following algorithm is supported:

          • SGD -- Stochastic gradient descent. The goal of SGD is to minimize the gradient of the loss function.

          Possible values include:
          • "sgd"
        • MLModelType — (String)

          Identifies the MLModel category. The following are the available types:

          • REGRESSION - Produces a numeric result. For example, "What price should a house be listed at?"

          • BINARY - Produces one of two possible results. For example, "Is this a child-friendly web site?".

          • MULTICLASS - Produces one of several possible results. For example, "Is this a HIGH-, LOW-, or MEDIUM-risk trade?".

          Possible values include:
          • "REGRESSION"
          • "BINARY"
          • "MULTICLASS"
        • ScoreThreshold — (Float)
        • ScoreThresholdLastUpdatedAt — (Date)

          The time of the most recent edit to the ScoreThreshold. The time is expressed in epoch time.

        • Message — (String)

          A description of the most recent details about accessing the MLModel.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeTags(params = {}, callback) ⇒ AWS.Request

Describes one or more of the tags for your Amazon ML object.

Service Reference:

Examples:

Calling the describeTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  ResourceType: BatchPrediction | DataSource | Evaluation | MLModel /* required */
};
machinelearning.describeTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The ID of the ML object. For example, exampleModelId.

    • ResourceType — (String)

      The type of the ML object.

      Possible values include:
      • "BatchPrediction"
      • "DataSource"
      • "Evaluation"
      • "MLModel"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceId — (String)

        The ID of the tagged ML object.

      • ResourceType — (String)

        The type of the tagged ML object.

        Possible values include:
        • "BatchPrediction"
        • "DataSource"
        • "Evaluation"
        • "MLModel"
      • Tags — (Array<map>)

        A list of tags associated with the ML object.

        • Key — (String)

          A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

        • Value — (String)

          An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBatchPrediction(params = {}, callback) ⇒ AWS.Request

Returns a BatchPrediction that includes detailed metadata, status, and data file information for a Batch Prediction request.

Service Reference:

Examples:

Calling the getBatchPrediction operation

var params = {
  BatchPredictionId: 'STRING_VALUE' /* required */
};
machinelearning.getBatchPrediction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BatchPredictionId — (String)

      An ID assigned to the BatchPrediction at creation.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BatchPredictionId — (String)

        An ID assigned to the BatchPrediction at creation. This value should be identical to the value of the BatchPredictionID in the request.

      • MLModelId — (String)

        The ID of the MLModel that generated predictions for the BatchPrediction request.

      • BatchPredictionDataSourceId — (String)

        The ID of the DataSource that was used to create the BatchPrediction.

      • InputDataLocationS3 — (String)

        The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

      • CreatedByIamUser — (String)

        The AWS user account that invoked the BatchPrediction. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

      • CreatedAt — (Date)

        The time when the BatchPrediction was created. The time is expressed in epoch time.

      • LastUpdatedAt — (Date)

        The time of the most recent edit to BatchPrediction. The time is expressed in epoch time.

      • Name — (String)

        A user-supplied name or description of the BatchPrediction.

      • Status — (String)

        The status of the BatchPrediction, which can be one of the following values:

        • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate batch predictions.

        • INPROGRESS - The batch predictions are in progress.

        • FAILED - The request to perform a batch prediction did not run to completion. It is not usable.

        • COMPLETED - The batch prediction process completed successfully.

        • DELETED - The BatchPrediction is marked as deleted. It is not usable.

        Possible values include:
        • "PENDING"
        • "INPROGRESS"
        • "FAILED"
        • "COMPLETED"
        • "DELETED"
      • OutputUri — (String)

        The location of an Amazon S3 bucket or directory to receive the operation results.

      • LogUri — (String)

        A link to the file that contains logs of the CreateBatchPrediction operation.

      • Message — (String)

        A description of the most recent details about processing the batch prediction request.

      • ComputeTime — (Integer)

        The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the BatchPrediction, normalized and scaled on computation resources. ComputeTime is only available if the BatchPrediction is in the COMPLETED state.

      • FinishedAt — (Date)

        The epoch time when Amazon Machine Learning marked the BatchPrediction as COMPLETED or FAILED. FinishedAt is only available when the BatchPrediction is in the COMPLETED or FAILED state.

      • StartedAt — (Date)

        The epoch time when Amazon Machine Learning marked the BatchPrediction as INPROGRESS. StartedAt isn't available if the BatchPrediction is in the PENDING state.

      • TotalRecordCount — (Integer)

        The number of total records that Amazon Machine Learning saw while processing the BatchPrediction.

      • InvalidRecordCount — (Integer)

        The number of invalid records that Amazon Machine Learning saw while processing the BatchPrediction.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDataSource(params = {}, callback) ⇒ AWS.Request

Returns a DataSource that includes metadata and data file information, as well as the current status of the DataSource.

GetDataSource provides results in normal or verbose format. The verbose format adds the schema description and the list of files pointed to by the DataSource to the normal format.

Service Reference:

Examples:

Calling the getDataSource operation

var params = {
  DataSourceId: 'STRING_VALUE', /* required */
  Verbose: true || false
};
machinelearning.getDataSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      The ID assigned to the DataSource at creation.

    • Verbose — (Boolean)

      Specifies whether the GetDataSource operation should return DataSourceSchema.

      If true, DataSourceSchema is returned.

      If false, DataSourceSchema is not returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        The ID assigned to the DataSource at creation. This value should be identical to the value of the DataSourceId in the request.

      • DataLocationS3 — (String)

        The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

      • DataRearrangement — (String)

        A JSON string that represents the splitting and rearrangement requirement used when this DataSource was created.

      • CreatedByIamUser — (String)

        The AWS user account from which the DataSource was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

      • CreatedAt — (Date)

        The time that the DataSource was created. The time is expressed in epoch time.

      • LastUpdatedAt — (Date)

        The time of the most recent edit to the DataSource. The time is expressed in epoch time.

      • DataSizeInBytes — (Integer)

        The total size of observations in the data files.

      • NumberOfFiles — (Integer)

        The number of data files referenced by the DataSource.

      • Name — (String)

        A user-supplied name or description of the DataSource.

      • Status — (String)

        The current status of the DataSource. This element can have one of the following values:

        • PENDING - Amazon ML submitted a request to create a DataSource.

        • INPROGRESS - The creation process is underway.

        • FAILED - The request to create a DataSource did not run to completion. It is not usable.

        • COMPLETED - The creation process completed successfully.

        • DELETED - The DataSource is marked as deleted. It is not usable.

        Possible values include:
        • "PENDING"
        • "INPROGRESS"
        • "FAILED"
        • "COMPLETED"
        • "DELETED"
      • LogUri — (String)

        A link to the file containing logs of CreateDataSourceFrom* operations.

      • Message — (String)

        The user-supplied description of the most recent details about creating the DataSource.

      • RedshiftMetadata — (map)

        Describes the DataSource details specific to Amazon Redshift.

        • RedshiftDatabase — (map)

          Describes the database details required to connect to an Amazon Redshift database.

          • DatabaseNamerequired — (String)

            The name of a database hosted on an Amazon Redshift cluster.

          • ClusterIdentifierrequired — (String)

            The ID of an Amazon Redshift cluster.

        • DatabaseUserName — (String)

          A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

        • SelectSqlQuery — (String)

          The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.

      • RDSMetadata — (map)

        The datasource details that are specific to Amazon RDS.

        • Database — (map)

          The database details required to connect to an Amazon RDS.

          • InstanceIdentifierrequired — (String)

            The ID of an RDS DB instance.

          • DatabaseNamerequired — (String)

            The name of a database hosted on an RDS DB instance.

        • DatabaseUserName — (String)

          The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

        • SelectSqlQuery — (String)

          The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

        • ResourceRole — (String)

          The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

        • ServiceRole — (String)

          The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

        • DataPipelineId — (String)

          The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

      • RoleARN — (String)

        The Amazon Resource Name (ARN) of an AWS IAM Role, such as the following: arn:aws:iam::account:role/rolename.

      • ComputeStatistics — (Boolean)

        The parameter is true if statistics need to be generated from the observation data.

      • ComputeTime — (Integer)

        The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the DataSource, normalized and scaled on computation resources. ComputeTime is only available if the DataSource is in the COMPLETED state and the ComputeStatistics is set to true.

      • FinishedAt — (Date)

        The epoch time when Amazon Machine Learning marked the DataSource as COMPLETED or FAILED. FinishedAt is only available when the DataSource is in the COMPLETED or FAILED state.

      • StartedAt — (Date)

        The epoch time when Amazon Machine Learning marked the DataSource as INPROGRESS. StartedAt isn't available if the DataSource is in the PENDING state.

      • DataSourceSchema — (String)

        The schema used by all of the data files of this DataSource.

        Note: This parameter is provided as part of the verbose format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEvaluation(params = {}, callback) ⇒ AWS.Request

Returns an Evaluation that includes metadata as well as the current status of the Evaluation.

Service Reference:

Examples:

Calling the getEvaluation operation

var params = {
  EvaluationId: 'STRING_VALUE' /* required */
};
machinelearning.getEvaluation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EvaluationId — (String)

      The ID of the Evaluation to retrieve. The evaluation of each MLModel is recorded and cataloged. The ID provides the means to access the information.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EvaluationId — (String)

        The evaluation ID which is same as the EvaluationId in the request.

      • MLModelId — (String)

        The ID of the MLModel that was the focus of the evaluation.

      • EvaluationDataSourceId — (String)

        The DataSource used for this evaluation.

      • InputDataLocationS3 — (String)

        The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

      • CreatedByIamUser — (String)

        The AWS user account that invoked the evaluation. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

      • CreatedAt — (Date)

        The time that the Evaluation was created. The time is expressed in epoch time.

      • LastUpdatedAt — (Date)

        The time of the most recent edit to the Evaluation. The time is expressed in epoch time.

      • Name — (String)

        A user-supplied name or description of the Evaluation.

      • Status — (String)

        The status of the evaluation. This element can have one of the following values:

        • PENDING - Amazon Machine Language (Amazon ML) submitted a request to evaluate an MLModel.

        • INPROGRESS - The evaluation is underway.

        • FAILED - The request to evaluate an MLModel did not run to completion. It is not usable.

        • COMPLETED - The evaluation process completed successfully.

        • DELETED - The Evaluation is marked as deleted. It is not usable.

        Possible values include:
        • "PENDING"
        • "INPROGRESS"
        • "FAILED"
        • "COMPLETED"
        • "DELETED"
      • PerformanceMetrics — (map)

        Measurements of how well the MLModel performed using observations referenced by the DataSource. One of the following metric is returned based on the type of the MLModel:

        • BinaryAUC: A binary MLModel uses the Area Under the Curve (AUC) technique to measure performance.

        • RegressionRMSE: A regression MLModel uses the Root Mean Square Error (RMSE) technique to measure performance. RMSE measures the difference between predicted and actual values for a single variable.

        • MulticlassAvgFScore: A multiclass MLModel uses the F1 score technique to measure performance.

        For more information about performance metrics, please see the Amazon Machine Learning Developer Guide.

        • Properties — (map<String>)
      • LogUri — (String)

        A link to the file that contains logs of the CreateEvaluation operation.

      • Message — (String)

        A description of the most recent details about evaluating the MLModel.

      • ComputeTime — (Integer)

        The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the Evaluation, normalized and scaled on computation resources. ComputeTime is only available if the Evaluation is in the COMPLETED state.

      • FinishedAt — (Date)

        The epoch time when Amazon Machine Learning marked the Evaluation as COMPLETED or FAILED. FinishedAt is only available when the Evaluation is in the COMPLETED or FAILED state.

      • StartedAt — (Date)

        The epoch time when Amazon Machine Learning marked the Evaluation as INPROGRESS. StartedAt isn't available if the Evaluation is in the PENDING state.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMLModel(params = {}, callback) ⇒ AWS.Request

Returns an MLModel that includes detailed metadata, data source information, and the current status of the MLModel.

GetMLModel provides results in normal or verbose format.

Service Reference:

Examples:

Calling the getMLModel operation

var params = {
  MLModelId: 'STRING_VALUE', /* required */
  Verbose: true || false
};
machinelearning.getMLModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      The ID assigned to the MLModel at creation.

    • Verbose — (Boolean)

      Specifies whether the GetMLModel operation should return Recipe.

      If true, Recipe is returned.

      If false, Recipe is not returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        The MLModel ID, which is same as the MLModelId in the request.

      • TrainingDataSourceId — (String)

        The ID of the training DataSource.

      • CreatedByIamUser — (String)

        The AWS user account from which the MLModel was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

      • CreatedAt — (Date)

        The time that the MLModel was created. The time is expressed in epoch time.

      • LastUpdatedAt — (Date)

        The time of the most recent edit to the MLModel. The time is expressed in epoch time.

      • Name — (String)

        A user-supplied name or description of the MLModel.

      • Status — (String)

        The current status of the MLModel. This element can have one of the following values:

        • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to describe a MLModel.

        • INPROGRESS - The request is processing.

        • FAILED - The request did not run to completion. The ML model isn't usable.

        • COMPLETED - The request completed successfully.

        • DELETED - The MLModel is marked as deleted. It isn't usable.

        Possible values include:
        • "PENDING"
        • "INPROGRESS"
        • "FAILED"
        • "COMPLETED"
        • "DELETED"
      • SizeInBytes — (Integer)

        Long integer type that is a 64-bit signed number.

      • EndpointInfo — (map)

        The current endpoint of the MLModel

        • PeakRequestsPerSecond — (Integer)

          The maximum processing rate for the real-time endpoint for MLModel, measured in incoming requests per second.

        • CreatedAt — (Date)

          The time that the request to create the real-time endpoint for the MLModel was received. The time is expressed in epoch time.

        • EndpointUrl — (String)

          The URI that specifies where to send real-time prediction requests for the MLModel.

          Note: The application must wait until the real-time endpoint is ready before using this URI.

        • EndpointStatus — (String)

          The current status of the real-time endpoint for the MLModel. This element can have one of the following values:

          • NONE - Endpoint does not exist or was previously deleted.

          • READY - Endpoint is ready to be used for real-time predictions.

          • UPDATING - Updating/creating the endpoint.

          Possible values include:
          • "NONE"
          • "READY"
          • "UPDATING"
          • "FAILED"
      • TrainingParameters — (map<String>)

        A list of the training parameters in the MLModel. The list is implemented as a map of key-value pairs.

        The following is the current set of training parameters:

        • sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

          The value is an integer that ranges from 100000 to 2147483648. The default value is 33554432.

        • sgd.maxPasses - The number of times that the training process traverses the observations to build the MLModel. The value is an integer that ranges from 1 to 10000. The default value is 10.

        • sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling data improves a model's ability to find the optimal solution for a variety of data types. The valid values are auto and none. The default value is none. We strongly recommend that you shuffle your data.

        • sgd.l1RegularizationAmount - The coefficient regularization L1 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to zero, resulting in a sparse feature set. If you use this parameter, start by specifying a small value, such as 1.0E-08.

          The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L1 normalization. This parameter can't be used when L2 is specified. Use this parameter sparingly.

        • sgd.l2RegularizationAmount - The coefficient regularization L2 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as 1.0E-08.

          The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L2 normalization. This parameter can't be used when L1 is specified. Use this parameter sparingly.

      • InputDataLocationS3 — (String)

        The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

      • MLModelType — (String)

        Identifies the MLModel category. The following are the available types:

        • REGRESSION -- Produces a numeric result. For example, "What price should a house be listed at?"

        • BINARY -- Produces one of two possible results. For example, "Is this an e-commerce website?"

        • MULTICLASS -- Produces one of several possible results. For example, "Is this a HIGH, LOW or MEDIUM risk trade?"

        Possible values include:
        • "REGRESSION"
        • "BINARY"
        • "MULTICLASS"
      • ScoreThreshold — (Float)

        The scoring threshold is used in binary classification MLModel models. It marks the boundary between a positive prediction and a negative prediction.

        Output values greater than or equal to the threshold receive a positive result from the MLModel, such as true. Output values less than the threshold receive a negative response from the MLModel, such as false.

      • ScoreThresholdLastUpdatedAt — (Date)

        The time of the most recent edit to the ScoreThreshold. The time is expressed in epoch time.

      • LogUri — (String)

        A link to the file that contains logs of the CreateMLModel operation.

      • Message — (String)

        A description of the most recent details about accessing the MLModel.

      • ComputeTime — (Integer)

        The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the MLModel, normalized and scaled on computation resources. ComputeTime is only available if the MLModel is in the COMPLETED state.

      • FinishedAt — (Date)

        The epoch time when Amazon Machine Learning marked the MLModel as COMPLETED or FAILED. FinishedAt is only available when the MLModel is in the COMPLETED or FAILED state.

      • StartedAt — (Date)

        The epoch time when Amazon Machine Learning marked the MLModel as INPROGRESS. StartedAt isn't available if the MLModel is in the PENDING state.

      • Recipe — (String)

        The recipe to use when training the MLModel. The Recipe provides detailed information about the observation data to use during training, and manipulations to perform on the observation data during training.

        Note: This parameter is provided as part of the verbose format.

      • Schema — (String)

        The schema used by all of the data files referenced by the DataSource.

        Note: This parameter is provided as part of the verbose format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

predict(params = {}, callback) ⇒ AWS.Request

Generates a prediction for the observation using the specified ML Model.

Note: Not all response parameters will be populated. Whether a response parameter is populated depends on the type of model requested.

Service Reference:

Examples:

Calling the predict operation

var params = {
  MLModelId: 'STRING_VALUE', /* required */
  PredictEndpoint: 'STRING_VALUE', /* required */
  Record: { /* required */
    '<VariableName>': 'STRING_VALUE',
    /* '<VariableName>': ... */
  }
};
machinelearning.predict(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      A unique identifier of the MLModel.

    • Record — (map<String>)

      A map of variable name-value pairs that represent an observation.

    • PredictEndpoint — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Prediction — (map)

        The output from a Predict operation:

        • Details - Contains the following attributes: DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS DetailsAttributes.ALGORITHM - SGD

        • PredictedLabel - Present for either a BINARY or MULTICLASS MLModel request.

        • PredictedScores - Contains the raw classification score corresponding to each label.

        • PredictedValue - Present for a REGRESSION MLModel request.

        • predictedLabel — (String)

          The prediction label for either a BINARY or MULTICLASS MLModel.

        • predictedValue — (Float)

          The prediction value for REGRESSION MLModel.

        • predictedScores — (map<Float>)

          Provides the raw classification score corresponding to each label.

        • details — (map<String>)

          Provides any additional details regarding the prediction.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateBatchPrediction(params = {}, callback) ⇒ AWS.Request

Updates the BatchPredictionName of a BatchPrediction.

You can use the GetBatchPrediction operation to view the contents of the updated data element.

Service Reference:

Examples:

Calling the updateBatchPrediction operation

var params = {
  BatchPredictionId: 'STRING_VALUE', /* required */
  BatchPredictionName: 'STRING_VALUE' /* required */
};
machinelearning.updateBatchPrediction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BatchPredictionId — (String)

      The ID assigned to the BatchPrediction during creation.

    • BatchPredictionName — (String)

      A new user-supplied name or description of the BatchPrediction.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BatchPredictionId — (String)

        The ID assigned to the BatchPrediction during creation. This value should be identical to the value of the BatchPredictionId in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDataSource(params = {}, callback) ⇒ AWS.Request

Updates the DataSourceName of a DataSource.

You can use the GetDataSource operation to view the contents of the updated data element.

Service Reference:

Examples:

Calling the updateDataSource operation

var params = {
  DataSourceId: 'STRING_VALUE', /* required */
  DataSourceName: 'STRING_VALUE' /* required */
};
machinelearning.updateDataSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceId — (String)

      The ID assigned to the DataSource during creation.

    • DataSourceName — (String)

      A new user-supplied name or description of the DataSource that will replace the current description.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DataSourceId — (String)

        The ID assigned to the DataSource during creation. This value should be identical to the value of the DataSourceID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEvaluation(params = {}, callback) ⇒ AWS.Request

Updates the EvaluationName of an Evaluation.

You can use the GetEvaluation operation to view the contents of the updated data element.

Service Reference:

Examples:

Calling the updateEvaluation operation

var params = {
  EvaluationId: 'STRING_VALUE', /* required */
  EvaluationName: 'STRING_VALUE' /* required */
};
machinelearning.updateEvaluation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EvaluationId — (String)

      The ID assigned to the Evaluation during creation.

    • EvaluationName — (String)

      A new user-supplied name or description of the Evaluation that will replace the current content.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EvaluationId — (String)

        The ID assigned to the Evaluation during creation. This value should be identical to the value of the Evaluation in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateMLModel(params = {}, callback) ⇒ AWS.Request

Updates the MLModelName and the ScoreThreshold of an MLModel.

You can use the GetMLModel operation to view the contents of the updated data element.

Service Reference:

Examples:

Calling the updateMLModel operation

var params = {
  MLModelId: 'STRING_VALUE', /* required */
  MLModelName: 'STRING_VALUE',
  ScoreThreshold: 'NUMBER_VALUE'
};
machinelearning.updateMLModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MLModelId — (String)

      The ID assigned to the MLModel during creation.

    • MLModelName — (String)

      A user-supplied name or description of the MLModel.

    • ScoreThreshold — (Float)

      The ScoreThreshold used in binary classification MLModel that marks the boundary between a positive prediction and a negative prediction.

      Output values greater than or equal to the ScoreThreshold receive a positive result from the MLModel, such as true. Output values less than the ScoreThreshold receive a negative response from the MLModel, such as false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MLModelId — (String)

        The ID assigned to the MLModel during creation. This value should be identical to the value of the MLModelID in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given MachineLearning resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the dataSourceAvailable state

var params = {
  // ... input parameters ...
};
machinelearning.waitFor('dataSourceAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

machinelearning.waitFor('dataSourceAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the dataSourceAvailable state by periodically calling the underlying MachineLearning.describeDataSources() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the dataSourceAvailable state

var params = {
  // ... input parameters ...
};
machinelearning.waitFor('dataSourceAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • FilterVariable — (String)

      Use one of the following variables to filter a list of DataSource:

      • CreatedAt - Sets the search criteria to DataSource creation dates.

      • Status - Sets the search criteria to DataSource statuses.

      • Name - Sets the search criteria to the contents of DataSource Name.

      • DataUri - Sets the search criteria to the URI of data files used to create the DataSource. The URI can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

      • IAMUser - Sets the search criteria to the user account that invoked the DataSource creation.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "DataLocationS3"
      • "IAMUser"
    • EQ — (String)

      The equal to operator. The DataSource results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The DataSource results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The DataSource results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The DataSource results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The DataSource results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The DataSource results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, a DataSource could have the Name 2014-09-09-HolidayGiftMailer. To search for this DataSource, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of DataSource.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The maximum number of DataSource to include in the result.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of DataSource that meet the search criteria.

        • DataSourceId — (String)

          The ID that is assigned to the DataSource during creation.

        • DataLocationS3 — (String)

          The location and name of the data in Amazon Simple Storage Service (Amazon S3) that is used by a DataSource.

        • DataRearrangement — (String)

          A JSON string that represents the splitting and rearrangement requirement used when this DataSource was created.

        • CreatedByIamUser — (String)

          The AWS user account from which the DataSource was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the DataSource was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the BatchPrediction. The time is expressed in epoch time.

        • DataSizeInBytes — (Integer)

          The total number of observations contained in the data files that the DataSource references.

        • NumberOfFiles — (Integer)

          The number of data files referenced by the DataSource.

        • Name — (String)

          A user-supplied name or description of the DataSource.

        • Status — (String)

          The current status of the DataSource. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create a DataSource.

          • INPROGRESS - The creation process is underway.

          • FAILED - The request to create a DataSource did not run to completion. It is not usable.

          • COMPLETED - The creation process completed successfully.

          • DELETED - The DataSource is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • Message — (String)

          A description of the most recent details about creating the DataSource.

        • RedshiftMetadata — (map)

          Describes the DataSource details specific to Amazon Redshift.

          • RedshiftDatabase — (map)

            Describes the database details required to connect to an Amazon Redshift database.

            • DatabaseNamerequired — (String)

              The name of a database hosted on an Amazon Redshift cluster.

            • ClusterIdentifierrequired — (String)

              The ID of an Amazon Redshift cluster.

          • DatabaseUserName — (String)

            A username to be used by Amazon Machine Learning (Amazon ML)to connect to a database on an Amazon Redshift cluster. The username should have sufficient permissions to execute the RedshiftSelectSqlQuery query. The username should be valid for an Amazon Redshift USER.

          • SelectSqlQuery — (String)

            The SQL query that is specified during CreateDataSourceFromRedshift. Returns only if Verbose is true in GetDataSourceInput.

        • RDSMetadata — (map)

          The datasource details that are specific to Amazon RDS.

          • Database — (map)

            The database details required to connect to an Amazon RDS.

            • InstanceIdentifierrequired — (String)

              The ID of an RDS DB instance.

            • DatabaseNamerequired — (String)

              The name of a database hosted on an RDS DB instance.

          • DatabaseUserName — (String)

            The username to be used by Amazon ML to connect to database on an Amazon RDS instance. The username should have sufficient permissions to execute an RDSSelectSqlQuery query.

          • SelectSqlQuery — (String)

            The SQL query that is supplied during CreateDataSourceFromRDS. Returns only if Verbose is true in GetDataSourceInput.

          • ResourceRole — (String)

            The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance to carry out the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

          • ServiceRole — (String)

            The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see Role templates for data pipelines.

          • DataPipelineId — (String)

            The ID of the Data Pipeline instance that is used to carry to copy data from Amazon RDS to Amazon S3. You can use the ID to find details about the instance in the Data Pipeline console.

        • RoleARN — (String)

          The Amazon Resource Name (ARN) of an AWS IAM Role, such as the following: arn:aws:iam::account:role/rolename.

        • ComputeStatistics — (Boolean)

          The parameter is true if statistics need to be generated from the observation data.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        An ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

machinelearning.waitFor('mLModelAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the mLModelAvailable state by periodically calling the underlying MachineLearning.describeMLModels() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the mLModelAvailable state

var params = {
  // ... input parameters ...
};
machinelearning.waitFor('mLModelAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • FilterVariable — (String)

      Use one of the following variables to filter a list of MLModel:

      • CreatedAt - Sets the search criteria to MLModel creation date.

      • Status - Sets the search criteria to MLModel status.

      • Name - Sets the search criteria to the contents of MLModel Name.

      • IAMUser - Sets the search criteria to the user account that invoked the MLModel creation.

      • TrainingDataSourceId - Sets the search criteria to the DataSource used to train one or more MLModel.

      • RealtimeEndpointStatus - Sets the search criteria to the MLModel real-time endpoint status.

      • MLModelType - Sets the search criteria to MLModel type: binary, regression, or multi-class.

      • Algorithm - Sets the search criteria to the algorithm that the MLModel uses.

      • TrainingDataURI - Sets the search criteria to the data file(s) used in training a MLModel. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "TrainingDataSourceId"
      • "RealtimeEndpointStatus"
      • "MLModelType"
      • "Algorithm"
      • "TrainingDataURI"
    • EQ — (String)

      The equal to operator. The MLModel results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The MLModel results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The MLModel results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The MLModel results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The MLModel results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The MLModel results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, an MLModel could have the Name 2014-09-09-HolidayGiftMailer. To search for this MLModel, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of MLModel.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of MLModel that meet the search criteria.

        • MLModelId — (String)

          The ID assigned to the MLModel at creation.

        • TrainingDataSourceId — (String)

          The ID of the training DataSource. The CreateMLModel operation uses the TrainingDataSourceId.

        • CreatedByIamUser — (String)

          The AWS user account from which the MLModel was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the MLModel was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the MLModel. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the MLModel.

        • Status — (String)

          The current status of an MLModel. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create an MLModel.

          • INPROGRESS - The creation process is underway.

          • FAILED - The request to create an MLModel didn't run to completion. The model isn't usable.

          • COMPLETED - The creation process completed successfully.

          • DELETED - The MLModel is marked as deleted. It isn't usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • SizeInBytes — (Integer)

          Long integer type that is a 64-bit signed number.

        • EndpointInfo — (map)

          The current endpoint of the MLModel.

          • PeakRequestsPerSecond — (Integer)

            The maximum processing rate for the real-time endpoint for MLModel, measured in incoming requests per second.

          • CreatedAt — (Date)

            The time that the request to create the real-time endpoint for the MLModel was received. The time is expressed in epoch time.

          • EndpointUrl — (String)

            The URI that specifies where to send real-time prediction requests for the MLModel.

            Note: The application must wait until the real-time endpoint is ready before using this URI.

          • EndpointStatus — (String)

            The current status of the real-time endpoint for the MLModel. This element can have one of the following values:

            • NONE - Endpoint does not exist or was previously deleted.

            • READY - Endpoint is ready to be used for real-time predictions.

            • UPDATING - Updating/creating the endpoint.

            Possible values include:
            • "NONE"
            • "READY"
            • "UPDATING"
            • "FAILED"
        • TrainingParameters — (map<String>)

          A list of the training parameters in the MLModel. The list is implemented as a map of key-value pairs.

          The following is the current set of training parameters:

          • sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

            The value is an integer that ranges from 100000 to 2147483648. The default value is 33554432.

          • sgd.maxPasses - The number of times that the training process traverses the observations to build the MLModel. The value is an integer that ranges from 1 to 10000. The default value is 10.

          • sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling the data improves a model's ability to find the optimal solution for a variety of data types. The valid values are auto and none. The default value is none.

          • sgd.l1RegularizationAmount - The coefficient regularization L1 norm, which controls overfitting the data by penalizing large coefficients. This parameter tends to drive coefficients to zero, resulting in sparse feature set. If you use this parameter, start by specifying a small value, such as 1.0E-08.

            The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L1 normalization. This parameter can't be used when L2 is specified. Use this parameter sparingly.

          • sgd.l2RegularizationAmount - The coefficient regularization L2 norm, which controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as 1.0E-08.

            The value is a double that ranges from 0 to MAX_DOUBLE. The default is to not use L2 normalization. This parameter can't be used when L1 is specified. Use this parameter sparingly.

        • InputDataLocationS3 — (String)

          The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

        • Algorithm — (String)

          The algorithm used to train the MLModel. The following algorithm is supported:

          • SGD -- Stochastic gradient descent. The goal of SGD is to minimize the gradient of the loss function.

          Possible values include:
          • "sgd"
        • MLModelType — (String)

          Identifies the MLModel category. The following are the available types:

          • REGRESSION - Produces a numeric result. For example, "What price should a house be listed at?"

          • BINARY - Produces one of two possible results. For example, "Is this a child-friendly web site?".

          • MULTICLASS - Produces one of several possible results. For example, "Is this a HIGH-, LOW-, or MEDIUM-risk trade?".

          Possible values include:
          • "REGRESSION"
          • "BINARY"
          • "MULTICLASS"
        • ScoreThreshold — (Float)
        • ScoreThresholdLastUpdatedAt — (Date)

          The time of the most recent edit to the ScoreThreshold. The time is expressed in epoch time.

        • Message — (String)

          A description of the most recent details about accessing the MLModel.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

machinelearning.waitFor('evaluationAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the evaluationAvailable state by periodically calling the underlying MachineLearning.describeEvaluations() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the evaluationAvailable state

var params = {
  // ... input parameters ...
};
machinelearning.waitFor('evaluationAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • FilterVariable — (String)

      Use one of the following variable to filter a list of Evaluation objects:

      • CreatedAt - Sets the search criteria to the Evaluation creation date.

      • Status - Sets the search criteria to the Evaluation status.

      • Name - Sets the search criteria to the contents of Evaluation Name.

      • IAMUser - Sets the search criteria to the user account that invoked an Evaluation.

      • MLModelId - Sets the search criteria to the MLModel that was evaluated.

      • DataSourceId - Sets the search criteria to the DataSource used in Evaluation.

      • DataUri - Sets the search criteria to the data file(s) used in Evaluation. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "MLModelId"
      • "DataSourceId"
      • "DataURI"
    • EQ — (String)

      The equal to operator. The Evaluation results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The Evaluation results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The Evaluation results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The Evaluation results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The Evaluation results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The Evaluation results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, an Evaluation could have the Name 2014-09-09-HolidayGiftMailer. To search for this Evaluation, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of Evaluation.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      The ID of the page in the paginated results.

    • Limit — (Integer)

      The maximum number of Evaluation to include in the result.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of Evaluation that meet the search criteria.

        • EvaluationId — (String)

          The ID that is assigned to the Evaluation at creation.

        • MLModelId — (String)

          The ID of the MLModel that is the focus of the evaluation.

        • EvaluationDataSourceId — (String)

          The ID of the DataSource that is used to evaluate the MLModel.

        • InputDataLocationS3 — (String)

          The location and name of the data in Amazon Simple Storage Server (Amazon S3) that is used in the evaluation.

        • CreatedByIamUser — (String)

          The AWS user account that invoked the evaluation. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the Evaluation was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the Evaluation. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the Evaluation.

        • Status — (String)

          The status of the evaluation. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to evaluate an MLModel.

          • INPROGRESS - The evaluation is underway.

          • FAILED - The request to evaluate an MLModel did not run to completion. It is not usable.

          • COMPLETED - The evaluation process completed successfully.

          • DELETED - The Evaluation is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • PerformanceMetrics — (map)

          Measurements of how well the MLModel performed, using observations referenced by the DataSource. One of the following metrics is returned, based on the type of the MLModel:

          • BinaryAUC: A binary MLModel uses the Area Under the Curve (AUC) technique to measure performance.

          • RegressionRMSE: A regression MLModel uses the Root Mean Square Error (RMSE) technique to measure performance. RMSE measures the difference between predicted and actual values for a single variable.

          • MulticlassAvgFScore: A multiclass MLModel uses the F1 score technique to measure performance.

          For more information about performance metrics, please see the Amazon Machine Learning Developer Guide.

          • Properties — (map<String>)
        • Message — (String)

          A description of the most recent details about evaluating the MLModel.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

machinelearning.waitFor('batchPredictionAvailable', params = {}, [callback]) ⇒ AWS.Request

Waits for the batchPredictionAvailable state by periodically calling the underlying MachineLearning.describeBatchPredictions() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the batchPredictionAvailable state

var params = {
  // ... input parameters ...
};
machinelearning.waitFor('batchPredictionAvailable', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • FilterVariable — (String)

      Use one of the following variables to filter a list of BatchPrediction:

      • CreatedAt - Sets the search criteria to the BatchPrediction creation date.

      • Status - Sets the search criteria to the BatchPrediction status.

      • Name - Sets the search criteria to the contents of the BatchPrediction Name.

      • IAMUser - Sets the search criteria to the user account that invoked the BatchPrediction creation.

      • MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.

      • DataSourceId - Sets the search criteria to the DataSource used in the BatchPrediction.

      • DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.

      Possible values include:
      • "CreatedAt"
      • "LastUpdatedAt"
      • "Status"
      • "Name"
      • "IAMUser"
      • "MLModelId"
      • "DataSourceId"
      • "DataURI"
    • EQ — (String)

      The equal to operator. The BatchPrediction results will have FilterVariable values that exactly match the value specified with EQ.

    • GT — (String)

      The greater than operator. The BatchPrediction results will have FilterVariable values that are greater than the value specified with GT.

    • LT — (String)

      The less than operator. The BatchPrediction results will have FilterVariable values that are less than the value specified with LT.

    • GE — (String)

      The greater than or equal to operator. The BatchPrediction results will have FilterVariable values that are greater than or equal to the value specified with GE.

    • LE — (String)

      The less than or equal to operator. The BatchPrediction results will have FilterVariable values that are less than or equal to the value specified with LE.

    • NE — (String)

      The not equal to operator. The BatchPrediction results will have FilterVariable values not equal to the value specified with NE.

    • Prefix — (String)

      A string that is found at the beginning of a variable, such as Name or Id.

      For example, a Batch Prediction operation could have the Name 2014-09-09-HolidayGiftMailer. To search for this BatchPrediction, select Name for the FilterVariable and any of the following strings for the Prefix:

      • 2014-09

      • 2014-09-09

      • 2014-09-09-Holiday

    • SortOrder — (String)

      A two-value parameter that determines the sequence of the resulting list of MLModels.

      • asc - Arranges the list in ascending order (A-Z, 0-9).

      • dsc - Arranges the list in descending order (Z-A, 9-0).

      Results are sorted by FilterVariable.

      Possible values include:
      • "asc"
      • "dsc"
    • NextToken — (String)

      An ID of the page in the paginated results.

    • Limit — (Integer)

      The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of BatchPrediction objects that meet the search criteria.

        • BatchPredictionId — (String)

          The ID assigned to the BatchPrediction at creation. This value should be identical to the value of the BatchPredictionID in the request.

        • MLModelId — (String)

          The ID of the MLModel that generated predictions for the BatchPrediction request.

        • BatchPredictionDataSourceId — (String)

          The ID of the DataSource that points to the group of observations to predict.

        • InputDataLocationS3 — (String)

          The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).

        • CreatedByIamUser — (String)

          The AWS user account that invoked the BatchPrediction. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.

        • CreatedAt — (Date)

          The time that the BatchPrediction was created. The time is expressed in epoch time.

        • LastUpdatedAt — (Date)

          The time of the most recent edit to the BatchPrediction. The time is expressed in epoch time.

        • Name — (String)

          A user-supplied name or description of the BatchPrediction.

        • Status — (String)

          The status of the BatchPrediction. This element can have one of the following values:

          • PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate predictions for a batch of observations.

          • INPROGRESS - The process is underway.

          • FAILED - The request to perform a batch prediction did not run to completion. It is not usable.

          • COMPLETED - The batch prediction process completed successfully.

          • DELETED - The BatchPrediction is marked as deleted. It is not usable.

          Possible values include:
          • "PENDING"
          • "INPROGRESS"
          • "FAILED"
          • "COMPLETED"
          • "DELETED"
        • OutputUri — (String)

          The location of an Amazon S3 bucket or directory to receive the operation results. The following substrings are not allowed in the s3 key portion of the outputURI field: ':', '//', '/./', '/../'.

        • Message — (String)

          A description of the most recent details about processing the batch prediction request.

        • ComputeTime — (Integer)

          Long integer type that is a 64-bit signed number.

        • FinishedAt — (Date)

          A timestamp represented in epoch time.

        • StartedAt — (Date)

          A timestamp represented in epoch time.

        • TotalRecordCount — (Integer)

          Long integer type that is a 64-bit signed number.

        • InvalidRecordCount — (Integer)

          Long integer type that is a 64-bit signed number.

      • NextToken — (String)

        The ID of the next page in the paginated results that indicates at least one more page follows.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: