big_ml 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/README.md +55 -18
  3. data/big_ml.gemspec +1 -0
  4. data/lib/big_ml/base.rb +21 -11
  5. data/lib/big_ml/dataset.rb +10 -4
  6. data/lib/big_ml/model.rb +16 -10
  7. data/lib/big_ml/prediction.rb +6 -4
  8. data/lib/big_ml/source.rb +10 -4
  9. data/lib/big_ml/{authenticable.rb → util/authenticable.rb} +0 -0
  10. data/lib/big_ml/util/client.rb +26 -0
  11. data/lib/big_ml/util/config.rb +32 -0
  12. data/lib/big_ml/{request.rb → util/request.rb} +0 -0
  13. data/lib/big_ml/version.rb +1 -1
  14. data/lib/big_ml.rb +8 -4
  15. data/spec/integration/dataset_spec.rb +17 -0
  16. data/spec/integration/model_spec.rb +17 -0
  17. data/spec/integration/prediction_spec.rb +11 -0
  18. data/spec/integration/source_spec.rb +19 -6
  19. data/spec/units/client_spec.rb +5 -5
  20. data/spec/vcr_cassettes/BigML_Dataset/no_dataset/_all/must_be_empty.yml +53 -17
  21. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/can_be_converted_in_a_model.yml +232 -0
  22. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_deleted_using_the_destroy_method.yml +288 -0
  23. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_find_using_the_reference.yml +49 -49
  24. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_remove_the_dataset.yml +41 -77
  25. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name.yml +57 -57
  26. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name_from_the_instance.yml +360 -0
  27. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_only_one_item.yml +44 -44
  28. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_the_same_file_name.yml +44 -44
  29. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/was_created_successfully.yml +22 -22
  30. data/spec/vcr_cassettes/BigML_Model/no_model/_all/must_be_empty.yml +133 -21
  31. data/spec/vcr_cassettes/BigML_Model/one_model/can_be_converted_in_a_prediction.yml +346 -0
  32. data/spec/vcr_cassettes/BigML_Model/one_model/{must_have_the_same_file_name.yml → must_be_able_to_be_deleted_using_the_destroy_method.yml} +90 -107
  33. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_be_find_using_the_reference.yml +172 -161
  34. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_remove_the_model.yml +194 -70
  35. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name.yml +225 -243
  36. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name_from_the_instance.yml +686 -0
  37. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_only_one_item.yml +169 -52
  38. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_the_same_size.yml +91 -90
  39. data/spec/vcr_cassettes/BigML_Model/one_model/was_created_successfully.yml +35 -114
  40. data/spec/vcr_cassettes/BigML_Prediction/no_prediction/_all/must_be_empty.yml +141 -89
  41. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_deleted_using_the_destroy_method.yml +474 -0
  42. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_find_using_the_reference.yml +88 -88
  43. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_remove_the_prediction.yml +88 -88
  44. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name.yml +97 -97
  45. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name_from_the_instance.yml +545 -0
  46. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_only_one_item.yml +90 -90
  47. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_the_same_name.yml +161 -78
  48. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/was_created_successfully.yml +45 -45
  49. data/spec/vcr_cassettes/BigML_Source/no_source/_all/must_be_empty.yml +12 -42
  50. data/spec/vcr_cassettes/BigML_Source/one_source/can_be_converted_in_a_dataset.yml +119 -0
  51. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_deleted_using_the_destroy_method.yml +135 -0
  52. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_find_using_the_reference.yml +22 -52
  53. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_remove_the_source.yml +43 -30
  54. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name.yml +38 -68
  55. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name_from_the_instance.yml +249 -0
  56. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_only_one_item.yml +24 -54
  57. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_the_same_file_name.yml +21 -51
  58. data/spec/vcr_cassettes/BigML_Source/one_source/was_created_successfully.yml +8 -38
  59. metadata +50 -9
  60. data/.rvmrc +0 -1
  61. data/lib/big_ml/client.rb +0 -29
  62. data/lib/big_ml/config.rb +0 -30
@@ -0,0 +1,686 @@
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
+ - Thu, 28 Jun 2012 22:23:30 GMT
21
+ server:
22
+ - nginx/1.0.12
23
+ content-length:
24
+ - '3642'
25
+ connection:
26
+ - Close
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
+ "total_count": 3}, "objects": [{"category": 0, "code": 200, "content_type":
31
+ "application/octet-stream", "created": "2012-06-28T22:27:36.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": 1, "number_of_predictions":
39
+ 0, "private": true, "resource": "source/4fecda58035d0741f40032a6", "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-28T22:28:28.842000"},
45
+ {"category": 0, "code": 200, "content_type": "application/octet-stream", "created":
46
+ "2012-06-28T22:27:13.381000", "credits": 0.0, "description": "", "fields":
47
+ {"000000": {"column_number": 0, "name": "sepal length", "optype": "numeric"},
48
+ "000001": {"column_number": 1, "name": "sepal width", "optype": "numeric"},
49
+ "000002": {"column_number": 2, "name": "petal length", "optype": "numeric"},
50
+ "000003": {"column_number": 3, "name": "petal width", "optype": "numeric"},
51
+ "000004": {"column_number": 4, "name": "species", "optype": "categorical"}},
52
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
53
+ "iris.csv", "number_of_datasets": 1, "number_of_models": 0, "number_of_predictions":
54
+ 0, "private": true, "resource": "source/4fecda41035d0741f1003314", "size":
55
+ 4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
56
+ ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
57
+ "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
58
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 98, "message": "The
59
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:27:34.065000"},
60
+ {"category": 0, "code": 200, "content_type": "application/octet-stream", "created":
61
+ "2012-06-28T22:26:48.297000", "credits": 0.0, "description": "", "fields":
62
+ {"000000": {"column_number": 0, "name": "sepal length", "optype": "numeric"},
63
+ "000001": {"column_number": 1, "name": "sepal width", "optype": "numeric"},
64
+ "000002": {"column_number": 2, "name": "petal length", "optype": "numeric"},
65
+ "000003": {"column_number": 3, "name": "petal width", "optype": "numeric"},
66
+ "000004": {"column_number": 4, "name": "species", "optype": "categorical"}},
67
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
68
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
69
+ 0, "private": true, "resource": "source/4fecda28035d0741ef00328a", "size":
70
+ 4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
71
+ ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
72
+ "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
73
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 75, "message": "The
74
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:28:19.498000"}]}'
75
+ http_version: '1.1'
76
+ recorded_at: Thu, 28 Jun 2012 22:28:17 GMT
77
+ - request:
78
+ method: delete
79
+ uri: https://bigml.io/andromeda/source/4fecda58035d0741f40032a6?username=<USERNAME>&api_key=<API_KEY>
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ''
83
+ headers:
84
+ connection:
85
+ - close
86
+ response:
87
+ status:
88
+ code: 400
89
+ message: BAD REQUEST
90
+ headers:
91
+ content-type:
92
+ - application/json; charset=utf-8
93
+ date:
94
+ - Thu, 28 Jun 2012 22:26:05 GMT
95
+ server:
96
+ - nginx/1.0.12
97
+ content-length:
98
+ - '132'
99
+ connection:
100
+ - Close
101
+ body:
102
+ encoding: US-ASCII
103
+ string: ! '{"code": 400, "status": {"code": -1204, "extra": ["This source is
104
+ being used and cannot be deleted now"], "message": "Bad request"}}'
105
+ http_version: '1.1'
106
+ recorded_at: Thu, 28 Jun 2012 22:28:18 GMT
107
+ - request:
108
+ method: delete
109
+ uri: https://bigml.io/andromeda/source/4fecda41035d0741f1003314?username=<USERNAME>&api_key=<API_KEY>
110
+ body:
111
+ encoding: US-ASCII
112
+ string: ''
113
+ headers:
114
+ connection:
115
+ - close
116
+ response:
117
+ status:
118
+ code: 400
119
+ message: BAD REQUEST
120
+ headers:
121
+ content-type:
122
+ - application/json; charset=utf-8
123
+ date:
124
+ - Thu, 28 Jun 2012 22:23:33 GMT
125
+ server:
126
+ - nginx/1.0.12
127
+ content-length:
128
+ - '132'
129
+ connection:
130
+ - Close
131
+ body:
132
+ encoding: US-ASCII
133
+ string: ! '{"code": 400, "status": {"code": -1204, "extra": ["This source is
134
+ being used and cannot be deleted now"], "message": "Bad request"}}'
135
+ http_version: '1.1'
136
+ recorded_at: Thu, 28 Jun 2012 22:28:19 GMT
137
+ - request:
138
+ method: delete
139
+ uri: https://bigml.io/andromeda/source/4fecda28035d0741ef00328a?username=<USERNAME>&api_key=<API_KEY>
140
+ body:
141
+ encoding: US-ASCII
142
+ string: ''
143
+ headers:
144
+ connection:
145
+ - close
146
+ response:
147
+ status:
148
+ code: 204
149
+ message: NO CONTENT
150
+ headers:
151
+ content-length:
152
+ - '0'
153
+ content-type:
154
+ - text/html; charset=utf-8
155
+ date:
156
+ - Thu, 28 Jun 2012 22:26:09 GMT
157
+ server:
158
+ - nginx/1.0.12
159
+ connection:
160
+ - Close
161
+ body:
162
+ encoding: US-ASCII
163
+ string: ''
164
+ http_version: '1.1'
165
+ recorded_at: Thu, 28 Jun 2012 22:28:22 GMT
166
+ - request:
167
+ method: get
168
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
169
+ body:
170
+ encoding: US-ASCII
171
+ string: ''
172
+ headers:
173
+ connection:
174
+ - close
175
+ response:
176
+ status:
177
+ code: 200
178
+ message: OK
179
+ headers:
180
+ content-type:
181
+ - application/json; charset=utf-8
182
+ date:
183
+ - Thu, 28 Jun 2012 22:23:37 GMT
184
+ server:
185
+ - nginx/1.0.12
186
+ content-length:
187
+ - '1320'
188
+ connection:
189
+ - Close
190
+ body:
191
+ encoding: US-ASCII
192
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
193
+ "total_count": 2}, "objects": [{"category": 0, "code": 200, "columns": 5,
194
+ "created": "2012-06-28T22:28:26.926000", "credits": 0.00439453125, "description":
195
+ "", "locale": "en_US", "name": "iris'' dataset", "number_of_models": 1, "number_of_predictions":
196
+ 0, "private": true, "resource": "dataset/4fecda8a15526875f800332e", "rows":
197
+ 150, "size": 4608, "source": "source/4fecda58035d0741f40032a6", "source_status":
198
+ true, "status": {"bytes": 4608, "code": 4, "elapsed": 12445, "field_errors":
199
+ [], "message": "The summary is completed. Serializing", "row_format_errors":
200
+ [], "serialized_rows": 150}, "tags": [], "updated": "2012-06-28T22:28:34.598000"},
201
+ {"category": 0, "code": 200, "columns": 5, "created": "2012-06-28T22:27:15.108000",
202
+ "credits": 0.00439453125, "description": "", "locale": "en_US", "name": "iris''
203
+ dataset", "number_of_models": 0, "number_of_predictions": 0, "private": true,
204
+ "resource": "dataset/4fecda43035d0741ef003291", "rows": 150, "size": 4608,
205
+ "source": "source/4fecda41035d0741f1003314", "source_status": true, "status":
206
+ {"bytes": 4608, "code": 5, "elapsed": 35602, "field_errors": [], "message":
207
+ "The dataset has been created", "row_format_errors": [], "serialized_rows":
208
+ 150}, "tags": [], "updated": "2012-06-28T22:27:47.157000"}]}'
209
+ http_version: '1.1'
210
+ recorded_at: Thu, 28 Jun 2012 22:28:23 GMT
211
+ - request:
212
+ method: delete
213
+ uri: https://bigml.io/andromeda/dataset/4fecda8a15526875f800332e?username=<USERNAME>&api_key=<API_KEY>
214
+ body:
215
+ encoding: US-ASCII
216
+ string: ''
217
+ headers:
218
+ connection:
219
+ - close
220
+ response:
221
+ status:
222
+ code: 400
223
+ message: BAD REQUEST
224
+ headers:
225
+ content-type:
226
+ - application/json; charset=utf-8
227
+ date:
228
+ - Thu, 28 Jun 2012 22:26:12 GMT
229
+ server:
230
+ - nginx/1.0.12
231
+ content-length:
232
+ - '132'
233
+ connection:
234
+ - Close
235
+ body:
236
+ encoding: US-ASCII
237
+ string: ! '{"code": 400, "status": {"code": -1204, "extra": ["The dataset is
238
+ being used and cannot be deleted now"], "message": "Bad request"}}'
239
+ http_version: '1.1'
240
+ recorded_at: Thu, 28 Jun 2012 22:28:25 GMT
241
+ - request:
242
+ method: delete
243
+ uri: https://bigml.io/andromeda/dataset/4fecda43035d0741ef003291?username=<USERNAME>&api_key=<API_KEY>
244
+ body:
245
+ encoding: US-ASCII
246
+ string: ''
247
+ headers:
248
+ connection:
249
+ - close
250
+ response:
251
+ status:
252
+ code: 204
253
+ message: NO CONTENT
254
+ headers:
255
+ content-length:
256
+ - '0'
257
+ content-type:
258
+ - text/html; charset=utf-8
259
+ date:
260
+ - Thu, 28 Jun 2012 22:23:40 GMT
261
+ server:
262
+ - nginx/1.0.12
263
+ connection:
264
+ - Close
265
+ body:
266
+ encoding: US-ASCII
267
+ string: ''
268
+ http_version: '1.1'
269
+ recorded_at: Thu, 28 Jun 2012 22:28:27 GMT
270
+ - request:
271
+ method: get
272
+ uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
273
+ body:
274
+ encoding: US-ASCII
275
+ string: ''
276
+ headers:
277
+ connection:
278
+ - close
279
+ response:
280
+ status:
281
+ code: 200
282
+ message: OK
283
+ headers:
284
+ content-type:
285
+ - application/json; charset=utf-8
286
+ date:
287
+ - Thu, 28 Jun 2012 22:26:15 GMT
288
+ server:
289
+ - nginx/1.0.12
290
+ content-length:
291
+ - '831'
292
+ connection:
293
+ - Close
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
297
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "columns": 5,
298
+ "created": "2012-06-28T22:28:28.827000", "credits": 0.017578125, "dataset":
299
+ "dataset/4fecda8a15526875f800332e", "dataset_status": true, "description":
300
+ "", "holdout": 0.0, "input_fields": ["000000", "000001", "000002", "000003"],
301
+ "locale": "en_US", "max_columns": 5, "max_rows": 150, "name": "foo name",
302
+ "number_of_predictions": 0, "objective_fields": ["000004"], "private": true,
303
+ "range": [1, 150], "resource": "model/4fecda8c15526875f8003331", "rows": 150,
304
+ "size": 4608, "source": "source/4fecda58035d0741f40032a6", "source_status":
305
+ true, "status": {"code": 5, "elapsed": 135, "message": "The model has been
306
+ created", "progress": 1}, "tags": [], "updated": "2012-06-28T22:28:41.324000"}]}'
307
+ http_version: '1.1'
308
+ recorded_at: Thu, 28 Jun 2012 22:28:28 GMT
309
+ - request:
310
+ method: delete
311
+ uri: https://bigml.io/andromeda/model/4fecda8c15526875f8003331?username=<USERNAME>&api_key=<API_KEY>
312
+ body:
313
+ encoding: US-ASCII
314
+ string: ''
315
+ headers:
316
+ connection:
317
+ - close
318
+ response:
319
+ status:
320
+ code: 204
321
+ message: NO CONTENT
322
+ headers:
323
+ content-length:
324
+ - '0'
325
+ content-type:
326
+ - text/html; charset=utf-8
327
+ date:
328
+ - Thu, 28 Jun 2012 22:23:44 GMT
329
+ server:
330
+ - nginx/1.0.12
331
+ connection:
332
+ - Close
333
+ body:
334
+ encoding: US-ASCII
335
+ string: ''
336
+ http_version: '1.1'
337
+ recorded_at: Thu, 28 Jun 2012 22:28:30 GMT
338
+ - request:
339
+ method: post
340
+ uri: https://bigml.io/andromeda/source
341
+ body:
342
+ encoding: US-ASCII
343
+ string: ''
344
+ headers:
345
+ content-type:
346
+ - multipart/form-data; boundary=-----------RubyMultipartPost
347
+ content-length:
348
+ - '5147'
349
+ connection:
350
+ - close
351
+ response:
352
+ status:
353
+ code: 201
354
+ message: CREATED
355
+ headers:
356
+ content-type:
357
+ - application/json; charset=utf-8
358
+ date:
359
+ - Thu, 28 Jun 2012 22:26:19 GMT
360
+ location:
361
+ - http://bigml.io/andromeda/source/4fecdaa015526875f900328f
362
+ server:
363
+ - nginx/1.0.12
364
+ content-length:
365
+ - '567'
366
+ connection:
367
+ - Close
368
+ body:
369
+ encoding: US-ASCII
370
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
371
+ "created": "2012-06-28T22:28:48.501847", "credits": 0.0, "description": "",
372
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
373
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
374
+ 0, "private": true, "resource": "source/4fecdaa015526875f900328f", "size":
375
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
376
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
377
+ "2012-06-28T22:28:48.501874"}'
378
+ http_version: '1.1'
379
+ recorded_at: Thu, 28 Jun 2012 22:28:32 GMT
380
+ - request:
381
+ method: post
382
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
383
+ body:
384
+ encoding: UTF-8
385
+ string: ! '{"source":"source/4fecdaa015526875f900328f"}'
386
+ headers:
387
+ content-type:
388
+ - application/json
389
+ connection:
390
+ - close
391
+ response:
392
+ status:
393
+ code: 201
394
+ message: CREATED
395
+ headers:
396
+ content-type:
397
+ - application/json; charset=utf-8
398
+ date:
399
+ - Thu, 28 Jun 2012 22:23:47 GMT
400
+ location:
401
+ - http://bigml.io/andromeda/dataset/4fecda71035d0741ed0032ff
402
+ server:
403
+ - nginx/1.0.12
404
+ content-length:
405
+ - '921'
406
+ connection:
407
+ - Close
408
+ body:
409
+ encoding: US-ASCII
410
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:28:01.390898",
411
+ "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
412
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
413
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
414
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
415
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
416
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
417
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
418
+ true, "resource": "dataset/4fecda71035d0741ed0032ff", "rows": 0, "size": 4608,
419
+ "source": "source/4fecdaa015526875f900328f", "source_status": true, "status":
420
+ {"code": 1, "message": "The dataset is being processed and will be created
421
+ soon"}, "tags": [], "updated": "2012-06-28T22:28:01.390927"}'
422
+ http_version: '1.1'
423
+ recorded_at: Thu, 28 Jun 2012 22:28:34 GMT
424
+ - request:
425
+ method: post
426
+ uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
427
+ body:
428
+ encoding: UTF-8
429
+ string: ! '{"dataset":"dataset/4fecda71035d0741ed0032ff"}'
430
+ headers:
431
+ content-type:
432
+ - application/json
433
+ connection:
434
+ - close
435
+ response:
436
+ status:
437
+ code: 201
438
+ message: CREATED
439
+ headers:
440
+ content-type:
441
+ - application/json; charset=utf-8
442
+ date:
443
+ - Thu, 28 Jun 2012 22:26:22 GMT
444
+ location:
445
+ - http://bigml.io/andromeda/model/4fecda73035d0741f0003367
446
+ server:
447
+ - nginx/1.0.12
448
+ content-length:
449
+ - '691'
450
+ connection:
451
+ - Close
452
+ body:
453
+ encoding: US-ASCII
454
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:28:03.052507",
455
+ "credits": 0.017578125, "dataset": "dataset/4fecda71035d0741ed0032ff", "dataset_status":
456
+ true, "description": "", "holdout": 0.0, "input_fields": [], "locale": "en_US",
457
+ "max_columns": 5, "max_rows": 150, "name": "iris'' dataset model", "number_of_predictions":
458
+ 0, "objective_fields": [], "private": true, "range": [1, 150], "resource":
459
+ "model/4fecda73035d0741f0003367", "rows": 150, "size": 4608, "source": "source/4fecdaa015526875f900328f",
460
+ "source_status": true, "status": {"code": 1, "message": "The model is being
461
+ processed and will be created soon"}, "tags": [], "updated": "2012-06-28T22:28:03.052529"}'
462
+ http_version: '1.1'
463
+ recorded_at: Thu, 28 Jun 2012 22:28:35 GMT
464
+ - request:
465
+ method: put
466
+ uri: https://bigml.io/andromeda/model/4fecda73035d0741f0003367?username=<USERNAME>&api_key=<API_KEY>
467
+ body:
468
+ encoding: UTF-8
469
+ string: ! '{"name":"foo name"}'
470
+ headers:
471
+ content-type:
472
+ - application/json
473
+ connection:
474
+ - close
475
+ response:
476
+ status:
477
+ code: 202
478
+ message: ACCEPTED
479
+ headers:
480
+ content-type:
481
+ - application/json; charset=utf-8
482
+ date:
483
+ - Thu, 28 Jun 2012 22:23:50 GMT
484
+ server:
485
+ - nginx/1.0.12
486
+ content-length:
487
+ - '6504'
488
+ connection:
489
+ - Close
490
+ body:
491
+ encoding: US-ASCII
492
+ string: ! '{"category": 0, "code": 202, "columns": 5, "created": "2012-06-28T22:28:03.052000",
493
+ "credits": 0.017578125, "dataset": "dataset/4fecda71035d0741ed0032ff", "dataset_status":
494
+ true, "description": "", "holdout": 0.0, "input_fields": ["000000", "000001",
495
+ "000002", "000003"], "locale": "en_US", "max_columns": 5, "max_rows": 150,
496
+ "model": {"fields": {"000000": {"column_number": 0, "datatype": "double",
497
+ "name": "sepal length", "optype": "numeric", "preferred": true, "summary":
498
+ {"maximum": 7.9, "median": 5.77889, "minimum": 4.3, "missing_count": 0, "population":
499
+ 150, "splits": [4.51526, 4.67252, 4.81113, 4.89582, 4.96139, 5.01131, 5.05992,
500
+ 5.11148, 5.18177, 5.35681, 5.44129, 5.5108, 5.58255, 5.65532, 5.71658, 5.77889,
501
+ 5.85381, 5.97078, 6.05104, 6.13074, 6.23023, 6.29578, 6.35078, 6.41459, 6.49383,
502
+ 6.63013, 6.70719, 6.79218, 6.92597, 7.20423, 7.64746], "sum": 876.5, "sum_squares":
503
+ 5223.85}}, "000001": {"column_number": 1, "datatype": "double", "name": "sepal
504
+ width", "optype": "numeric", "preferred": true, "summary": {"counts": [[2,
505
+ 1], [2.2, 3], [2.3, 4], [2.4, 3], [2.5, 8], [2.6, 5], [2.7, 9], [2.8, 14],
506
+ [2.9, 10], [3, 26], [3.1, 11], [3.2, 13], [3.3, 6], [3.4, 12], [3.5, 6], [3.6,
507
+ 4], [3.7, 3], [3.8, 6], [3.9, 2], [4, 1], [4.1, 1], [4.2, 1], [4.4, 1]], "maximum":
508
+ 4.4, "median": 3.02044, "minimum": 2, "missing_count": 0, "population": 150,
509
+ "sum": 458.6, "sum_squares": 1430.4}}, "000002": {"column_number": 2, "datatype":
510
+ "double", "name": "petal length", "optype": "numeric", "preferred": true,
511
+ "summary": {"maximum": 6.9, "median": 4.34142, "minimum": 1, "missing_count":
512
+ 0, "population": 150, "splits": [1.25138, 1.32426, 1.37171, 1.40962, 1.44567,
513
+ 1.48173, 1.51859, 1.56301, 1.6255, 1.74645, 3.23033, 3.675, 3.94203, 4.0469,
514
+ 4.18243, 4.34142, 4.45309, 4.51823, 4.61771, 4.72566, 4.83445, 4.93363, 5.03807,
515
+ 5.1064, 5.20938, 5.43979, 5.5744, 5.6646, 5.81496, 6.02913, 6.38125], "sum":
516
+ 563.7, "sum_squares": 2582.71}}, "000003": {"column_number": 3, "datatype":
517
+ "double", "name": "petal width", "optype": "numeric", "preferred": true, "summary":
518
+ {"counts": [[0.1, 5], [0.2, 29], [0.3, 7], [0.4, 7], [0.5, 1], [0.6, 1], [1,
519
+ 7], [1.1, 3], [1.2, 5], [1.3, 13], [1.4, 8], [1.5, 12], [1.6, 4], [1.7, 2],
520
+ [1.8, 12], [1.9, 5], [2, 6], [2.1, 6], [2.2, 3], [2.3, 8], [2.4, 3], [2.5,
521
+ 3]], "maximum": 2.5, "median": 1.32848, "minimum": 0.1, "missing_count": 0,
522
+ "population": 150, "sum": 179.9, "sum_squares": 302.33}}, "000004": {"column_number":
523
+ 4, "datatype": "string", "name": "species", "optype": "categorical", "preferred":
524
+ true, "summary": {"categories": [["Iris-versicolor", 50], ["Iris-setosa",
525
+ 50], ["Iris-virginica", 50]], "missing_count": 0}}}, "kind": "stree", "locale":
526
+ "en_US", "missing_strategy": "last_prediction", "root": {"children": [{"children":
527
+ [{"children": [{"count": 38, "distribution": [["Iris-virginica", 38]], "leaf":
528
+ true, "output": "Iris-virginica", "predicate": {"field": "000002", "operator":
529
+ ">", "value": 5.05}}, {"children": [{"children": [{"children": [{"count":
530
+ 1, "distribution": [["Iris-versicolor", 1]], "leaf": true, "output": "Iris-versicolor",
531
+ "predicate": {"field": "000002", "operator": ">", "value": 4.95}}, {"count":
532
+ 2, "distribution": [["Iris-virginica", 2]], "leaf": true, "output": "Iris-virginica",
533
+ "predicate": {"field": "000002", "operator": "<=", "value": 4.95}}], "count":
534
+ 3, "distribution": [["Iris-virginica", 2], ["Iris-versicolor", 1]], "output":
535
+ "Iris-virginica", "predicate": {"field": "000000", "operator": ">", "value":
536
+ 5.95}}, {"count": 1, "distribution": [["Iris-versicolor", 1]], "leaf": true,
537
+ "output": "Iris-versicolor", "predicate": {"field": "000000", "operator":
538
+ "<=", "value": 5.95}}], "count": 4, "distribution": [["Iris-virginica", 2],
539
+ ["Iris-versicolor", 2]], "output": "Iris-virginica", "predicate": {"field":
540
+ "000001", "operator": ">", "value": 2.9}}, {"count": 6, "distribution": [["Iris-virginica",
541
+ 6]], "leaf": true, "output": "Iris-virginica", "predicate": {"field": "000001",
542
+ "operator": "<=", "value": 2.9}}], "count": 10, "distribution": [["Iris-virginica",
543
+ 8], ["Iris-versicolor", 2]], "output": "Iris-virginica", "predicate": {"field":
544
+ "000002", "operator": "<=", "value": 5.05}}], "count": 48, "distribution":
545
+ [["Iris-virginica", 46], ["Iris-versicolor", 2]], "output": "Iris-virginica",
546
+ "predicate": {"field": "000003", "operator": ">", "value": 1.65}}, {"children":
547
+ [{"children": [{"count": 3, "distribution": [["Iris-virginica", 3]], "leaf":
548
+ true, "output": "Iris-virginica", "predicate": {"field": "000000", "operator":
549
+ ">", "value": 6.05}}, {"children": [{"count": 1, "distribution": [["Iris-versicolor",
550
+ 1]], "leaf": true, "output": "Iris-versicolor", "predicate": {"field": "000001",
551
+ "operator": ">", "value": 2.45}}, {"count": 1, "distribution": [["Iris-virginica",
552
+ 1]], "leaf": true, "output": "Iris-virginica", "predicate": {"field": "000001",
553
+ "operator": "<=", "value": 2.45}}], "count": 2, "distribution": [["Iris-virginica",
554
+ 1], ["Iris-versicolor", 1]], "output": "Iris-virginica", "predicate": {"field":
555
+ "000000", "operator": "<=", "value": 6.05}}], "count": 5, "distribution":
556
+ [["Iris-virginica", 4], ["Iris-versicolor", 1]], "output": "Iris-virginica",
557
+ "predicate": {"field": "000002", "operator": ">", "value": 4.95}}, {"count":
558
+ 47, "distribution": [["Iris-versicolor", 47]], "leaf": true, "output": "Iris-versicolor",
559
+ "predicate": {"field": "000002", "operator": "<=", "value": 4.95}}], "count":
560
+ 52, "distribution": [["Iris-virginica", 4], ["Iris-versicolor", 48]], "output":
561
+ "Iris-versicolor", "predicate": {"field": "000003", "operator": "<=", "value":
562
+ 1.65}}], "count": 100, "distribution": [["Iris-virginica", 50], ["Iris-versicolor",
563
+ 50]], "output": "Iris-virginica", "predicate": {"field": "000002", "operator":
564
+ ">", "value": 2.45}}, {"count": 50, "distribution": [["Iris-setosa", 50]],
565
+ "leaf": true, "output": "Iris-setosa", "predicate": {"field": "000002", "operator":
566
+ "<=", "value": 2.45}}], "count": 150, "distribution": [["Iris-virginica",
567
+ 50], ["Iris-versicolor", 50], ["Iris-setosa", 50]], "output": "Iris-virginica",
568
+ "predicate": true}, "row_range": {"size": 150, "start": 0}}, "name": "foo
569
+ name", "number_of_predictions": 0, "objective_fields": ["000004"], "private":
570
+ true, "range": [1, 150], "resource": "model/4fecda73035d0741f0003367", "rows":
571
+ 150, "size": 4608, "source": "source/4fecdaa015526875f900328f", "source_status":
572
+ true, "status": {"code": 5, "elapsed": 127, "message": "The model has been
573
+ created", "progress": 1}, "tags": [], "updated": "2012-06-28T22:28:53.461662"}'
574
+ http_version: '1.1'
575
+ recorded_at: Thu, 28 Jun 2012 22:28:37 GMT
576
+ - request:
577
+ method: get
578
+ uri: https://bigml.io/andromeda/model/4fecda73035d0741f0003367?username=<USERNAME>&api_key=<API_KEY>
579
+ body:
580
+ encoding: US-ASCII
581
+ string: ''
582
+ headers:
583
+ connection:
584
+ - close
585
+ response:
586
+ status:
587
+ code: 200
588
+ message: OK
589
+ headers:
590
+ content-type:
591
+ - application/json; charset=utf-8
592
+ date:
593
+ - Thu, 28 Jun 2012 22:26:25 GMT
594
+ server:
595
+ - nginx/1.0.12
596
+ content-length:
597
+ - '6504'
598
+ connection:
599
+ - Close
600
+ body:
601
+ encoding: US-ASCII
602
+ string: ! '{"category": 0, "code": 200, "columns": 5, "created": "2012-06-28T22:28:03.052000",
603
+ "credits": 0.017578125, "dataset": "dataset/4fecda71035d0741ed0032ff", "dataset_status":
604
+ true, "description": "", "holdout": 0.0, "input_fields": ["000000", "000001",
605
+ "000002", "000003"], "locale": "en_US", "max_columns": 5, "max_rows": 150,
606
+ "model": {"fields": {"000000": {"column_number": 0, "datatype": "double",
607
+ "name": "sepal length", "optype": "numeric", "preferred": true, "summary":
608
+ {"maximum": 7.9, "median": 5.77889, "minimum": 4.3, "missing_count": 0, "population":
609
+ 150, "splits": [4.51526, 4.67252, 4.81113, 4.89582, 4.96139, 5.01131, 5.05992,
610
+ 5.11148, 5.18177, 5.35681, 5.44129, 5.5108, 5.58255, 5.65532, 5.71658, 5.77889,
611
+ 5.85381, 5.97078, 6.05104, 6.13074, 6.23023, 6.29578, 6.35078, 6.41459, 6.49383,
612
+ 6.63013, 6.70719, 6.79218, 6.92597, 7.20423, 7.64746], "sum": 876.5, "sum_squares":
613
+ 5223.85}}, "000001": {"column_number": 1, "datatype": "double", "name": "sepal
614
+ width", "optype": "numeric", "preferred": true, "summary": {"counts": [[2,
615
+ 1], [2.2, 3], [2.3, 4], [2.4, 3], [2.5, 8], [2.6, 5], [2.7, 9], [2.8, 14],
616
+ [2.9, 10], [3, 26], [3.1, 11], [3.2, 13], [3.3, 6], [3.4, 12], [3.5, 6], [3.6,
617
+ 4], [3.7, 3], [3.8, 6], [3.9, 2], [4, 1], [4.1, 1], [4.2, 1], [4.4, 1]], "maximum":
618
+ 4.4, "median": 3.02044, "minimum": 2, "missing_count": 0, "population": 150,
619
+ "sum": 458.6, "sum_squares": 1430.4}}, "000002": {"column_number": 2, "datatype":
620
+ "double", "name": "petal length", "optype": "numeric", "preferred": true,
621
+ "summary": {"maximum": 6.9, "median": 4.34142, "minimum": 1, "missing_count":
622
+ 0, "population": 150, "splits": [1.25138, 1.32426, 1.37171, 1.40962, 1.44567,
623
+ 1.48173, 1.51859, 1.56301, 1.6255, 1.74645, 3.23033, 3.675, 3.94203, 4.0469,
624
+ 4.18243, 4.34142, 4.45309, 4.51823, 4.61771, 4.72566, 4.83445, 4.93363, 5.03807,
625
+ 5.1064, 5.20938, 5.43979, 5.5744, 5.6646, 5.81496, 6.02913, 6.38125], "sum":
626
+ 563.7, "sum_squares": 2582.71}}, "000003": {"column_number": 3, "datatype":
627
+ "double", "name": "petal width", "optype": "numeric", "preferred": true, "summary":
628
+ {"counts": [[0.1, 5], [0.2, 29], [0.3, 7], [0.4, 7], [0.5, 1], [0.6, 1], [1,
629
+ 7], [1.1, 3], [1.2, 5], [1.3, 13], [1.4, 8], [1.5, 12], [1.6, 4], [1.7, 2],
630
+ [1.8, 12], [1.9, 5], [2, 6], [2.1, 6], [2.2, 3], [2.3, 8], [2.4, 3], [2.5,
631
+ 3]], "maximum": 2.5, "median": 1.32848, "minimum": 0.1, "missing_count": 0,
632
+ "population": 150, "sum": 179.9, "sum_squares": 302.33}}, "000004": {"column_number":
633
+ 4, "datatype": "string", "name": "species", "optype": "categorical", "preferred":
634
+ true, "summary": {"categories": [["Iris-versicolor", 50], ["Iris-setosa",
635
+ 50], ["Iris-virginica", 50]], "missing_count": 0}}}, "kind": "stree", "locale":
636
+ "en_US", "missing_strategy": "last_prediction", "root": {"children": [{"children":
637
+ [{"children": [{"count": 38, "distribution": [["Iris-virginica", 38]], "leaf":
638
+ true, "output": "Iris-virginica", "predicate": {"field": "000002", "operator":
639
+ ">", "value": 5.05}}, {"children": [{"children": [{"children": [{"count":
640
+ 1, "distribution": [["Iris-versicolor", 1]], "leaf": true, "output": "Iris-versicolor",
641
+ "predicate": {"field": "000002", "operator": ">", "value": 4.95}}, {"count":
642
+ 2, "distribution": [["Iris-virginica", 2]], "leaf": true, "output": "Iris-virginica",
643
+ "predicate": {"field": "000002", "operator": "<=", "value": 4.95}}], "count":
644
+ 3, "distribution": [["Iris-virginica", 2], ["Iris-versicolor", 1]], "output":
645
+ "Iris-virginica", "predicate": {"field": "000000", "operator": ">", "value":
646
+ 5.95}}, {"count": 1, "distribution": [["Iris-versicolor", 1]], "leaf": true,
647
+ "output": "Iris-versicolor", "predicate": {"field": "000000", "operator":
648
+ "<=", "value": 5.95}}], "count": 4, "distribution": [["Iris-virginica", 2],
649
+ ["Iris-versicolor", 2]], "output": "Iris-virginica", "predicate": {"field":
650
+ "000001", "operator": ">", "value": 2.9}}, {"count": 6, "distribution": [["Iris-virginica",
651
+ 6]], "leaf": true, "output": "Iris-virginica", "predicate": {"field": "000001",
652
+ "operator": "<=", "value": 2.9}}], "count": 10, "distribution": [["Iris-virginica",
653
+ 8], ["Iris-versicolor", 2]], "output": "Iris-virginica", "predicate": {"field":
654
+ "000002", "operator": "<=", "value": 5.05}}], "count": 48, "distribution":
655
+ [["Iris-virginica", 46], ["Iris-versicolor", 2]], "output": "Iris-virginica",
656
+ "predicate": {"field": "000003", "operator": ">", "value": 1.65}}, {"children":
657
+ [{"children": [{"count": 3, "distribution": [["Iris-virginica", 3]], "leaf":
658
+ true, "output": "Iris-virginica", "predicate": {"field": "000000", "operator":
659
+ ">", "value": 6.05}}, {"children": [{"count": 1, "distribution": [["Iris-versicolor",
660
+ 1]], "leaf": true, "output": "Iris-versicolor", "predicate": {"field": "000001",
661
+ "operator": ">", "value": 2.45}}, {"count": 1, "distribution": [["Iris-virginica",
662
+ 1]], "leaf": true, "output": "Iris-virginica", "predicate": {"field": "000001",
663
+ "operator": "<=", "value": 2.45}}], "count": 2, "distribution": [["Iris-virginica",
664
+ 1], ["Iris-versicolor", 1]], "output": "Iris-virginica", "predicate": {"field":
665
+ "000000", "operator": "<=", "value": 6.05}}], "count": 5, "distribution":
666
+ [["Iris-virginica", 4], ["Iris-versicolor", 1]], "output": "Iris-virginica",
667
+ "predicate": {"field": "000002", "operator": ">", "value": 4.95}}, {"count":
668
+ 47, "distribution": [["Iris-versicolor", 47]], "leaf": true, "output": "Iris-versicolor",
669
+ "predicate": {"field": "000002", "operator": "<=", "value": 4.95}}], "count":
670
+ 52, "distribution": [["Iris-virginica", 4], ["Iris-versicolor", 48]], "output":
671
+ "Iris-versicolor", "predicate": {"field": "000003", "operator": "<=", "value":
672
+ 1.65}}], "count": 100, "distribution": [["Iris-virginica", 50], ["Iris-versicolor",
673
+ 50]], "output": "Iris-virginica", "predicate": {"field": "000002", "operator":
674
+ ">", "value": 2.45}}, {"count": 50, "distribution": [["Iris-setosa", 50]],
675
+ "leaf": true, "output": "Iris-setosa", "predicate": {"field": "000002", "operator":
676
+ "<=", "value": 2.45}}], "count": 150, "distribution": [["Iris-virginica",
677
+ 50], ["Iris-versicolor", 50], ["Iris-setosa", 50]], "output": "Iris-virginica",
678
+ "predicate": true}, "row_range": {"size": 150, "start": 0}}, "name": "foo
679
+ name", "number_of_predictions": 0, "objective_fields": ["000004"], "private":
680
+ true, "range": [1, 150], "resource": "model/4fecda73035d0741f0003367", "rows":
681
+ 150, "size": 4608, "source": "source/4fecdaa015526875f900328f", "source_status":
682
+ true, "status": {"code": 5, "elapsed": 127, "message": "The model has been
683
+ created", "progress": 1}, "tags": [], "updated": "2012-06-28T22:28:53.617000"}'
684
+ http_version: '1.1'
685
+ recorded_at: Thu, 28 Jun 2012 22:28:38 GMT
686
+ recorded_with: VCR 2.2.2