AWS.MachineLearning — AWS SDK for JavaScript (original) (raw)
This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:
Property Details
endpoint ⇒ AWS.Endpoint
Returns 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.
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.
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.
``````` `````` ### 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 theDataSource
.DataSourceName
— (String
)
A user-supplied name or description of theDataSource
.DataSpec
— (map
)
The data specification of an Amazon RedshiftDataSource
:
* 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 theDatasource
.
* S3StagingLocation - The Amazon Simple Storage Service (Amazon S3) location for staging Amazon Redshift data. The data retrieved from Amazon Redshift using theSelectSqlQuery
query is stored in this location.
* DataSchemaUri - The Amazon S3 location of theDataSchema
.
* DataSchema - A JSON string representing the schema. This is not required ifDataSchemaUri
is specified.
* DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for theDataSource
.
Sample -"{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
*DatabaseInformation
— required — (map
)
Describes theDatabaseName
andClusterIdentifier
for an Amazon RedshiftDataSource
.
*DatabaseName
— required — (String
)
The name of a database hosted on an Amazon Redshift cluster.
*ClusterIdentifier
— required — (String
)
The ID of an Amazon Redshift cluster.
*SelectSqlQuery
— required — (String
)
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon RedshiftDataSource
.
*DatabaseCredentials
— required — (map
)
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
*Username
— required — (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 theRedshiftSelectSqlQuery
query. The username should be valid for an Amazon Redshift USER.
*Password
— required — (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 aRedshiftSelectSqlQuery
query. The password should be valid for an Amazon Redshift USER.
*S3StagingLocation
— required — (String
)
Describes an Amazon S3 location to store the result set of theSelectSqlQuery
query.
*DataRearrangement
— (String
)
A JSON string that represents the splitting and rearrangement processing to be applied to aDataSource
. If theDataRearrangement
parameter is not provided, all of the input data is used to create theDatasource
.
There are multiple parameters that control what data is used to create a datasource:
*percentBegin
UsepercentBegin
to indicate the beginning of the range of the data used to create the Datasource. If you do not includepercentBegin
andpercentEnd
, Amazon ML includes all of the data when creating the datasource.
*percentEnd
UsepercentEnd
to indicate the end of the range of the data used to create the Datasource. If you do not includepercentBegin
andpercentEnd
, Amazon ML includes all of the data when creating the datasource.
*complement
Thecomplement
parameter instructs Amazon ML to use the data that is not included in the range ofpercentBegin
topercentEnd
to create a datasource. Thecomplement
parameter is useful if you need to create complementary datasources for training and evaluation. To create a complementary datasource, use the same values forpercentBegin
andpercentEnd
, along with thecomplement
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 thestrategy
parameter.
The default value for thestrategy
parameter issequential
, meaning that Amazon ML takes all of the data records between thepercentBegin
andpercentEnd
parameters for the datasource, in the order that the records appear in the input data.
The following twoDataRearrangement
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 thestrategy
parameter torandom
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 betweenpercentBegin
andpercentEnd
. 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 twoDataRearrangement
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 RedshiftDataSource
. TheDataSchema
defines the structure of the observation data in the data file(s) referenced in theDataSource
.
ADataSchema
is not required if you specify aDataSchemaUri
.
Define yourDataSchema
as a series of key-value pairs.attributes
andexcludedVariableNames
have an array of key-value pairs for their value. Use the following format to define yourDataSchema
.
{ "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 RedshiftDataSource
.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 theSelectSqlQuery
query on an Amazon Redshift cluster
* An Amazon S3 bucket policy to grant Amazon ML read/write permissions on theS3StagingLocation
ComputeStatistics
— (Boolean
)
The compute statistics for aDataSource
. The statistics are generated from the observation data referenced by aDataSource
. Amazon ML uses the statistics internally duringMLModel
training. This parameter must be set totrue
if theDataSource
needs to be used forMLModel
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.
Returns:
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 theDataSource
.DataSourceName
— (String
)
A user-supplied name or description of theDataSource
.DataSpec
— (map
)
The data specification of aDataSource
:
* DataLocationS3 - The Amazon S3 location of the observation data.
* DataSchemaLocationS3 - The Amazon S3 location of theDataSchema
.
* DataSchema - A JSON string representing the schema. This is not required ifDataSchemaUri
is specified.
* DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for theDatasource
.
Sample -"{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
*DataLocationS3
— required — (String
)
The location of the data file(s) used by aDataSource
. 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 aDataSource
. If theDataRearrangement
parameter is not provided, all of the input data is used to create theDatasource
.
There are multiple parameters that control what data is used to create a datasource:
*percentBegin
UsepercentBegin
to indicate the beginning of the range of the data used to create the Datasource. If you do not includepercentBegin
andpercentEnd
, Amazon ML includes all of the data when creating the datasource.
*percentEnd
UsepercentEnd
to indicate the end of the range of the data used to create the Datasource. If you do not includepercentBegin
andpercentEnd
, Amazon ML includes all of the data when creating the datasource.
*complement
Thecomplement
parameter instructs Amazon ML to use the data that is not included in the range ofpercentBegin
topercentEnd
to create a datasource. Thecomplement
parameter is useful if you need to create complementary datasources for training and evaluation. To create a complementary datasource, use the same values forpercentBegin
andpercentEnd
, along with thecomplement
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 thestrategy
parameter.
The default value for thestrategy
parameter issequential
, meaning that Amazon ML takes all of the data records between thepercentBegin
andpercentEnd
parameters for the datasource, in the order that the records appear in the input data.
The following twoDataRearrangement
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 thestrategy
parameter torandom
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 betweenpercentBegin
andpercentEnd
. 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 twoDataRearrangement
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 S3DataSource
. TheDataSchema
defines the structure of the observation data in the data file(s) referenced in theDataSource
.
You must provide either theDataSchema
or theDataSchemaLocationS3
.
Define yourDataSchema
as a series of key-value pairs.attributes
andexcludedVariableNames
have an array of key-value pairs for their value. Use the following format to define yourDataSchema
.
{ "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 theDataSchema
or theDataSchemaLocationS3
.ComputeStatistics
— (Boolean
)
The compute statistics for aDataSource
. The statistics are generated from the observation data referenced by aDataSource
. Amazon ML uses the statistics internally duringMLModel
training. This parameter must be set totrue
if theDataSource`` 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 tonull
if the request is successful. - data (Object) —
the de-serialized data returned from the request. Set tonull
if a request error occurs. Thedata
object has the following properties:
*DataSourceId
— (String
)
A user-supplied ID that uniquely identifies theDataSource
. This value should be identical to the value of theDataSourceID
in the request.
- (AWS.Response) —
Returns:
````` ```` ### 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 theEvaluation
.EvaluationName
— (String
)
A user-supplied name or description of theEvaluation
.MLModelId
— (String
)
The ID of theMLModel
to evaluate.
The schema used in creating theMLModel
must match the schema of theDataSource
used in theEvaluation
.EvaluationDataSourceId
— (String
)
The ID of theDataSource
for the evaluation. The schema of theDataSource
must match the schema used to create theMLModel
.
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.
Returns:
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 theMLModel
.MLModelName
— (String
)
A user-supplied name or description of theMLModel
.MLModelType
— (String
)
The category of supervised learning that thisMLModel
will address. Choose from the following types:
* ChooseREGRESSION
if theMLModel
will be used to predict a numeric value.
* ChooseBINARY
if theMLModel
result has two possible values.
* ChooseMULTICLASS
if theMLModel
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 theMLModel
. 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 from100000
to2147483648
. The default value is33554432
.
*sgd.maxPasses
- The number of times that the training process traverses the observations to build theMLModel
. The value is an integer that ranges from1
to10000
. The default value is10
.
*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 areauto
andnone
. The default value isnone
. 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 as1.0E-08
.
The value is a double that ranges from0
toMAX_DOUBLE
. The default is to not use L1 normalization. This parameter can't be used whenL2
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 as1.0E-08
.
The value is a double that ranges from0
toMAX_DOUBLE
. The default is to not use L2 normalization. This parameter can't be used whenL1
is specified. Use this parameter sparingly.TrainingDataSourceId
— (String
)
TheDataSource
that points to the training data.Recipe
— (String
)
The data recipe for creating theMLModel
. 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 theMLModel
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.
Returns:
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 theMLModel
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.
Returns:
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 theBatchPrediction
.
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.
Returns:
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 theDataSource
.
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.
Returns:
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 theEvaluation
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.
Returns:
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 theMLModel
.
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.
Returns:
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 theMLModel
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.
Returns:
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.
Returns:
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 ofBatchPrediction
:
*CreatedAt
- Sets the search criteria to theBatchPrediction
creation date.
*Status
- Sets the search criteria to theBatchPrediction
status.
*Name
- Sets the search criteria to the contents of theBatchPrediction
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked theBatchPrediction
creation.
*MLModelId
- Sets the search criteria to theMLModel
used in theBatchPrediction
.
*DataSourceId
- Sets the search criteria to theDataSource
used in theBatchPrediction
.
*DataURI
- Sets the search criteria to the data file(s) used in theBatchPrediction
. 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. TheBatchPrediction
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheBatchPrediction
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheBatchPrediction
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheBatchPrediction
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheBatchPrediction
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheBatchPrediction
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, aBatch Prediction
operation could have theName
2014-09-09-HolidayGiftMailer
. To search for thisBatchPrediction
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofMLModel
s.
*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 is1
through100
. The default value is100
.
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.
Returns:
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 ofDataSource
:
*CreatedAt
- Sets the search criteria toDataSource
creation dates.
*Status
- Sets the search criteria toDataSource
statuses.
*Name
- Sets the search criteria to the contents ofDataSource
Name
.
*DataUri
- Sets the search criteria to the URI of data files used to create theDataSource
. 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 theDataSource
creation.
Possible values include:
*"CreatedAt"
*"LastUpdatedAt"
*"Status"
*"Name"
*"DataLocationS3"
*"IAMUser"
EQ
— (String
)
The equal to operator. TheDataSource
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheDataSource
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheDataSource
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheDataSource
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheDataSource
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheDataSource
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, aDataSource
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisDataSource
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofDataSource
.
*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 ofDataSource
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.
Returns:
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 ofEvaluation
objects:
*CreatedAt
- Sets the search criteria to theEvaluation
creation date.
*Status
- Sets the search criteria to theEvaluation
status.
*Name
- Sets the search criteria to the contents ofEvaluation
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked anEvaluation
.
*MLModelId
- Sets the search criteria to theMLModel
that was evaluated.
*DataSourceId
- Sets the search criteria to theDataSource
used inEvaluation
.
*DataUri
- Sets the search criteria to the data file(s) used inEvaluation
. 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. TheEvaluation
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheEvaluation
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheEvaluation
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheEvaluation
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheEvaluation
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheEvaluation
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, anEvaluation
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisEvaluation
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofEvaluation
.
*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 ofEvaluation
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.
Returns:
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 ofMLModel
:
*CreatedAt
- Sets the search criteria toMLModel
creation date.
*Status
- Sets the search criteria toMLModel
status.
*Name
- Sets the search criteria to the contents ofMLModel
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked theMLModel
creation.
*TrainingDataSourceId
- Sets the search criteria to theDataSource
used to train one or moreMLModel
.
*RealtimeEndpointStatus
- Sets the search criteria to theMLModel
real-time endpoint status.
*MLModelType
- Sets the search criteria toMLModel
type: binary, regression, or multi-class.
*Algorithm
- Sets the search criteria to the algorithm that theMLModel
uses.
*TrainingDataURI
- Sets the search criteria to the data file(s) used in training aMLModel
. 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. TheMLModel
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheMLModel
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheMLModel
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheMLModel
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheMLModel
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheMLModel
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, anMLModel
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisMLModel
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofMLModel
.
*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 is1
through100
. The default value is100
.
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.
Returns:
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.
Returns:
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 theBatchPrediction
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.
Returns:
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 theDataSource
at creation.Verbose
— (Boolean
)
Specifies whether theGetDataSource
operation should returnDataSourceSchema
.
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.
Returns:
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 theEvaluation
to retrieve. The evaluation of eachMLModel
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.
Returns:
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 theMLModel
at creation.Verbose
— (Boolean
)
Specifies whether theGetMLModel
operation should returnRecipe
.
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.
Returns:
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 theMLModel
.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.
Returns:
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 theBatchPrediction
during creation.BatchPredictionName
— (String
)
A new user-supplied name or description of theBatchPrediction
.
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.
Returns:
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 theDataSource
during creation.DataSourceName
— (String
)
A new user-supplied name or description of theDataSource
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.
Returns:
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 theEvaluation
during creation.EvaluationName
— (String
)
A new user-supplied name or description of theEvaluation
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.
Returns:
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 theMLModel
during creation.MLModelName
— (String
)
A user-supplied name or description of theMLModel
.ScoreThreshold
— (Float
)
TheScoreThreshold
used in binary classificationMLModel
that marks the boundary between a positive prediction and a negative prediction.
Output values greater than or equal to theScoreThreshold
receive a positive result from theMLModel
, such astrue
. Output values less than theScoreThreshold
receive a negative response from theMLModel
, such asfalse
.
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.
Returns:
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 aResourceNotReady
error.
Returns:
Waiter Resource States:
```` ````` `````` ```````
````` ```` ## Waiter Resource Details
machinelearning.waitFor('dataSourceAvailable', params = {}, [callback]) ⇒ AWS.Request
Waits for the dataSourceAvailable
state by periodically calling the underlyingMachineLearning.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 ofDataSource
:
*CreatedAt
- Sets the search criteria toDataSource
creation dates.
*Status
- Sets the search criteria toDataSource
statuses.
*Name
- Sets the search criteria to the contents ofDataSource
Name
.
*DataUri
- Sets the search criteria to the URI of data files used to create theDataSource
. 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 theDataSource
creation.
Possible values include:
*"CreatedAt"
*"LastUpdatedAt"
*"Status"
*"Name"
*"DataLocationS3"
*"IAMUser"
EQ
— (String
)
The equal to operator. TheDataSource
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheDataSource
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheDataSource
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheDataSource
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheDataSource
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheDataSource
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, aDataSource
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisDataSource
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofDataSource
.
*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 ofDataSource
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.
Returns:
See Also:
machinelearning.waitFor('mLModelAvailable', params = {}, [callback]) ⇒ AWS.Request
Waits for the mLModelAvailable
state by periodically calling the underlyingMachineLearning.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 ofMLModel
:
*CreatedAt
- Sets the search criteria toMLModel
creation date.
*Status
- Sets the search criteria toMLModel
status.
*Name
- Sets the search criteria to the contents ofMLModel
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked theMLModel
creation.
*TrainingDataSourceId
- Sets the search criteria to theDataSource
used to train one or moreMLModel
.
*RealtimeEndpointStatus
- Sets the search criteria to theMLModel
real-time endpoint status.
*MLModelType
- Sets the search criteria toMLModel
type: binary, regression, or multi-class.
*Algorithm
- Sets the search criteria to the algorithm that theMLModel
uses.
*TrainingDataURI
- Sets the search criteria to the data file(s) used in training aMLModel
. 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. TheMLModel
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheMLModel
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheMLModel
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheMLModel
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheMLModel
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheMLModel
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, anMLModel
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisMLModel
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofMLModel
.
*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 is1
through100
. The default value is100
.
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.
Returns:
See Also:
machinelearning.waitFor('evaluationAvailable', params = {}, [callback]) ⇒ AWS.Request
Waits for the evaluationAvailable
state by periodically calling the underlyingMachineLearning.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 ofEvaluation
objects:
*CreatedAt
- Sets the search criteria to theEvaluation
creation date.
*Status
- Sets the search criteria to theEvaluation
status.
*Name
- Sets the search criteria to the contents ofEvaluation
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked anEvaluation
.
*MLModelId
- Sets the search criteria to theMLModel
that was evaluated.
*DataSourceId
- Sets the search criteria to theDataSource
used inEvaluation
.
*DataUri
- Sets the search criteria to the data file(s) used inEvaluation
. 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. TheEvaluation
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheEvaluation
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheEvaluation
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheEvaluation
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheEvaluation
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheEvaluation
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, anEvaluation
could have theName
2014-09-09-HolidayGiftMailer
. To search for thisEvaluation
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofEvaluation
.
*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 ofEvaluation
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.
Returns:
See Also:
machinelearning.waitFor('batchPredictionAvailable', params = {}, [callback]) ⇒ AWS.Request
Waits for the batchPredictionAvailable
state by periodically calling the underlyingMachineLearning.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 ofBatchPrediction
:
*CreatedAt
- Sets the search criteria to theBatchPrediction
creation date.
*Status
- Sets the search criteria to theBatchPrediction
status.
*Name
- Sets the search criteria to the contents of theBatchPrediction
Name
.
*IAMUser
- Sets the search criteria to the user account that invoked theBatchPrediction
creation.
*MLModelId
- Sets the search criteria to theMLModel
used in theBatchPrediction
.
*DataSourceId
- Sets the search criteria to theDataSource
used in theBatchPrediction
.
*DataURI
- Sets the search criteria to the data file(s) used in theBatchPrediction
. 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. TheBatchPrediction
results will haveFilterVariable
values that exactly match the value specified withEQ
.GT
— (String
)
The greater than operator. TheBatchPrediction
results will haveFilterVariable
values that are greater than the value specified withGT
.LT
— (String
)
The less than operator. TheBatchPrediction
results will haveFilterVariable
values that are less than the value specified withLT
.GE
— (String
)
The greater than or equal to operator. TheBatchPrediction
results will haveFilterVariable
values that are greater than or equal to the value specified withGE
.LE
— (String
)
The less than or equal to operator. TheBatchPrediction
results will haveFilterVariable
values that are less than or equal to the value specified withLE
.NE
— (String
)
The not equal to operator. TheBatchPrediction
results will haveFilterVariable
values not equal to the value specified withNE
.Prefix
— (String
)
A string that is found at the beginning of a variable, such asName
orId
.
For example, aBatch Prediction
operation could have theName
2014-09-09-HolidayGiftMailer
. To search for thisBatchPrediction
, selectName
for theFilterVariable
and any of the following strings for thePrefix
:
* 2014-09
* 2014-09-09
* 2014-09-09-HolidaySortOrder
— (String
)
A two-value parameter that determines the sequence of the resulting list ofMLModel
s.
*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 is1
through100
. The default value is100
.
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.
Returns:
See Also:
```` `````