aws_sdk_machinelearning/client/create_ml_model.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateMLModel`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`ml_model_id(impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::ml_model_id) / [`set_ml_model_id(Option<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_ml_model_id):<br>required: **true**<br><p>A user-supplied ID that uniquely identifies the <code>MLModel</code>.</p><br>
7 /// - [`ml_model_name(impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::ml_model_name) / [`set_ml_model_name(Option<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_ml_model_name):<br>required: **false**<br><p>A user-supplied name or description of the <code>MLModel</code>.</p><br>
8 /// - [`ml_model_type(MlModelType)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::ml_model_type) / [`set_ml_model_type(Option<MlModelType>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_ml_model_type):<br>required: **true**<br><p>The category of supervised learning that this <code>MLModel</code> will address. Choose from the following types:</p> <ul> <li> <p>Choose <code>REGRESSION</code> if the <code>MLModel</code> will be used to predict a numeric value.</p></li> <li> <p>Choose <code>BINARY</code> if the <code>MLModel</code> result has two possible values.</p></li> <li> <p>Choose <code>MULTICLASS</code> if the <code>MLModel</code> result has a limited number of values.</p></li> </ul> <p>For more information, see the <a href="https://docs.aws.amazon.com/machine-learning/latest/dg">Amazon Machine Learning Developer Guide</a>.</p><br>
9 /// - [`parameters(impl Into<String>, impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::parameters) / [`set_parameters(Option<HashMap::<String, String>>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_parameters):<br>required: **false**<br><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>. We strongly recommend that you shuffle your data.</p></li> <li> <p><code>sgd.l1RegularizationAmount</code> - 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 <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. 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 <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><br>
10 /// - [`training_data_source_id(impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::training_data_source_id) / [`set_training_data_source_id(Option<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_training_data_source_id):<br>required: **true**<br><p>The <code>DataSource</code> that points to the training data.</p><br>
11 /// - [`recipe(impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::recipe) / [`set_recipe(Option<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_recipe):<br>required: **false**<br><p>The data recipe for creating the <code>MLModel</code>. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.</p><br>
12 /// - [`recipe_uri(impl Into<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::recipe_uri) / [`set_recipe_uri(Option<String>)`](crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::set_recipe_uri):<br>required: **false**<br><p>The Amazon Simple Storage Service (Amazon S3) location and file name that contains the <code>MLModel</code> 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.</p><br>
13 /// - On success, responds with [`CreateMlModelOutput`](crate::operation::create_ml_model::CreateMlModelOutput) with field(s):
14 /// - [`ml_model_id(Option<String>)`](crate::operation::create_ml_model::CreateMlModelOutput::ml_model_id): <p>A user-supplied ID that uniquely identifies the <code>MLModel</code>. This value should be identical to the value of the <code>MLModelId</code> in the request.</p>
15 /// - On failure, responds with [`SdkError<CreateMLModelError>`](crate::operation::create_ml_model::CreateMLModelError)
16 pub fn create_ml_model(&self) -> crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder {
17 crate::operation::create_ml_model::builders::CreateMLModelFluentBuilder::new(self.handle.clone())
18 }
19}