aws_sdk_forecast/client/create_predictor.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 [`CreatePredictor`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`predictor_name(impl Into<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::predictor_name) / [`set_predictor_name(Option<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_predictor_name):<br>required: **true**<br><p>A name for the predictor.</p><br>
7 /// - [`algorithm_arn(impl Into<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::algorithm_arn) / [`set_algorithm_arn(Option<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_algorithm_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the algorithm to use for model training. Required if <code>PerformAutoML</code> is not set to <code>true</code>.</p> <p class="title"><b>Supported algorithms:</b></p> <ul> <li> <p><code>arn:aws:forecast:::algorithm/ARIMA</code></p></li> <li> <p><code>arn:aws:forecast:::algorithm/CNN-QR</code></p></li> <li> <p><code>arn:aws:forecast:::algorithm/Deep_AR_Plus</code></p></li> <li> <p><code>arn:aws:forecast:::algorithm/ETS</code></p></li> <li> <p><code>arn:aws:forecast:::algorithm/NPTS</code></p></li> <li> <p><code>arn:aws:forecast:::algorithm/Prophet</code></p></li> </ul><br>
8 /// - [`forecast_horizon(i32)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::forecast_horizon) / [`set_forecast_horizon(Option<i32>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_forecast_horizon):<br>required: **true**<br><p>Specifies the number of time-steps that the model is trained to predict. The forecast horizon is also called the prediction length.</p> <p>For example, if you configure a dataset for daily data collection (using the <code>DataFrequency</code> parameter of the <code>CreateDataset</code> operation) and set the forecast horizon to 10, the model returns predictions for 10 days.</p> <p>The maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.</p><br>
9 /// - [`forecast_types(impl Into<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::forecast_types) / [`set_forecast_types(Option<Vec::<String>>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_forecast_types):<br>required: **false**<br><p>Specifies the forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with <code>mean</code>.</p> <p>The default value is <code>\["0.10", "0.50", "0.9"\]</code>.</p><br>
10 /// - [`perform_auto_ml(bool)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::perform_auto_ml) / [`set_perform_auto_ml(Option<bool>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_perform_auto_ml):<br>required: **false**<br><p>Whether to perform AutoML. When Amazon Forecast performs AutoML, it evaluates the algorithms it provides and chooses the best algorithm and configuration for your training dataset.</p> <p>The default value is <code>false</code>. In this case, you are required to specify an algorithm.</p> <p>Set <code>PerformAutoML</code> to <code>true</code> to have Amazon Forecast perform AutoML. This is a good option if you aren't sure which algorithm is suitable for your training data. In this case, <code>PerformHPO</code> must be false.</p><br>
11 /// - [`auto_ml_override_strategy(AutoMlOverrideStrategy)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::auto_ml_override_strategy) / [`set_auto_ml_override_strategy(Option<AutoMlOverrideStrategy>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_auto_ml_override_strategy):<br>required: **false**<br><note> <p>The <code>LatencyOptimized</code> AutoML override strategy is only available in private beta. Contact Amazon Web Services Support or your account manager to learn more about access privileges.</p> </note> <p>Used to overide the default AutoML strategy, which is to optimize predictor accuracy. To apply an AutoML strategy that minimizes training time, use <code>LatencyOptimized</code>.</p> <p>This parameter is only valid for predictors trained using AutoML.</p><br>
12 /// - [`perform_hpo(bool)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::perform_hpo) / [`set_perform_hpo(Option<bool>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_perform_hpo):<br>required: **false**<br><p>Whether to perform hyperparameter optimization (HPO). HPO finds optimal hyperparameter values for your training data. The process of performing HPO is known as running a hyperparameter tuning job.</p> <p>The default value is <code>false</code>. In this case, Amazon Forecast uses default hyperparameter values from the chosen algorithm.</p> <p>To override the default values, set <code>PerformHPO</code> to <code>true</code> and, optionally, supply the <code>HyperParameterTuningJobConfig</code> object. The tuning job specifies a metric to optimize, which hyperparameters participate in tuning, and the valid range for each tunable hyperparameter. In this case, you are required to specify an algorithm and <code>PerformAutoML</code> must be false.</p> <p>The following algorithms support HPO:</p> <ul> <li> <p>DeepAR+</p></li> <li> <p>CNN-QR</p></li> </ul><br>
13 /// - [`training_parameters(impl Into<String>, impl Into<String>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::training_parameters) / [`set_training_parameters(Option<HashMap::<String, String>>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_training_parameters):<br>required: **false**<br><p>The hyperparameters to override for model training. The hyperparameters that you can override are listed in the individual algorithms. For the list of supported algorithms, see <code>aws-forecast-choosing-recipes</code>.</p><br>
14 /// - [`evaluation_parameters(EvaluationParameters)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::evaluation_parameters) / [`set_evaluation_parameters(Option<EvaluationParameters>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_evaluation_parameters):<br>required: **false**<br><p>Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.</p><br>
15 /// - [`hpo_config(HyperParameterTuningJobConfig)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::hpo_config) / [`set_hpo_config(Option<HyperParameterTuningJobConfig>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_hpo_config):<br>required: **false**<br><p>Provides hyperparameter override values for the algorithm. If you don't provide this parameter, Amazon Forecast uses default values. The individual algorithms specify which hyperparameters support hyperparameter optimization (HPO). For more information, see <code>aws-forecast-choosing-recipes</code>.</p> <p>If you included the <code>HPOConfig</code> object, you must set <code>PerformHPO</code> to true.</p><br>
16 /// - [`input_data_config(InputDataConfig)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::input_data_config) / [`set_input_data_config(Option<InputDataConfig>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_input_data_config):<br>required: **true**<br><p>Describes the dataset group that contains the data to use to train the predictor.</p><br>
17 /// - [`featurization_config(FeaturizationConfig)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::featurization_config) / [`set_featurization_config(Option<FeaturizationConfig>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_featurization_config):<br>required: **true**<br><p>The featurization configuration.</p><br>
18 /// - [`encryption_config(EncryptionConfig)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::encryption_config) / [`set_encryption_config(Option<EncryptionConfig>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_encryption_config):<br>required: **false**<br><p>An Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.</p><br>
19 /// - [`tags(Tag)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_tags):<br>required: **false**<br><p>The optional metadata that you apply to the predictor to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p> <p>The following basic restrictions apply to tags:</p> <ul> <li> <p>Maximum number of tags per resource - 50.</p></li> <li> <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li> <li> <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li> <li> <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li> <li> <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li> <li> <p>Tag keys and values are case sensitive.</p></li> <li> <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for keys as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, then Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit.</p></li> </ul><br>
20 /// - [`optimization_metric(OptimizationMetric)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::optimization_metric) / [`set_optimization_metric(Option<OptimizationMetric>)`](crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::set_optimization_metric):<br>required: **false**<br><p>The accuracy metric used to optimize the predictor.</p><br>
21 /// - On success, responds with [`CreatePredictorOutput`](crate::operation::create_predictor::CreatePredictorOutput) with field(s):
22 /// - [`predictor_arn(Option<String>)`](crate::operation::create_predictor::CreatePredictorOutput::predictor_arn): <p>The Amazon Resource Name (ARN) of the predictor.</p>
23 /// - On failure, responds with [`SdkError<CreatePredictorError>`](crate::operation::create_predictor::CreatePredictorError)
24 pub fn create_predictor(&self) -> crate::operation::create_predictor::builders::CreatePredictorFluentBuilder {
25 crate::operation::create_predictor::builders::CreatePredictorFluentBuilder::new(self.handle.clone())
26 }
27}