blib/lib/Paws/Forecast/CreatePredictor.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Forecast::CreatePredictor;
3 use Moose;
4 has AlgorithmArn => (is => 'ro', isa => 'Str');
5 has AutoMLOverrideStrategy => (is => 'ro', isa => 'Str');
6 has EncryptionConfig => (is => 'ro', isa => 'Paws::Forecast::EncryptionConfig');
7 has EvaluationParameters => (is => 'ro', isa => 'Paws::Forecast::EvaluationParameters');
8 has FeaturizationConfig => (is => 'ro', isa => 'Paws::Forecast::FeaturizationConfig', required => 1);
9 has ForecastHorizon => (is => 'ro', isa => 'Int', required => 1);
10 has ForecastTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
11 has HPOConfig => (is => 'ro', isa => 'Paws::Forecast::HyperParameterTuningJobConfig');
12 has InputDataConfig => (is => 'ro', isa => 'Paws::Forecast::InputDataConfig', required => 1);
13 has PerformAutoML => (is => 'ro', isa => 'Bool');
14 has PerformHPO => (is => 'ro', isa => 'Bool');
15 has PredictorName => (is => 'ro', isa => 'Str', required => 1);
16 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Forecast::Tag]');
17 has TrainingParameters => (is => 'ro', isa => 'Paws::Forecast::TrainingParameters');
18  
19 use MooseX::ClassAttribute;
20  
21 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreatePredictor');
22 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Forecast::CreatePredictorResponse');
23 class_has _result_key => (isa => 'Str', is => 'ro');
24 1;
25  
26 ### main pod documentation begin ###
27  
28 =head1 NAME
29  
30 Paws::Forecast::CreatePredictor - Arguments for method CreatePredictor on L<Paws::Forecast>
31  
32 =head1 DESCRIPTION
33  
34 This class represents the parameters used for calling the method CreatePredictor on the
35 L<Amazon Forecast Service|Paws::Forecast> service. Use the attributes of this class
36 as arguments to method CreatePredictor.
37  
38 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreatePredictor.
39  
40 =head1 SYNOPSIS
41  
42 my $forecast = Paws->service('Forecast');
43 my $CreatePredictorResponse = $forecast->CreatePredictor(
44 FeaturizationConfig => {
45 ForecastFrequency => 'MyFrequency',
46 Featurizations => [
47 {
48 AttributeName => 'MyName', # min: 1, max: 63
49 FeaturizationPipeline => [
50 {
51 FeaturizationMethodName => 'filling', # values: filling
52 FeaturizationMethodParameters => {
53 'MyParameterKey' =>
54 'MyParameterValue', # key: max: 256, value: max: 256
55 }, # min: 1, max: 20; OPTIONAL
56 },
57 ...
58 ], # min: 1, max: 1; OPTIONAL
59 },
60 ...
61 ], # min: 1, max: 50; OPTIONAL
62 ForecastDimensions => [
63 'MyName', ... # min: 1, max: 63
64 ], # min: 1, max: 5; OPTIONAL
65 },
66 ForecastHorizon => 1,
67 InputDataConfig => {
68 DatasetGroupArn => 'MyArn', # max: 256
69 SupplementaryFeatures => [
70 {
71 Name => 'MyName', # min: 1, max: 63
72 Value => 'MyValue', # max: 256
73  
74 },
75 ...
76 ], # min: 1, max: 2; OPTIONAL
77 },
78 PredictorName => 'MyName',
79 AlgorithmArn => 'MyArn', # OPTIONAL
80 AutoMLOverrideStrategy => 'LatencyOptimized', # OPTIONAL
81 EncryptionConfig => {
82 KMSKeyArn => 'MyKMSKeyArn', # max: 256
83 RoleArn => 'MyArn', # max: 256
84  
85 }, # OPTIONAL
86 EvaluationParameters => {
87 BackTestWindowOffset => 1,
88 NumberOfBacktestWindows => 1,
89 }, # OPTIONAL
90 ForecastTypes => [ 'MyForecastType', ... ], # OPTIONAL
91 HPOConfig => {
92 ParameterRanges => {
93 CategoricalParameterRanges => [
94 {
95 Name => 'MyName', # min: 1, max: 63
96 Values => [
97 'MyValue', ... # max: 256
98 ], # min: 1, max: 20
99  
100 },
101 ...
102 ], # min: 1, max: 20; OPTIONAL
103 ContinuousParameterRanges => [
104 {
105 MaxValue => 1,
106 MinValue => 1,
107 Name => 'MyName', # min: 1, max: 63
108 ScalingType => 'Auto'
109 , # values: Auto, Linear, Logarithmic, ReverseLogarithmic; OPTIONAL
110 },
111 ...
112 ], # min: 1, max: 20; OPTIONAL
113 IntegerParameterRanges => [
114 {
115 MaxValue => 1,
116 MinValue => 1,
117 Name => 'MyName', # min: 1, max: 63
118 ScalingType => 'Auto'
119 , # values: Auto, Linear, Logarithmic, ReverseLogarithmic; OPTIONAL
120 },
121 ...
122 ], # min: 1, max: 20; OPTIONAL
123 }, # OPTIONAL
124 }, # OPTIONAL
125 PerformAutoML => 1, # OPTIONAL
126 PerformHPO => 1, # OPTIONAL
127 Tags => [
128 {
129 Key => 'MyTagKey', # min: 1, max: 128
130 Value => 'MyTagValue', # max: 256
131  
132 },
133 ...
134 ], # OPTIONAL
135 TrainingParameters => {
136 'MyParameterKey' => 'MyParameterValue', # key: max: 256, value: max: 256
137 }, # OPTIONAL
138 );
139  
140 # Results:
141 my $PredictorArn = $CreatePredictorResponse->PredictorArn;
142  
143 # Returns a L<Paws::Forecast::CreatePredictorResponse> object.
144  
145 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
146 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/forecast/CreatePredictor>
147  
148 =head1 ATTRIBUTES
149  
150  
151 =head2 AlgorithmArn => Str
152  
153 The Amazon Resource Name (ARN) of the algorithm to use for model
154 training. Required if C<PerformAutoML> is not set to C<true>.
155  
156 B<Supported algorithms:>
157  
158 =over
159  
160 =item *
161  
162 C<arn:aws:forecast:::algorithm/ARIMA>
163  
164 =item *
165  
166 C<arn:aws:forecast:::algorithm/CNN-QR>
167  
168 =item *
169  
170 C<arn:aws:forecast:::algorithm/Deep_AR_Plus>
171  
172 =item *
173  
174 C<arn:aws:forecast:::algorithm/ETS>
175  
176 =item *
177  
178 C<arn:aws:forecast:::algorithm/NPTS>
179  
180 =item *
181  
182 C<arn:aws:forecast:::algorithm/Prophet>
183  
184 =back
185  
186  
187  
188  
189 =head2 AutoMLOverrideStrategy => Str
190  
191 Used to overide the default AutoML strategy, which is to optimize
192 predictor accuracy. To apply an AutoML strategy that minimizes training
193 time, use C<LatencyOptimized>.
194  
195 This parameter is only valid for predictors trained using AutoML.
196  
197 Valid values are: C<"LatencyOptimized">
198  
199 =head2 EncryptionConfig => L<Paws::Forecast::EncryptionConfig>
200  
201 An AWS Key Management Service (KMS) key and the AWS Identity and Access
202 Management (IAM) role that Amazon Forecast can assume to access the
203 key.
204  
205  
206  
207 =head2 EvaluationParameters => L<Paws::Forecast::EvaluationParameters>
208  
209 Used to override the default evaluation parameters of the specified
210 algorithm. Amazon Forecast evaluates a predictor by splitting a dataset
211 into training data and testing data. The evaluation parameters define
212 how to perform the split and the number of iterations.
213  
214  
215  
216 =head2 B<REQUIRED> FeaturizationConfig => L<Paws::Forecast::FeaturizationConfig>
217  
218 The featurization configuration.
219  
220  
221  
222 =head2 B<REQUIRED> ForecastHorizon => Int
223  
224 Specifies the number of time-steps that the model is trained to
225 predict. The forecast horizon is also called the prediction length.
226  
227 For example, if you configure a dataset for daily data collection
228 (using the C<DataFrequency> parameter of the CreateDataset operation)
229 and set the forecast horizon to 10, the model returns predictions for
230 10 days.
231  
232 The maximum forecast horizon is the lesser of 500 time-steps or 1/3 of
233 the TARGET_TIME_SERIES dataset length.
234  
235  
236  
237 =head2 ForecastTypes => ArrayRef[Str|Undef]
238  
239 Specifies the forecast types used to train a predictor. You can specify
240 up to five forecast types. Forecast types can be quantiles from 0.01 to
241 0.99, by increments of 0.01 or higher. You can also specify the mean
242 forecast with C<mean>.
243  
244 The default value is C<["0.10", "0.50", "0.9"]>.
245  
246  
247  
248 =head2 HPOConfig => L<Paws::Forecast::HyperParameterTuningJobConfig>
249  
250 Provides hyperparameter override values for the algorithm. If you don't
251 provide this parameter, Amazon Forecast uses default values. The
252 individual algorithms specify which hyperparameters support
253 hyperparameter optimization (HPO). For more information, see
254 aws-forecast-choosing-recipes.
255  
256 If you included the C<HPOConfig> object, you must set C<PerformHPO> to
257 true.
258  
259  
260  
261 =head2 B<REQUIRED> InputDataConfig => L<Paws::Forecast::InputDataConfig>
262  
263 Describes the dataset group that contains the data to use to train the
264 predictor.
265  
266  
267  
268 =head2 PerformAutoML => Bool
269  
270 Whether to perform AutoML. When Amazon Forecast performs AutoML, it
271 evaluates the algorithms it provides and chooses the best algorithm and
272 configuration for your training dataset.
273  
274 The default value is C<false>. In this case, you are required to
275 specify an algorithm.
276  
277 Set C<PerformAutoML> to C<true> to have Amazon Forecast perform AutoML.
278 This is a good option if you aren't sure which algorithm is suitable
279 for your training data. In this case, C<PerformHPO> must be false.
280  
281  
282  
283 =head2 PerformHPO => Bool
284  
285 Whether to perform hyperparameter optimization (HPO). HPO finds optimal
286 hyperparameter values for your training data. The process of performing
287 HPO is known as running a hyperparameter tuning job.
288  
289 The default value is C<false>. In this case, Amazon Forecast uses
290 default hyperparameter values from the chosen algorithm.
291  
292 To override the default values, set C<PerformHPO> to C<true> and,
293 optionally, supply the HyperParameterTuningJobConfig object. The tuning
294 job specifies a metric to optimize, which hyperparameters participate
295 in tuning, and the valid range for each tunable hyperparameter. In this
296 case, you are required to specify an algorithm and C<PerformAutoML>
297 must be false.
298  
299 The following algorithms support HPO:
300  
301 =over
302  
303 =item *
304  
305 DeepAR+
306  
307 =item *
308  
309 CNN-QR
310  
311 =back
312  
313  
314  
315  
316 =head2 B<REQUIRED> PredictorName => Str
317  
318 A name for the predictor.
319  
320  
321  
322 =head2 Tags => ArrayRef[L<Paws::Forecast::Tag>]
323  
324 The optional metadata that you apply to the predictor to help you
325 categorize and organize them. Each tag consists of a key and an
326 optional value, both of which you define.
327  
328 The following basic restrictions apply to tags:
329  
330 =over
331  
332 =item *
333  
334 Maximum number of tags per resource - 50.
335  
336 =item *
337  
338 For each resource, each tag key must be unique, and each tag key can
339 have only one value.
340  
341 =item *
342  
343 Maximum key length - 128 Unicode characters in UTF-8.
344  
345 =item *
346  
347 Maximum value length - 256 Unicode characters in UTF-8.
348  
349 =item *
350  
351 If your tagging schema is used across multiple services and resources,
352 remember that other services may have restrictions on allowed
353 characters. Generally allowed characters are: letters, numbers, and
354 spaces representable in UTF-8, and the following characters: + - = . _
355 : / @.
356  
357 =item *
358  
359 Tag keys and values are case sensitive.
360  
361 =item *
362  
363 Do not use C<aws:>, C<AWS:>, or any upper or lowercase combination of
364 such as a prefix for keys as it is reserved for AWS use. You cannot
365 edit or delete tag keys with this prefix. Values can have this prefix.
366 If a tag value has C<aws> as its prefix but the key does not, then
367 Forecast considers it to be a user tag and will count against the limit
368 of 50 tags. Tags with only the key prefix of C<aws> do not count
369 against your tags per resource limit.
370  
371 =back
372  
373  
374  
375  
376 =head2 TrainingParameters => L<Paws::Forecast::TrainingParameters>
377  
378 The hyperparameters to override for model training. The hyperparameters
379 that you can override are listed in the individual algorithms. For the
380 list of supported algorithms, see aws-forecast-choosing-recipes.
381  
382  
383  
384  
385 =head1 SEE ALSO
386  
387 This class forms part of L<Paws>, documenting arguments for method CreatePredictor in L<Paws::Forecast>
388  
389 =head1 BUGS and CONTRIBUTIONS
390  
391 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
392  
393 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
394  
395 =cut
396