blib/lib/Paws/MachineLearning/S3DataSpec.pm untested

filter: Statementstmt 0.0% 0 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 8 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::MachineLearning::S3DataSpec;
3 use Moose;
4 has DataLocationS3 => (is => 'ro', isa => 'Str', required => 1);
5 has DataRearrangement => (is => 'ro', isa => 'Str');
6 has DataSchema => (is => 'ro', isa => 'Str');
7 has DataSchemaLocationS3 => (is => 'ro', isa => 'Str');
8  
9 1;
10  
11 ### main pod documentation begin ###
12  
13 =head1 NAME
14  
15 Paws::MachineLearning::S3DataSpec
16  
17 =head1 USAGE
18  
19 This class represents one of two things:
20  
21 =head3 Arguments in a call to a service
22  
23 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
24 Each attribute should be used as a named argument in the calls that expect this type of object.
25  
26 As an example, if Att1 is expected to be a Paws::MachineLearning::S3DataSpec object:
27  
28 $service_obj->Method(Att1 => { DataLocationS3 => $value, ..., DataSchemaLocationS3 => $value });
29  
30 =head3 Results returned from an API call
31  
32 Use accessors for each attribute. If Att1 is expected to be an Paws::MachineLearning::S3DataSpec object:
33  
34 $result = $service_obj->Method(...);
35 $result->Att1->DataLocationS3
36  
37 =head1 DESCRIPTION
38  
39 Describes the data specification of a C<DataSource>.
40  
41 =head1 ATTRIBUTES
42  
43  
44 =head2 B<REQUIRED> DataLocationS3 => Str
45  
46 The location of the data file(s) used by a C<DataSource>. The URI
47 specifies a data file or an Amazon Simple Storage Service (Amazon S3)
48 directory or bucket containing data files.
49  
50  
51 =head2 DataRearrangement => Str
52  
53 A JSON string that represents the splitting and rearrangement
54 processing to be applied to a C<DataSource>. If the
55 C<DataRearrangement> parameter is not provided, all of the input data
56 is used to create the C<Datasource>.
57  
58 There are multiple parameters that control what data is used to create
59 a datasource:
60  
61 =over
62  
63 =item *
64  
65 B<C<percentBegin>>
66  
67 Use C<percentBegin> to indicate the beginning of the range of the data
68 used to create the Datasource. If you do not include C<percentBegin>
69 and C<percentEnd>, Amazon ML includes all of the data when creating the
70 datasource.
71  
72 =item *
73  
74 B<C<percentEnd>>
75  
76 Use C<percentEnd> to indicate the end of the range of the data used to
77 create the Datasource. If you do not include C<percentBegin> and
78 C<percentEnd>, Amazon ML includes all of the data when creating the
79 datasource.
80  
81 =item *
82  
83 B<C<complement>>
84  
85 The C<complement> parameter instructs Amazon ML to use the data that is
86 not included in the range of C<percentBegin> to C<percentEnd> to create
87 a datasource. The C<complement> parameter is useful if you need to
88 create complementary datasources for training and evaluation. To create
89 a complementary datasource, use the same values for C<percentBegin> and
90 C<percentEnd>, along with the C<complement> parameter.
91  
92 For example, the following two datasources do not share any data, and
93 can be used to train and evaluate a model. The first datasource has 25
94 percent of the data, and the second one has 75 percent of the data.
95  
96 Datasource for evaluation: C<{"splitting":{"percentBegin":0,
97 "percentEnd":25}}>
98  
99 Datasource for training: C<{"splitting":{"percentBegin":0,
100 "percentEnd":25, "complement":"true"}}>
101  
102 =item *
103  
104 B<C<strategy>>
105  
106 To change how Amazon ML splits the data for a datasource, use the
107 C<strategy> parameter.
108  
109 The default value for the C<strategy> parameter is C<sequential>,
110 meaning that Amazon ML takes all of the data records between the
111 C<percentBegin> and C<percentEnd> parameters for the datasource, in the
112 order that the records appear in the input data.
113  
114 The following two C<DataRearrangement> lines are examples of
115 sequentially ordered training and evaluation datasources:
116  
117 Datasource for evaluation: C<{"splitting":{"percentBegin":70,
118 "percentEnd":100, "strategy":"sequential"}}>
119  
120 Datasource for training: C<{"splitting":{"percentBegin":70,
121 "percentEnd":100, "strategy":"sequential", "complement":"true"}}>
122  
123 To randomly split the input data into the proportions indicated by the
124 percentBegin and percentEnd parameters, set the C<strategy> parameter
125 to C<random> and provide a string that is used as the seed value for
126 the random data splitting (for example, you can use the S3 path to your
127 data as the random seed string). If you choose the random split
128 strategy, Amazon ML assigns each row of data a pseudo-random number
129 between 0 and 100, and then selects the rows that have an assigned
130 number between C<percentBegin> and C<percentEnd>. Pseudo-random numbers
131 are assigned using both the input seed string value and the byte offset
132 as a seed, so changing the data results in a different split. Any
133 existing ordering is preserved. The random splitting strategy ensures
134 that variables in the training and evaluation data are distributed
135 similarly. It is useful in the cases where the input data may have an
136 implicit sort order, which would otherwise result in training and
137 evaluation datasources containing non-similar data records.
138  
139 The following two C<DataRearrangement> lines are examples of
140 non-sequentially ordered training and evaluation datasources:
141  
142 Datasource for evaluation: C<{"splitting":{"percentBegin":70,
143 "percentEnd":100, "strategy":"random",
144 "randomSeed"="s3://my_s3_path/bucket/file.csv"}}>
145  
146 Datasource for training: C<{"splitting":{"percentBegin":70,
147 "percentEnd":100, "strategy":"random",
148 "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}>
149  
150 =back
151  
152  
153  
154 =head2 DataSchema => Str
155  
156 A JSON string that represents the schema for an Amazon S3
157 C<DataSource>. The C<DataSchema> defines the structure of the
158 observation data in the data file(s) referenced in the C<DataSource>.
159  
160 You must provide either the C<DataSchema> or the
161 C<DataSchemaLocationS3>.
162  
163 Define your C<DataSchema> as a series of key-value pairs. C<attributes>
164 and C<excludedVariableNames> have an array of key-value pairs for their
165 value. Use the following format to define your C<DataSchema>.
166  
167 { "version": "1.0",
168  
169 "recordAnnotationFieldName": "F1",
170  
171 "recordWeightFieldName": "F2",
172  
173 "targetFieldName": "F3",
174  
175 "dataFormat": "CSV",
176  
177 "dataFileContainsHeader": true,
178  
179 "attributes": [
180  
181 { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2",
182 "fieldType": "NUMERIC" }, { "fieldName": "F3", "fieldType":
183 "CATEGORICAL" }, { "fieldName": "F4", "fieldType": "NUMERIC" }, {
184 "fieldName": "F5", "fieldType": "CATEGORICAL" }, { "fieldName": "F6",
185 "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType":
186 "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType":
187 "WEIGHTED_STRING_SEQUENCE" } ],
188  
189 "excludedVariableNames": [ "F6" ] }
190  
191  
192 =head2 DataSchemaLocationS3 => Str
193  
194 Describes the schema location in Amazon S3. You must provide either the
195 C<DataSchema> or the C<DataSchemaLocationS3>.
196  
197  
198  
199 =head1 SEE ALSO
200  
201 This class forms part of L<Paws>, describing an object used in L<Paws::MachineLearning>
202  
203 =head1 BUGS and CONTRIBUTIONS
204  
205 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
206  
207 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
208  
209 =cut
210