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

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