big_ml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/.gitignore +19 -0
  2. data/.rspec +2 -0
  3. data/.rvmrc +1 -0
  4. data/.rvmrc.example +1 -0
  5. data/.travis.yml +4 -0
  6. data/CHANGELOG.md +8 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE +22 -0
  9. data/README.md +49 -0
  10. data/Rakefile +6 -0
  11. data/TODO.md +6 -0
  12. data/big_ml.gemspec +23 -0
  13. data/lib/big_ml/authenticable.rb +10 -0
  14. data/lib/big_ml/base.rb +51 -0
  15. data/lib/big_ml/client.rb +29 -0
  16. data/lib/big_ml/config.rb +30 -0
  17. data/lib/big_ml/dataset.rb +19 -0
  18. data/lib/big_ml/model.rb +21 -0
  19. data/lib/big_ml/prediction.rb +19 -0
  20. data/lib/big_ml/request.rb +29 -0
  21. data/lib/big_ml/source.rb +18 -0
  22. data/lib/big_ml/version.rb +3 -0
  23. data/lib/big_ml.rb +13 -0
  24. data/spec/fixtures/iris.csv +151 -0
  25. data/spec/integration/dataset_spec.rb +51 -0
  26. data/spec/integration/model_spec.rb +53 -0
  27. data/spec/integration/prediction_spec.rb +55 -0
  28. data/spec/integration/source_spec.rb +55 -0
  29. data/spec/spec_helper.rb +22 -0
  30. data/spec/units/client_spec.rb +50 -0
  31. data/spec/units/source_spec.rb +20 -0
  32. data/spec/vcr_cassettes/BigML_Dataset/no_dataset/_all/must_be_empty.yml +136 -0
  33. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_find_using_the_reference.yml +293 -0
  34. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_remove_the_dataset.yml +318 -0
  35. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name.yml +360 -0
  36. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_only_one_item.yml +265 -0
  37. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_the_same_file_name.yml +265 -0
  38. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/was_created_successfully.yml +149 -0
  39. data/spec/vcr_cassettes/BigML_Model/no_model/_all/must_be_empty.yml +166 -0
  40. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_be_find_using_the_reference.yml +446 -0
  41. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_remove_the_model.yml +426 -0
  42. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name.yml +558 -0
  43. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_only_one_item.yml +258 -0
  44. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_the_same_file_name.yml +375 -0
  45. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_the_same_size.yml +375 -0
  46. data/spec/vcr_cassettes/BigML_Model/one_model/was_created_successfully.yml +298 -0
  47. data/spec/vcr_cassettes/BigML_Prediction/no_prediction/_all/must_be_empty.yml +305 -0
  48. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_find_using_the_reference.yml +502 -0
  49. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_remove_the_prediction.yml +547 -0
  50. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name.yml +546 -0
  51. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_only_one_item.yml +503 -0
  52. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_the_same_name.yml +420 -0
  53. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/was_created_successfully.yml +297 -0
  54. data/spec/vcr_cassettes/BigML_Source/no_source/_all/must_be_empty.yml +136 -0
  55. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_find_using_the_reference.yml +191 -0
  56. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_remove_the_source.yml +195 -0
  57. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name.yml +279 -0
  58. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_only_one_item.yml +192 -0
  59. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_the_same_file_name.yml +192 -0
  60. data/spec/vcr_cassettes/BigML_Source/one_source/was_created_successfully.yml +105 -0
  61. metadata +224 -0
@@ -0,0 +1,318 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ connection:
11
+ - close
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ content-type:
18
+ - application/json; charset=utf-8
19
+ date:
20
+ - Wed, 20 Jun 2012 03:55:37 GMT
21
+ server:
22
+ - nginx/1.0.12
23
+ content-length:
24
+ - '1280'
25
+ connection:
26
+ - Close
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
+ "application/octet-stream", "created": "2012-06-20T03:56:43.418000", "credits":
32
+ 0.0, "description": "", "fields": {"000000": {"column_number": 0, "name":
33
+ "sepal length", "optype": "numeric"}, "000001": {"column_number": 1, "name":
34
+ "sepal width", "optype": "numeric"}, "000002": {"column_number": 2, "name":
35
+ "petal length", "optype": "numeric"}, "000003": {"column_number": 3, "name":
36
+ "petal width", "optype": "numeric"}, "000004": {"column_number": 4, "name":
37
+ "species", "optype": "categorical"}}, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
38
+ "name": "iris.csv", "number_of_datasets": 1, "number_of_models": 0, "number_of_predictions":
39
+ 0, "private": true, "resource": "source/4fe149fb035d074a1c0000f6", "size":
40
+ 4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
41
+ ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
42
+ "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
43
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 59, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-20T03:57:17.028000"}]}'
45
+ http_version: '1.1'
46
+ recorded_at: Wed, 20 Jun 2012 03:57:08 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://bigml.io/andromeda/source/4fe149fb035d074a1c0000f6?username=<USERNAME>&api_key=<API_KEY>
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ connection:
55
+ - close
56
+ response:
57
+ status:
58
+ code: 204
59
+ message: NO CONTENT
60
+ headers:
61
+ content-length:
62
+ - '0'
63
+ content-type:
64
+ - text/html; charset=utf-8
65
+ date:
66
+ - Wed, 20 Jun 2012 03:53:23 GMT
67
+ server:
68
+ - nginx/1.0.12
69
+ connection:
70
+ - Close
71
+ body:
72
+ encoding: US-ASCII
73
+ string: ''
74
+ http_version: '1.1'
75
+ recorded_at: Wed, 20 Jun 2012 03:57:13 GMT
76
+ - request:
77
+ method: get
78
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
79
+ body:
80
+ encoding: US-ASCII
81
+ string: ''
82
+ headers:
83
+ connection:
84
+ - close
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ content-type:
91
+ - application/json; charset=utf-8
92
+ date:
93
+ - Wed, 20 Jun 2012 03:55:43 GMT
94
+ server:
95
+ - nginx/1.0.12
96
+ content-length:
97
+ - '698'
98
+ connection:
99
+ - Close
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
103
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "columns": 5,
104
+ "created": "2012-06-20T03:57:16.988000", "credits": 0.0087890625, "description":
105
+ "", "locale": "en_US", "name": "foo name", "number_of_models": 0, "number_of_predictions":
106
+ 0, "private": true, "resource": "dataset/4fe14a1c1552687d480000fe", "rows":
107
+ 150, "size": 4608, "source": "source/4fe149fb035d074a1c0000f6", "source_status":
108
+ false, "status": {"bytes": 4608, "code": 5, "elapsed": 738, "field_errors":
109
+ [], "message": "The dataset has been created", "row_format_errors": [], "serialized_rows":
110
+ 150}, "tags": [], "updated": "2012-06-20T03:57:23.348000"}]}'
111
+ http_version: '1.1'
112
+ recorded_at: Wed, 20 Jun 2012 03:57:14 GMT
113
+ - request:
114
+ method: delete
115
+ uri: https://bigml.io/andromeda/dataset/4fe14a1c1552687d480000fe?username=<USERNAME>&api_key=<API_KEY>
116
+ body:
117
+ encoding: US-ASCII
118
+ string: ''
119
+ headers:
120
+ connection:
121
+ - close
122
+ response:
123
+ status:
124
+ code: 204
125
+ message: NO CONTENT
126
+ headers:
127
+ content-length:
128
+ - '0'
129
+ content-type:
130
+ - text/html; charset=utf-8
131
+ date:
132
+ - Wed, 20 Jun 2012 03:53:25 GMT
133
+ server:
134
+ - nginx/1.0.12
135
+ connection:
136
+ - Close
137
+ body:
138
+ encoding: US-ASCII
139
+ string: ''
140
+ http_version: '1.1'
141
+ recorded_at: Wed, 20 Jun 2012 03:57:16 GMT
142
+ - request:
143
+ method: post
144
+ uri: https://bigml.io/andromeda/source
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ content-type:
150
+ - multipart/form-data; boundary=-----------RubyMultipartPost
151
+ content-length:
152
+ - '5147'
153
+ connection:
154
+ - close
155
+ response:
156
+ status:
157
+ code: 201
158
+ message: CREATED
159
+ headers:
160
+ content-type:
161
+ - application/json; charset=utf-8
162
+ date:
163
+ - Wed, 20 Jun 2012 03:55:47 GMT
164
+ location:
165
+ - http://bigml.io/andromeda/source/4fe14a12035d074a21000144
166
+ server:
167
+ - nginx/1.0.12
168
+ content-length:
169
+ - '567'
170
+ connection:
171
+ - Close
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
175
+ "created": "2012-06-20T03:57:06.463714", "credits": 0.0, "description": "",
176
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
177
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
178
+ 0, "private": true, "resource": "source/4fe14a12035d074a21000144", "size":
179
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
180
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
181
+ "2012-06-20T03:57:06.463738"}'
182
+ http_version: '1.1'
183
+ recorded_at: Wed, 20 Jun 2012 03:57:17 GMT
184
+ - request:
185
+ method: post
186
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
187
+ body:
188
+ encoding: UTF-8
189
+ string: ! '{"source":"source/4fe14a12035d074a21000144"}'
190
+ headers:
191
+ content-type:
192
+ - application/json
193
+ connection:
194
+ - close
195
+ response:
196
+ status:
197
+ code: 201
198
+ message: CREATED
199
+ headers:
200
+ content-type:
201
+ - application/json; charset=utf-8
202
+ date:
203
+ - Wed, 20 Jun 2012 03:53:28 GMT
204
+ location:
205
+ - http://bigml.io/andromeda/dataset/4fe14a301552687d4200013f
206
+ server:
207
+ - nginx/1.0.12
208
+ content-length:
209
+ - '920'
210
+ connection:
211
+ - Close
212
+ body:
213
+ encoding: US-ASCII
214
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T03:57:36.087763",
215
+ "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
216
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
217
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
218
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
219
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
220
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
221
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
222
+ true, "resource": "dataset/4fe14a301552687d4200013f", "rows": 0, "size": 4608,
223
+ "source": "source/4fe14a12035d074a21000144", "source_status": true, "status":
224
+ {"code": 1, "message": "The dataset is being processed and will be created
225
+ soon"}, "tags": [], "updated": "2012-06-20T03:57:36.087784"}'
226
+ http_version: '1.1'
227
+ recorded_at: Wed, 20 Jun 2012 03:57:19 GMT
228
+ - request:
229
+ method: delete
230
+ uri: https://bigml.io/andromeda/dataset/4fe14a301552687d4200013f?username=<USERNAME>&api_key=<API_KEY>
231
+ body:
232
+ encoding: US-ASCII
233
+ string: ''
234
+ headers:
235
+ connection:
236
+ - close
237
+ response:
238
+ status:
239
+ code: 204
240
+ message: NO CONTENT
241
+ headers:
242
+ content-length:
243
+ - '0'
244
+ content-type:
245
+ - text/html; charset=utf-8
246
+ date:
247
+ - Wed, 20 Jun 2012 03:55:49 GMT
248
+ server:
249
+ - nginx/1.0.12
250
+ connection:
251
+ - Close
252
+ body:
253
+ encoding: US-ASCII
254
+ string: ''
255
+ http_version: '1.1'
256
+ recorded_at: Wed, 20 Jun 2012 03:57:20 GMT
257
+ - request:
258
+ method: get
259
+ uri: https://bigml.io/andromeda/dataset/4fe14a301552687d4200013f?username=<USERNAME>&api_key=<API_KEY>
260
+ body:
261
+ encoding: US-ASCII
262
+ string: ''
263
+ headers:
264
+ connection:
265
+ - close
266
+ response:
267
+ status:
268
+ code: 404
269
+ message: NOT FOUND
270
+ headers:
271
+ content-type:
272
+ - application/json; charset=utf-8
273
+ date:
274
+ - Wed, 20 Jun 2012 03:53:31 GMT
275
+ server:
276
+ - nginx/1.0.12
277
+ content-length:
278
+ - '170'
279
+ connection:
280
+ - Close
281
+ body:
282
+ encoding: US-ASCII
283
+ string: ! '{"code": 404, "status": {"code": -1201, "extra": ["Couldn''t find
284
+ an instance of ''Dataset'' which matched ''pk=4fe14a301552687d4200013f''."],
285
+ "message": "Id does not exist"}}'
286
+ http_version: '1.1'
287
+ recorded_at: Wed, 20 Jun 2012 03:57:21 GMT
288
+ - request:
289
+ method: get
290
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
291
+ body:
292
+ encoding: US-ASCII
293
+ string: ''
294
+ headers:
295
+ connection:
296
+ - close
297
+ response:
298
+ status:
299
+ code: 200
300
+ message: OK
301
+ headers:
302
+ content-type:
303
+ - application/json; charset=utf-8
304
+ date:
305
+ - Wed, 20 Jun 2012 03:55:51 GMT
306
+ server:
307
+ - nginx/1.0.12
308
+ content-length:
309
+ - '101'
310
+ connection:
311
+ - Close
312
+ body:
313
+ encoding: US-ASCII
314
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
315
+ "total_count": 0}, "objects": []}'
316
+ http_version: '1.1'
317
+ recorded_at: Wed, 20 Jun 2012 03:57:22 GMT
318
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,360 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ connection:
11
+ - close
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ content-type:
18
+ - application/json; charset=utf-8
19
+ date:
20
+ - Wed, 20 Jun 2012 03:55:16 GMT
21
+ server:
22
+ - nginx/1.0.12
23
+ content-length:
24
+ - '1280'
25
+ connection:
26
+ - Close
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
+ "application/octet-stream", "created": "2012-06-20T03:56:59.857000", "credits":
32
+ 0.0, "description": "", "fields": {"000000": {"column_number": 0, "name":
33
+ "sepal length", "optype": "numeric"}, "000001": {"column_number": 1, "name":
34
+ "sepal width", "optype": "numeric"}, "000002": {"column_number": 2, "name":
35
+ "petal length", "optype": "numeric"}, "000003": {"column_number": 3, "name":
36
+ "petal width", "optype": "numeric"}, "000004": {"column_number": 4, "name":
37
+ "species", "optype": "categorical"}}, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
38
+ "name": "iris.csv", "number_of_datasets": 1, "number_of_models": 0, "number_of_predictions":
39
+ 0, "private": true, "resource": "source/4fe14a0b1552687d4200013a", "size":
40
+ 4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
41
+ ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
42
+ "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
43
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 79, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-20T03:57:01.918000"}]}'
45
+ http_version: '1.1'
46
+ recorded_at: Wed, 20 Jun 2012 03:56:47 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://bigml.io/andromeda/source/4fe14a0b1552687d4200013a?username=<USERNAME>&api_key=<API_KEY>
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ connection:
55
+ - close
56
+ response:
57
+ status:
58
+ code: 204
59
+ message: NO CONTENT
60
+ headers:
61
+ content-length:
62
+ - '0'
63
+ content-type:
64
+ - text/html; charset=utf-8
65
+ date:
66
+ - Wed, 20 Jun 2012 03:52:58 GMT
67
+ server:
68
+ - nginx/1.0.12
69
+ connection:
70
+ - Close
71
+ body:
72
+ encoding: US-ASCII
73
+ string: ''
74
+ http_version: '1.1'
75
+ recorded_at: Wed, 20 Jun 2012 03:56:49 GMT
76
+ - request:
77
+ method: get
78
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
79
+ body:
80
+ encoding: US-ASCII
81
+ string: ''
82
+ headers:
83
+ connection:
84
+ - close
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ content-type:
91
+ - application/json; charset=utf-8
92
+ date:
93
+ - Wed, 20 Jun 2012 03:55:20 GMT
94
+ server:
95
+ - nginx/1.0.12
96
+ content-length:
97
+ - '703'
98
+ connection:
99
+ - Close
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
103
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "columns": 5,
104
+ "created": "2012-06-20T03:57:01.914000", "credits": 0.0087890625, "description":
105
+ "", "locale": "en_US", "name": "iris'' dataset", "number_of_models": 0, "number_of_predictions":
106
+ 0, "private": true, "resource": "dataset/4fe14a0d1552687d480000fa", "rows":
107
+ 150, "size": 4608, "source": "source/4fe14a0b1552687d4200013a", "source_status":
108
+ false, "status": {"bytes": 4608, "code": 5, "elapsed": 846, "field_errors":
109
+ [], "message": "The dataset has been created", "row_format_errors": [], "serialized_rows":
110
+ 150}, "tags": [], "updated": "2012-06-20T03:56:34.759000"}]}'
111
+ http_version: '1.1'
112
+ recorded_at: Wed, 20 Jun 2012 03:56:51 GMT
113
+ - request:
114
+ method: delete
115
+ uri: https://bigml.io/andromeda/dataset/4fe14a0d1552687d480000fa?username=<USERNAME>&api_key=<API_KEY>
116
+ body:
117
+ encoding: US-ASCII
118
+ string: ''
119
+ headers:
120
+ connection:
121
+ - close
122
+ response:
123
+ status:
124
+ code: 204
125
+ message: NO CONTENT
126
+ headers:
127
+ content-length:
128
+ - '0'
129
+ content-type:
130
+ - text/html; charset=utf-8
131
+ date:
132
+ - Wed, 20 Jun 2012 03:53:02 GMT
133
+ server:
134
+ - nginx/1.0.12
135
+ connection:
136
+ - Close
137
+ body:
138
+ encoding: US-ASCII
139
+ string: ''
140
+ http_version: '1.1'
141
+ recorded_at: Wed, 20 Jun 2012 03:56:53 GMT
142
+ - request:
143
+ method: post
144
+ uri: https://bigml.io/andromeda/source
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ content-type:
150
+ - multipart/form-data; boundary=-----------RubyMultipartPost
151
+ content-length:
152
+ - '5147'
153
+ connection:
154
+ - close
155
+ response:
156
+ status:
157
+ code: 201
158
+ message: CREATED
159
+ headers:
160
+ content-type:
161
+ - application/json; charset=utf-8
162
+ date:
163
+ - Wed, 20 Jun 2012 03:55:25 GMT
164
+ location:
165
+ - http://bigml.io/andromeda/source/4fe149fb035d074a1c0000f6
166
+ server:
167
+ - nginx/1.0.12
168
+ content-length:
169
+ - '567'
170
+ connection:
171
+ - Close
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
175
+ "created": "2012-06-20T03:56:43.418189", "credits": 0.0, "description": "",
176
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
177
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
178
+ 0, "private": true, "resource": "source/4fe149fb035d074a1c0000f6", "size":
179
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
180
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
181
+ "2012-06-20T03:56:43.418211"}'
182
+ http_version: '1.1'
183
+ recorded_at: Wed, 20 Jun 2012 03:56:56 GMT
184
+ - request:
185
+ method: post
186
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
187
+ body:
188
+ encoding: UTF-8
189
+ string: ! '{"source":"source/4fe149fb035d074a1c0000f6"}'
190
+ headers:
191
+ content-type:
192
+ - application/json
193
+ connection:
194
+ - close
195
+ response:
196
+ status:
197
+ code: 201
198
+ message: CREATED
199
+ headers:
200
+ content-type:
201
+ - application/json; charset=utf-8
202
+ date:
203
+ - Wed, 20 Jun 2012 03:53:14 GMT
204
+ location:
205
+ - http://bigml.io/andromeda/dataset/4fe14a1c1552687d480000fe
206
+ server:
207
+ - nginx/1.0.12
208
+ content-length:
209
+ - '920'
210
+ connection:
211
+ - Close
212
+ body:
213
+ encoding: US-ASCII
214
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T03:57:16.988857",
215
+ "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
216
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
217
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
218
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
219
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
220
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
221
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
222
+ true, "resource": "dataset/4fe14a1c1552687d480000fe", "rows": 0, "size": 4608,
223
+ "source": "source/4fe149fb035d074a1c0000f6", "source_status": true, "status":
224
+ {"code": 1, "message": "The dataset is being processed and will be created
225
+ soon"}, "tags": [], "updated": "2012-06-20T03:57:16.988886"}'
226
+ http_version: '1.1'
227
+ recorded_at: Wed, 20 Jun 2012 03:57:05 GMT
228
+ - request:
229
+ method: put
230
+ uri: https://bigml.io/andromeda/dataset/4fe14a1c1552687d480000fe?username=<USERNAME>&api_key=<API_KEY>
231
+ body:
232
+ encoding: UTF-8
233
+ string: ! '{"name":"foo name"}'
234
+ headers:
235
+ content-type:
236
+ - application/json
237
+ connection:
238
+ - close
239
+ response:
240
+ status:
241
+ code: 202
242
+ message: ACCEPTED
243
+ headers:
244
+ content-type:
245
+ - application/json; charset=utf-8
246
+ date:
247
+ - Wed, 20 Jun 2012 03:55:35 GMT
248
+ server:
249
+ - nginx/1.0.12
250
+ content-length:
251
+ - '2920'
252
+ connection:
253
+ - Close
254
+ body:
255
+ encoding: US-ASCII
256
+ string: ! '{"category": 0, "code": 202, "columns": 5, "created": "2012-06-20T03:57:16.988000",
257
+ "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
258
+ 0, "datatype": "double", "name": "sepal length", "optype": "numeric", "preferred":
259
+ true, "summary": {"maximum": 7.9, "median": 5.77889, "minimum": 4.3, "missing_count":
260
+ 0, "population": 150, "splits": [4.51526, 4.67252, 4.81113, 4.89582, 4.96139,
261
+ 5.01131, 5.05992, 5.11148, 5.18177, 5.35681, 5.44129, 5.5108, 5.58255, 5.65532,
262
+ 5.71658, 5.77889, 5.85381, 5.97078, 6.05104, 6.13074, 6.23023, 6.29578, 6.35078,
263
+ 6.41459, 6.49383, 6.63013, 6.70719, 6.79218, 6.92597, 7.20423, 7.64746], "sum":
264
+ 876.5, "sum_squares": 5223.85}}, "000001": {"column_number": 1, "datatype":
265
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true, "summary":
266
+ {"counts": [[2, 1], [2.2, 3], [2.3, 4], [2.4, 3], [2.5, 8], [2.6, 5], [2.7,
267
+ 9], [2.8, 14], [2.9, 10], [3, 26], [3.1, 11], [3.2, 13], [3.3, 6], [3.4, 12],
268
+ [3.5, 6], [3.6, 4], [3.7, 3], [3.8, 6], [3.9, 2], [4, 1], [4.1, 1], [4.2,
269
+ 1], [4.4, 1]], "maximum": 4.4, "median": 3.02044, "minimum": 2, "missing_count":
270
+ 0, "population": 150, "sum": 458.6, "sum_squares": 1430.4}}, "000002": {"column_number":
271
+ 2, "datatype": "double", "name": "petal length", "optype": "numeric", "preferred":
272
+ true, "summary": {"maximum": 6.9, "median": 4.34142, "minimum": 1, "missing_count":
273
+ 0, "population": 150, "splits": [1.25138, 1.32426, 1.37171, 1.40962, 1.44567,
274
+ 1.48173, 1.51859, 1.56301, 1.6255, 1.74645, 3.23033, 3.675, 3.94203, 4.0469,
275
+ 4.18243, 4.34142, 4.45309, 4.51823, 4.61771, 4.72566, 4.83445, 4.93363, 5.03807,
276
+ 5.1064, 5.20938, 5.43979, 5.5744, 5.6646, 5.81496, 6.02913, 6.38125], "sum":
277
+ 563.7, "sum_squares": 2582.71}}, "000003": {"column_number": 3, "datatype":
278
+ "double", "name": "petal width", "optype": "numeric", "preferred": true, "summary":
279
+ {"counts": [[0.1, 5], [0.2, 29], [0.3, 7], [0.4, 7], [0.5, 1], [0.6, 1], [1,
280
+ 7], [1.1, 3], [1.2, 5], [1.3, 13], [1.4, 8], [1.5, 12], [1.6, 4], [1.7, 2],
281
+ [1.8, 12], [1.9, 5], [2, 6], [2.1, 6], [2.2, 3], [2.3, 8], [2.4, 3], [2.5,
282
+ 3]], "maximum": 2.5, "median": 1.32848, "minimum": 0.1, "missing_count": 0,
283
+ "population": 150, "sum": 179.9, "sum_squares": 302.33}}, "000004": {"column_number":
284
+ 4, "datatype": "string", "name": "species", "optype": "categorical", "preferred":
285
+ true, "summary": {"categories": [["Iris-versicolor", 50], ["Iris-setosa",
286
+ 50], ["Iris-virginica", 50]], "missing_count": 0}}}, "locale": "en_US", "name":
287
+ "foo name", "number_of_models": 0, "number_of_predictions": 0, "private":
288
+ true, "resource": "dataset/4fe14a1c1552687d480000fe", "rows": 150, "size":
289
+ 4608, "source": "source/4fe149fb035d074a1c0000f6", "source_status": true,
290
+ "status": {"bytes": 4608, "code": 5, "elapsed": 738, "field_errors": [], "message":
291
+ "The dataset has been created", "row_format_errors": [], "serialized_rows":
292
+ 150}, "tags": [], "updated": "2012-06-20T03:57:23.312434"}'
293
+ http_version: '1.1'
294
+ recorded_at: Wed, 20 Jun 2012 03:57:06 GMT
295
+ - request:
296
+ method: get
297
+ uri: https://bigml.io/andromeda/dataset/4fe14a1c1552687d480000fe?username=<USERNAME>&api_key=<API_KEY>
298
+ body:
299
+ encoding: US-ASCII
300
+ string: ''
301
+ headers:
302
+ connection:
303
+ - close
304
+ response:
305
+ status:
306
+ code: 200
307
+ message: OK
308
+ headers:
309
+ content-type:
310
+ - application/json; charset=utf-8
311
+ date:
312
+ - Wed, 20 Jun 2012 03:53:17 GMT
313
+ server:
314
+ - nginx/1.0.12
315
+ content-length:
316
+ - '2920'
317
+ connection:
318
+ - Close
319
+ body:
320
+ encoding: US-ASCII
321
+ string: ! '{"category": 0, "code": 200, "columns": 5, "created": "2012-06-20T03:57:16.988000",
322
+ "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
323
+ 0, "datatype": "double", "name": "sepal length", "optype": "numeric", "preferred":
324
+ true, "summary": {"maximum": 7.9, "median": 5.77889, "minimum": 4.3, "missing_count":
325
+ 0, "population": 150, "splits": [4.51526, 4.67252, 4.81113, 4.89582, 4.96139,
326
+ 5.01131, 5.05992, 5.11148, 5.18177, 5.35681, 5.44129, 5.5108, 5.58255, 5.65532,
327
+ 5.71658, 5.77889, 5.85381, 5.97078, 6.05104, 6.13074, 6.23023, 6.29578, 6.35078,
328
+ 6.41459, 6.49383, 6.63013, 6.70719, 6.79218, 6.92597, 7.20423, 7.64746], "sum":
329
+ 876.5, "sum_squares": 5223.85}}, "000001": {"column_number": 1, "datatype":
330
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true, "summary":
331
+ {"counts": [[2, 1], [2.2, 3], [2.3, 4], [2.4, 3], [2.5, 8], [2.6, 5], [2.7,
332
+ 9], [2.8, 14], [2.9, 10], [3, 26], [3.1, 11], [3.2, 13], [3.3, 6], [3.4, 12],
333
+ [3.5, 6], [3.6, 4], [3.7, 3], [3.8, 6], [3.9, 2], [4, 1], [4.1, 1], [4.2,
334
+ 1], [4.4, 1]], "maximum": 4.4, "median": 3.02044, "minimum": 2, "missing_count":
335
+ 0, "population": 150, "sum": 458.6, "sum_squares": 1430.4}}, "000002": {"column_number":
336
+ 2, "datatype": "double", "name": "petal length", "optype": "numeric", "preferred":
337
+ true, "summary": {"maximum": 6.9, "median": 4.34142, "minimum": 1, "missing_count":
338
+ 0, "population": 150, "splits": [1.25138, 1.32426, 1.37171, 1.40962, 1.44567,
339
+ 1.48173, 1.51859, 1.56301, 1.6255, 1.74645, 3.23033, 3.675, 3.94203, 4.0469,
340
+ 4.18243, 4.34142, 4.45309, 4.51823, 4.61771, 4.72566, 4.83445, 4.93363, 5.03807,
341
+ 5.1064, 5.20938, 5.43979, 5.5744, 5.6646, 5.81496, 6.02913, 6.38125], "sum":
342
+ 563.7, "sum_squares": 2582.71}}, "000003": {"column_number": 3, "datatype":
343
+ "double", "name": "petal width", "optype": "numeric", "preferred": true, "summary":
344
+ {"counts": [[0.1, 5], [0.2, 29], [0.3, 7], [0.4, 7], [0.5, 1], [0.6, 1], [1,
345
+ 7], [1.1, 3], [1.2, 5], [1.3, 13], [1.4, 8], [1.5, 12], [1.6, 4], [1.7, 2],
346
+ [1.8, 12], [1.9, 5], [2, 6], [2.1, 6], [2.2, 3], [2.3, 8], [2.4, 3], [2.5,
347
+ 3]], "maximum": 2.5, "median": 1.32848, "minimum": 0.1, "missing_count": 0,
348
+ "population": 150, "sum": 179.9, "sum_squares": 302.33}}, "000004": {"column_number":
349
+ 4, "datatype": "string", "name": "species", "optype": "categorical", "preferred":
350
+ true, "summary": {"categories": [["Iris-versicolor", 50], ["Iris-setosa",
351
+ 50], ["Iris-virginica", 50]], "missing_count": 0}}}, "locale": "en_US", "name":
352
+ "foo name", "number_of_models": 0, "number_of_predictions": 0, "private":
353
+ true, "resource": "dataset/4fe14a1c1552687d480000fe", "rows": 150, "size":
354
+ 4608, "source": "source/4fe149fb035d074a1c0000f6", "source_status": true,
355
+ "status": {"bytes": 4608, "code": 5, "elapsed": 738, "field_errors": [], "message":
356
+ "The dataset has been created", "row_format_errors": [], "serialized_rows":
357
+ 150}, "tags": [], "updated": "2012-06-20T03:57:23.348000"}'
358
+ http_version: '1.1'
359
+ recorded_at: Wed, 20 Jun 2012 03:57:07 GMT
360
+ recorded_with: VCR 2.2.2