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,546 @@
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 04:09:20 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-20T04:11:01.678000", "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
+ 1, "private": true, "resource": "source/4fe14d551552687d48000119", "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": 72, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-20T04:11:05.769000"}]}'
45
+ http_version: '1.1'
46
+ recorded_at: Wed, 20 Jun 2012 04:10:51 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://bigml.io/andromeda/source/4fe14d551552687d48000119?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 04:07:02 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 04:10:53 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 04:09:23 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-20T04:10:34.713000", "credits": 0.0087890625, "description":
105
+ "", "locale": "en_US", "name": "iris'' dataset", "number_of_models": 1, "number_of_predictions":
106
+ 1, "private": true, "resource": "dataset/4fe14d3a035d074a1e000116", "rows":
107
+ 150, "size": 4608, "source": "source/4fe14d551552687d48000119", "source_status":
108
+ false, "status": {"bytes": 4608, "code": 5, "elapsed": 208, "field_errors":
109
+ [], "message": "The dataset has been created", "row_format_errors": [], "serialized_rows":
110
+ 150}, "tags": [], "updated": "2012-06-20T04:11:05.776000"}]}'
111
+ http_version: '1.1'
112
+ recorded_at: Wed, 20 Jun 2012 04:10:54 GMT
113
+ - request:
114
+ method: delete
115
+ uri: https://bigml.io/andromeda/dataset/4fe14d3a035d074a1e000116?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 04:07:05 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 04:10:55 GMT
142
+ - request:
143
+ method: get
144
+ uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ''
148
+ headers:
149
+ connection:
150
+ - close
151
+ response:
152
+ status:
153
+ code: 200
154
+ message: OK
155
+ headers:
156
+ content-type:
157
+ - application/json; charset=utf-8
158
+ date:
159
+ - Wed, 20 Jun 2012 04:09:25 GMT
160
+ server:
161
+ - nginx/1.0.12
162
+ content-length:
163
+ - '843'
164
+ connection:
165
+ - Close
166
+ body:
167
+ encoding: US-ASCII
168
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
169
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "columns": 5,
170
+ "created": "2012-06-20T04:10:36.050000", "credits": 0.03515625, "dataset":
171
+ "dataset/4fe14d3a035d074a1e000116", "dataset_status": false, "description":
172
+ "", "holdout": 0.0, "input_fields": ["000000", "000001", "000002", "000003"],
173
+ "locale": "en_US", "max_columns": 5, "max_rows": 150, "name": "iris'' dataset
174
+ model", "number_of_predictions": 1, "objective_fields": ["000004"], "private":
175
+ true, "range": [1, 150], "resource": "model/4fe14d3c035d074a21000150", "rows":
176
+ 150, "size": 4608, "source": "source/4fe14d551552687d48000119", "source_status":
177
+ false, "status": {"code": 5, "elapsed": 199, "message": "The model has been
178
+ created", "progress": 1}, "tags": [], "updated": "2012-06-20T04:11:05.780000"}]}'
179
+ http_version: '1.1'
180
+ recorded_at: Wed, 20 Jun 2012 04:10:56 GMT
181
+ - request:
182
+ method: delete
183
+ uri: https://bigml.io/andromeda/model/4fe14d3c035d074a21000150?username=<USERNAME>&api_key=<API_KEY>
184
+ body:
185
+ encoding: US-ASCII
186
+ string: ''
187
+ headers:
188
+ connection:
189
+ - close
190
+ response:
191
+ status:
192
+ code: 204
193
+ message: NO CONTENT
194
+ headers:
195
+ content-length:
196
+ - '0'
197
+ content-type:
198
+ - text/html; charset=utf-8
199
+ date:
200
+ - Wed, 20 Jun 2012 04:07:07 GMT
201
+ server:
202
+ - nginx/1.0.12
203
+ connection:
204
+ - Close
205
+ body:
206
+ encoding: US-ASCII
207
+ string: ''
208
+ http_version: '1.1'
209
+ recorded_at: Wed, 20 Jun 2012 04:10:58 GMT
210
+ - request:
211
+ method: get
212
+ uri: https://bigml.io/andromeda/prediction?username=<USERNAME>&api_key=<API_KEY>
213
+ body:
214
+ encoding: US-ASCII
215
+ string: ''
216
+ headers:
217
+ connection:
218
+ - close
219
+ response:
220
+ status:
221
+ code: 200
222
+ message: OK
223
+ headers:
224
+ content-type:
225
+ - application/json; charset=utf-8
226
+ date:
227
+ - Wed, 20 Jun 2012 04:09:29 GMT
228
+ server:
229
+ - nginx/1.0.12
230
+ content-length:
231
+ - '1326'
232
+ connection:
233
+ - Close
234
+ body:
235
+ encoding: US-ASCII
236
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
237
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "created": "2012-06-20T04:11:05.764000",
238
+ "credits": 0.01, "dataset": "dataset/4fe14d3a035d074a1e000116", "dataset_status":
239
+ false, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
240
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true},
241
+ "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
242
+ "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
243
+ "string", "name": "species", "optype": "categorical", "preferred": true}},
244
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fe14d3c035d074a21000150",
245
+ "model_status": false, "name": "Prediction for species", "objective_fields":
246
+ ["000004"], "prediction": {"000004": "Iris-virginica"}, "prediction_path":
247
+ {"bad_fields": [], "next_predicates": [{"field": "000002", "operator": ">",
248
+ "value": 2.45}, {"field": "000002", "operator": "<=", "value": 2.45}], "path":
249
+ [], "unknown_fields": []}, "private": true, "resource": "prediction/4fe14d591552687d42000162",
250
+ "source": "source/4fe14d551552687d48000119", "source_status": false, "status":
251
+ {"code": 5, "message": "The prediction has been created"}, "tags": [], "updated":
252
+ "2012-06-20T04:11:05.764000"}]}'
253
+ http_version: '1.1'
254
+ recorded_at: Wed, 20 Jun 2012 04:10:59 GMT
255
+ - request:
256
+ method: delete
257
+ uri: https://bigml.io/andromeda/prediction/4fe14d591552687d42000162?username=<USERNAME>&api_key=<API_KEY>
258
+ body:
259
+ encoding: US-ASCII
260
+ string: ''
261
+ headers:
262
+ connection:
263
+ - close
264
+ response:
265
+ status:
266
+ code: 204
267
+ message: NO CONTENT
268
+ headers:
269
+ content-length:
270
+ - '0'
271
+ content-type:
272
+ - text/html; charset=utf-8
273
+ date:
274
+ - Wed, 20 Jun 2012 04:07:10 GMT
275
+ server:
276
+ - nginx/1.0.12
277
+ connection:
278
+ - Close
279
+ body:
280
+ encoding: US-ASCII
281
+ string: ''
282
+ http_version: '1.1'
283
+ recorded_at: Wed, 20 Jun 2012 04:11:00 GMT
284
+ - request:
285
+ method: post
286
+ uri: https://bigml.io/andromeda/source
287
+ body:
288
+ encoding: US-ASCII
289
+ string: ''
290
+ headers:
291
+ content-type:
292
+ - multipart/form-data; boundary=-----------RubyMultipartPost
293
+ content-length:
294
+ - '5147'
295
+ connection:
296
+ - close
297
+ response:
298
+ status:
299
+ code: 201
300
+ message: CREATED
301
+ headers:
302
+ content-type:
303
+ - application/json; charset=utf-8
304
+ date:
305
+ - Wed, 20 Jun 2012 04:09:31 GMT
306
+ location:
307
+ - http://bigml.io/andromeda/source/4fe14d4b035d074a20000108
308
+ server:
309
+ - nginx/1.0.12
310
+ content-length:
311
+ - '567'
312
+ connection:
313
+ - Close
314
+ body:
315
+ encoding: US-ASCII
316
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
317
+ "created": "2012-06-20T04:10:51.198188", "credits": 0.0, "description": "",
318
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
319
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
320
+ 0, "private": true, "resource": "source/4fe14d4b035d074a20000108", "size":
321
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
322
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
323
+ "2012-06-20T04:10:51.198212"}'
324
+ http_version: '1.1'
325
+ recorded_at: Wed, 20 Jun 2012 04:11:02 GMT
326
+ - request:
327
+ method: post
328
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
329
+ body:
330
+ encoding: UTF-8
331
+ string: ! '{"source":"source/4fe14d4b035d074a20000108"}'
332
+ headers:
333
+ content-type:
334
+ - application/json
335
+ connection:
336
+ - close
337
+ response:
338
+ status:
339
+ code: 201
340
+ message: CREATED
341
+ headers:
342
+ content-type:
343
+ - application/json; charset=utf-8
344
+ date:
345
+ - Wed, 20 Jun 2012 04:07:13 GMT
346
+ location:
347
+ - http://bigml.io/andromeda/dataset/4fe14d4c035d074a21000156
348
+ server:
349
+ - nginx/1.0.12
350
+ content-length:
351
+ - '920'
352
+ connection:
353
+ - Close
354
+ body:
355
+ encoding: US-ASCII
356
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T04:10:52.524972",
357
+ "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
358
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
359
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
360
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
361
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
362
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
363
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
364
+ true, "resource": "dataset/4fe14d4c035d074a21000156", "rows": 0, "size": 4608,
365
+ "source": "source/4fe14d4b035d074a20000108", "source_status": true, "status":
366
+ {"code": 1, "message": "The dataset is being processed and will be created
367
+ soon"}, "tags": [], "updated": "2012-06-20T04:10:52.524991"}'
368
+ http_version: '1.1'
369
+ recorded_at: Wed, 20 Jun 2012 04:11:03 GMT
370
+ - request:
371
+ method: post
372
+ uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
373
+ body:
374
+ encoding: UTF-8
375
+ string: ! '{"dataset":"dataset/4fe14d4c035d074a21000156"}'
376
+ headers:
377
+ content-type:
378
+ - application/json
379
+ connection:
380
+ - close
381
+ response:
382
+ status:
383
+ code: 201
384
+ message: CREATED
385
+ headers:
386
+ content-type:
387
+ - application/json; charset=utf-8
388
+ date:
389
+ - Wed, 20 Jun 2012 04:09:34 GMT
390
+ location:
391
+ - http://bigml.io/andromeda/model/4fe14d6a1552687d4700011f
392
+ server:
393
+ - nginx/1.0.12
394
+ content-length:
395
+ - '690'
396
+ connection:
397
+ - Close
398
+ body:
399
+ encoding: US-ASCII
400
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T04:11:22.172148",
401
+ "credits": 0.03515625, "dataset": "dataset/4fe14d4c035d074a21000156", "dataset_status":
402
+ true, "description": "", "holdout": 0.0, "input_fields": [], "locale": "en_US",
403
+ "max_columns": 5, "max_rows": 150, "name": "iris'' dataset model", "number_of_predictions":
404
+ 0, "objective_fields": [], "private": true, "range": [1, 150], "resource":
405
+ "model/4fe14d6a1552687d4700011f", "rows": 150, "size": 4608, "source": "source/4fe14d4b035d074a20000108",
406
+ "source_status": true, "status": {"code": 1, "message": "The model is being
407
+ processed and will be created soon"}, "tags": [], "updated": "2012-06-20T04:11:22.172171"}'
408
+ http_version: '1.1'
409
+ recorded_at: Wed, 20 Jun 2012 04:11:05 GMT
410
+ - request:
411
+ method: post
412
+ uri: https://bigml.io/andromeda/prediction?username=<USERNAME>&api_key=<API_KEY>
413
+ body:
414
+ encoding: UTF-8
415
+ string: ! '{"model":"model/4fe14d6a1552687d4700011f","input_data":{"000001":3}}'
416
+ headers:
417
+ content-type:
418
+ - application/json
419
+ connection:
420
+ - close
421
+ response:
422
+ status:
423
+ code: 201
424
+ message: CREATED
425
+ headers:
426
+ content-type:
427
+ - application/json; charset=utf-8
428
+ date:
429
+ - Wed, 20 Jun 2012 04:07:16 GMT
430
+ location:
431
+ - http://bigml.io/andromeda/prediction/4fe14d6b1552687d42000167
432
+ server:
433
+ - nginx/1.0.12
434
+ content-length:
435
+ - '1222'
436
+ connection:
437
+ - Close
438
+ body:
439
+ encoding: US-ASCII
440
+ string: ! '{"category": 0, "code": 201, "created": "2012-06-20T04:11:23.601353",
441
+ "credits": 0.01, "dataset": "dataset/4fe14d4c035d074a21000156", "dataset_status":
442
+ true, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
443
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true},
444
+ "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
445
+ "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
446
+ "string", "name": "species", "optype": "categorical", "preferred": true}},
447
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fe14d6a1552687d4700011f",
448
+ "model_status": true, "name": "Prediction for species", "objective_fields":
449
+ ["000004"], "prediction": {"000004": "Iris-virginica"}, "prediction_path":
450
+ {"bad_fields": [], "next_predicates": [{"field": "000002", "operator": ">",
451
+ "value": 2.45}, {"field": "000002", "operator": "<=", "value": 2.45}], "path":
452
+ [], "unknown_fields": []}, "private": true, "resource": "prediction/4fe14d6b1552687d42000167",
453
+ "source": "source/4fe14d4b035d074a20000108", "source_status": true, "status":
454
+ {"code": 5, "message": "The prediction has been created"}, "tags": [], "updated":
455
+ "2012-06-20T04:11:23.601369"}'
456
+ http_version: '1.1'
457
+ recorded_at: Wed, 20 Jun 2012 04:11:06 GMT
458
+ - request:
459
+ method: put
460
+ uri: https://bigml.io/andromeda/prediction/4fe14d6b1552687d42000167?username=<USERNAME>&api_key=<API_KEY>
461
+ body:
462
+ encoding: UTF-8
463
+ string: ! '{"name":"foo name"}'
464
+ headers:
465
+ content-type:
466
+ - application/json
467
+ connection:
468
+ - close
469
+ response:
470
+ status:
471
+ code: 202
472
+ message: ACCEPTED
473
+ headers:
474
+ content-type:
475
+ - application/json; charset=utf-8
476
+ date:
477
+ - Wed, 20 Jun 2012 04:09:36 GMT
478
+ server:
479
+ - nginx/1.0.12
480
+ content-length:
481
+ - '1208'
482
+ connection:
483
+ - Close
484
+ body:
485
+ encoding: US-ASCII
486
+ string: ! '{"category": 0, "code": 202, "created": "2012-06-20T04:11:23.601000",
487
+ "credits": 0.01, "dataset": "dataset/4fe14d4c035d074a21000156", "dataset_status":
488
+ true, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
489
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true},
490
+ "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
491
+ "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
492
+ "string", "name": "species", "optype": "categorical", "preferred": true}},
493
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fe14d6a1552687d4700011f",
494
+ "model_status": true, "name": "foo name", "objective_fields": ["000004"],
495
+ "prediction": {"000004": "Iris-virginica"}, "prediction_path": {"bad_fields":
496
+ [], "next_predicates": [{"field": "000002", "operator": ">", "value": 2.45},
497
+ {"field": "000002", "operator": "<=", "value": 2.45}], "path": [], "unknown_fields":
498
+ []}, "private": true, "resource": "prediction/4fe14d6b1552687d42000167", "source":
499
+ "source/4fe14d4b035d074a20000108", "source_status": true, "status": {"code":
500
+ 5, "message": "The prediction has been created"}, "tags": [], "updated": "2012-06-20T04:10:56.416730"}'
501
+ http_version: '1.1'
502
+ recorded_at: Wed, 20 Jun 2012 04:11:07 GMT
503
+ - request:
504
+ method: get
505
+ uri: https://bigml.io/andromeda/prediction/4fe14d6b1552687d42000167?username=<USERNAME>&api_key=<API_KEY>
506
+ body:
507
+ encoding: US-ASCII
508
+ string: ''
509
+ headers:
510
+ connection:
511
+ - close
512
+ response:
513
+ status:
514
+ code: 200
515
+ message: OK
516
+ headers:
517
+ content-type:
518
+ - application/json; charset=utf-8
519
+ date:
520
+ - Wed, 20 Jun 2012 04:07:18 GMT
521
+ server:
522
+ - nginx/1.0.12
523
+ transfer-encoding:
524
+ - chunked
525
+ connection:
526
+ - Close
527
+ body:
528
+ encoding: US-ASCII
529
+ string: ! '{"category": 0, "code": 200, "created": "2012-06-20T04:11:23.601000",
530
+ "credits": 0.01, "dataset": "dataset/4fe14d4c035d074a21000156", "dataset_status":
531
+ true, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
532
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true},
533
+ "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
534
+ "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
535
+ "string", "name": "species", "optype": "categorical", "preferred": true}},
536
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fe14d6a1552687d4700011f",
537
+ "model_status": true, "name": "foo name", "objective_fields": ["000004"],
538
+ "prediction": {"000004": "Iris-virginica"}, "prediction_path": {"bad_fields":
539
+ [], "next_predicates": [{"field": "000002", "operator": ">", "value": 2.45},
540
+ {"field": "000002", "operator": "<=", "value": 2.45}], "path": [], "unknown_fields":
541
+ []}, "private": true, "resource": "prediction/4fe14d6b1552687d42000167", "source":
542
+ "source/4fe14d4b035d074a20000108", "source_status": true, "status": {"code":
543
+ 5, "message": "The prediction has been created"}, "tags": [], "updated": "2012-06-20T04:10:56.416000"}'
544
+ http_version: '1.1'
545
+ recorded_at: Wed, 20 Jun 2012 04:11:08 GMT
546
+ recorded_with: VCR 2.2.2