Skip to content

MLModel

Source code in docs_src/capo_machine_learning/types/ml_model.py
class MLModel(TypedDict, closed=True):
    ml_model_id: NotRequired["capo_machine_learning.types.entity_id.EntityId"]
    """<p>The ID assigned to the <code>MLModel</code> at creation.</p>"""
    training_data_source_id: NotRequired[
        "capo_machine_learning.types.entity_id.EntityId"
    ]
    """<p>The ID of the training <code>DataSource</code>. The <code>CreateMLModel</code> operation uses the <code>TrainingDataSourceId</code>.</p>"""
    created_by_iam_user: NotRequired[
        "capo_machine_learning.types.aws_user_arn.AwsUserArn"
    ]
    """<p>The AWS user account from which the <code>MLModel</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.</p>"""
    created_at: NotRequired["capo_machine_learning.types.epoch_time.EpochTime"]
    """<p>The time that the <code>MLModel</code> was created. The time is expressed in epoch time.</p>"""
    last_updated_at: NotRequired["capo_machine_learning.types.epoch_time.EpochTime"]
    """<p>The time of the most recent edit to the <code>MLModel</code>. The time is expressed in epoch time.</p>"""
    name: NotRequired["capo_machine_learning.types.ml_model_name.MLModelName"]
    """<p>A user-supplied name or description of the <code>MLModel</code>.</p>"""
    status: NotRequired["capo_machine_learning.types.entity_status.EntityStatus"]
    """<p>The current status of an <code>MLModel</code>. This element can have one of the following values: </p> <ul> <li> <p> <code>PENDING</code> - Amazon Machine Learning (Amazon ML) submitted a request to create an <code>MLModel</code>.</p> </li> <li> <p> <code>INPROGRESS</code> - The creation process is underway.</p> </li> <li> <p> <code>FAILED</code> - The request to create an <code>MLModel</code> didn't run to completion. The model isn't usable.</p> </li> <li> <p> <code>COMPLETED</code> - The creation process completed successfully.</p> </li> <li> <p> <code>DELETED</code> - The <code>MLModel</code> is marked as deleted. It isn't usable.</p> </li> </ul>"""
    size_in_bytes: NotRequired["capo_machine_learning.types.long_type.LongType"]
    endpoint_info: NotRequired[
        "capo_machine_learning.types.realtime_endpoint_info.RealtimeEndpointInfo"
    ]
    """<p>The current endpoint of the <code>MLModel</code>.</p>"""
    training_parameters: NotRequired[
        "capo_machine_learning.types.training_parameters.TrainingParameters"
    ]
    """<p>A list of the training parameters in the <code>MLModel</code>. The list is implemented as a map of key-value pairs.</p> <p>The following is the current set of training parameters:</p> <ul> <li> <p> <code>sgd.maxMLModelSizeInBytes</code> - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.</p> <p> The value is an integer that ranges from <code>100000</code> to <code>2147483648</code>. The default value is <code>33554432</code>.</p> </li> <li> <p> <code>sgd.maxPasses</code> - The number of times that the training process traverses the observations to build the <code>MLModel</code>. The value is an integer that ranges from <code>1</code> to <code>10000</code>. The default value is <code>10</code>.</p> </li> <li> <p> <code>sgd.shuffleType</code> - 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 <code>auto</code> and <code>none</code>. The default value is <code>none</code>.</p> </li> <li> <p> <code>sgd.l1RegularizationAmount</code> - 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 <code>1.0E-08</code>.</p> <p>The value is a double that ranges from <code>0</code> to <code>MAX_DOUBLE</code>. The default is to not use L1 normalization. This parameter can't be used when <code>L2</code> is specified. Use this parameter sparingly.</p> </li> <li> <p> <code>sgd.l2RegularizationAmount</code> - 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 <code>1.0E-08</code>.</p> <p>The value is a double that ranges from <code>0</code> to <code>MAX_DOUBLE</code>. The default is to not use L2 normalization. This parameter can't be used when <code>L1</code> is specified. Use this parameter sparingly.</p> </li> </ul>"""
    input_data_location_s3: NotRequired["capo_machine_learning.types.s3_url.S3Url"]
    """<p>The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</p>"""
    algorithm: NotRequired["capo_machine_learning.types.algorithm.Algorithm"]
    """<p>The algorithm used to train the <code>MLModel</code>. The following algorithm is supported:</p> <ul> <li> <p> <code>SGD</code> -- Stochastic gradient descent. The goal of <code>SGD</code> is to minimize the gradient of the loss function. </p> </li> </ul>"""
    ml_model_type: NotRequired["capo_machine_learning.types.ml_model_type.MLModelType"]
    """<p>Identifies the <code>MLModel</code> category. The following are the available types:</p> <ul> <li> <p> <code>REGRESSION</code> - Produces a numeric result. For example, "What price should a house be listed at?"</p> </li> <li> <p> <code>BINARY</code> - Produces one of two possible results. For example, "Is this a child-friendly web site?".</p> </li> <li> <p> <code>MULTICLASS</code> - Produces one of several possible results. For example, "Is this a HIGH-, LOW-, or MEDIUM-risk trade?".</p> </li> </ul>"""
    score_threshold: NotRequired[
        "capo_machine_learning.types.score_threshold.ScoreThreshold"
    ]
    score_threshold_last_updated_at: NotRequired[
        "capo_machine_learning.types.epoch_time.EpochTime"
    ]
    """<p>The time of the most recent edit to the <code>ScoreThreshold</code>. The time is expressed in epoch time.</p>"""
    message: NotRequired["capo_machine_learning.types.message.Message"]
    """<p>A description of the most recent details about accessing the <code>MLModel</code>.</p>"""
    compute_time: NotRequired["capo_machine_learning.types.long_type.LongType"]
    finished_at: NotRequired["capo_machine_learning.types.epoch_time.EpochTime"]
    started_at: NotRequired["capo_machine_learning.types.epoch_time.EpochTime"]

algorithm instance-attribute

algorithm: NotRequired[Algorithm]

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.

compute_time instance-attribute

compute_time: NotRequired[LongType]

created_at instance-attribute

created_at: NotRequired[EpochTime]

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

created_by_iam_user instance-attribute

created_by_iam_user: NotRequired[AwsUserArn]

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.

endpoint_info instance-attribute

endpoint_info: NotRequired[RealtimeEndpointInfo]

The current endpoint of the MLModel.

finished_at instance-attribute

finished_at: NotRequired[EpochTime]

input_data_location_s3 instance-attribute

input_data_location_s3: NotRequired[S3Url]

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

last_updated_at instance-attribute

last_updated_at: NotRequired[EpochTime]

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

message instance-attribute

message: NotRequired[Message]

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

ml_model_id instance-attribute

ml_model_id: NotRequired[EntityId]

The ID assigned to the MLModel at creation.

ml_model_type instance-attribute

ml_model_type: NotRequired[MLModelType]

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?".

name instance-attribute

name: NotRequired[MLModelName]

A user-supplied name or description of the MLModel.

score_threshold instance-attribute

score_threshold: NotRequired[ScoreThreshold]

score_threshold_last_updated_at instance-attribute

score_threshold_last_updated_at: NotRequired[EpochTime]

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

size_in_bytes instance-attribute

size_in_bytes: NotRequired[LongType]

started_at instance-attribute

started_at: NotRequired[EpochTime]

status instance-attribute

status: NotRequired[EntityStatus]

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.

training_data_source_id instance-attribute

training_data_source_id: NotRequired[EntityId]

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

training_parameters instance-attribute

training_parameters: NotRequired[TrainingParameters]

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.