big_ml 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -17,7 +17,7 @@ http_interactions:
17
17
  content-type:
18
18
  - application/json; charset=utf-8
19
19
  date:
20
- - Wed, 20 Jun 2012 03:53:41 GMT
20
+ - Thu, 28 Jun 2012 22:21:30 GMT
21
21
  server:
22
22
  - nginx/1.0.12
23
23
  content-length:
@@ -28,25 +28,25 @@ http_interactions:
28
28
  encoding: US-ASCII
29
29
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
30
  "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
- "application/octet-stream", "created": "2012-06-20T03:57:06.463000", "credits":
31
+ "application/octet-stream", "created": "2012-06-28T22:26:27.886000", "credits":
32
32
  0.0, "description": "", "fields": {"000000": {"column_number": 0, "name":
33
33
  "sepal length", "optype": "numeric"}, "000001": {"column_number": 1, "name":
34
34
  "sepal width", "optype": "numeric"}, "000002": {"column_number": 2, "name":
35
35
  "petal length", "optype": "numeric"}, "000003": {"column_number": 3, "name":
36
36
  "petal width", "optype": "numeric"}, "000004": {"column_number": 4, "name":
37
37
  "species", "optype": "categorical"}}, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
38
- "name": "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
39
- 0, "private": true, "resource": "source/4fe14a12035d074a21000144", "size":
38
+ "name": "iris.csv", "number_of_datasets": 1, "number_of_models": 1, "number_of_predictions":
39
+ 0, "private": true, "resource": "source/4fecda1315526875f8003320", "size":
40
40
  4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
41
41
  ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
42
42
  "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
43
- "\"", "separator": ","}, "status": {"code": 5, "elapsed": 95, "message": "The
44
- source has been created"}, "tags": [], "type": 0, "updated": "2012-06-20T03:57:37.421000"}]}'
43
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 68, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:25:42.538000"}]}'
45
45
  http_version: '1.1'
46
- recorded_at: Wed, 20 Jun 2012 03:57:31 GMT
46
+ recorded_at: Thu, 28 Jun 2012 22:26:16 GMT
47
47
  - request:
48
48
  method: delete
49
- uri: https://bigml.io/andromeda/source/4fe14a12035d074a21000144?username=<USERNAME>&api_key=<API_KEY>
49
+ uri: https://bigml.io/andromeda/source/4fecda1315526875f8003320?username=<USERNAME>&api_key=<API_KEY>
50
50
  body:
51
51
  encoding: US-ASCII
52
52
  string: ''
@@ -63,7 +63,7 @@ http_interactions:
63
63
  content-type:
64
64
  - text/html; charset=utf-8
65
65
  date:
66
- - Wed, 20 Jun 2012 03:56:02 GMT
66
+ - Thu, 28 Jun 2012 22:24:05 GMT
67
67
  server:
68
68
  - nginx/1.0.12
69
69
  connection:
@@ -72,7 +72,7 @@ http_interactions:
72
72
  encoding: US-ASCII
73
73
  string: ''
74
74
  http_version: '1.1'
75
- recorded_at: Wed, 20 Jun 2012 03:57:33 GMT
75
+ recorded_at: Thu, 28 Jun 2012 22:26:18 GMT
76
76
  - request:
77
77
  method: get
78
78
  uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
@@ -90,19 +90,55 @@ http_interactions:
90
90
  content-type:
91
91
  - application/json; charset=utf-8
92
92
  date:
93
- - Wed, 20 Jun 2012 03:53:44 GMT
93
+ - Thu, 28 Jun 2012 22:21:33 GMT
94
94
  server:
95
95
  - nginx/1.0.12
96
- content-length:
97
- - '101'
96
+ transfer-encoding:
97
+ - chunked
98
98
  connection:
99
99
  - Close
100
100
  body:
101
101
  encoding: US-ASCII
102
102
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
103
- "total_count": 0}, "objects": []}'
103
+ "total_count": 1}, "objects": [{"category": 0, "code": 200, "columns": 5,
104
+ "created": "2012-06-28T22:25:40.755000", "credits": 0.00439453125, "description":
105
+ "", "locale": "en_US", "name": "iris'' dataset", "number_of_models": 1, "number_of_predictions":
106
+ 0, "private": true, "resource": "dataset/4fecd9e4035d0741f000335b", "rows":
107
+ 150, "size": 4608, "source": "source/4fecda1315526875f8003320", "source_status":
108
+ false, "status": {"bytes": 4608, "code": 5, "elapsed": 290, "field_errors":
109
+ [], "message": "The dataset has been created", "row_format_errors": [], "serialized_rows":
110
+ 150}, "tags": [], "updated": "2012-06-28T22:25:42.544000"}]}'
111
+ http_version: '1.1'
112
+ recorded_at: Thu, 28 Jun 2012 22:26:20 GMT
113
+ - request:
114
+ method: delete
115
+ uri: https://bigml.io/andromeda/dataset/4fecd9e4035d0741f000335b?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
+ - Thu, 28 Jun 2012 22:24:09 GMT
133
+ server:
134
+ - nginx/1.0.12
135
+ connection:
136
+ - Close
137
+ body:
138
+ encoding: US-ASCII
139
+ string: ''
104
140
  http_version: '1.1'
105
- recorded_at: Wed, 20 Jun 2012 03:57:34 GMT
141
+ recorded_at: Thu, 28 Jun 2012 22:26:22 GMT
106
142
  - request:
107
143
  method: get
108
144
  uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
@@ -120,19 +156,95 @@ http_interactions:
120
156
  content-type:
121
157
  - application/json; charset=utf-8
122
158
  date:
123
- - Wed, 20 Jun 2012 03:56:04 GMT
159
+ - Thu, 28 Jun 2012 22:21:38 GMT
124
160
  server:
125
161
  - nginx/1.0.12
126
162
  content-length:
127
- - '101'
163
+ - '1589'
128
164
  connection:
129
165
  - Close
130
166
  body:
131
167
  encoding: US-ASCII
132
168
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
133
- "total_count": 0}, "objects": []}'
169
+ "total_count": 2}, "objects": [{"category": 0, "code": 200, "columns": 5,
170
+ "created": "2012-06-28T22:25:42.532000", "credits": 0.017578125, "dataset":
171
+ "dataset/4fecd9e4035d0741f000335b", "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": 0, "objective_fields": ["000004"], "private":
175
+ true, "range": [1, 150], "resource": "model/4fecd9e6035d0741f000335e", "rows":
176
+ 150, "size": 4608, "source": "source/4fecda1315526875f8003320", "source_status":
177
+ false, "status": {"code": 5, "elapsed": 133, "message": "The model has been
178
+ created", "progress": 1}, "tags": [], "updated": "2012-06-28T22:25:48.864000"},
179
+ {"category": 0, "code": 200, "columns": 5, "created": "2012-06-27T02:29:29.487000",
180
+ "credits": 0.017578125, "dataset": "dataset/4fea700715526875f5001bff", "dataset_status":
181
+ false, "description": "", "holdout": 0.0, "input_fields": ["000000", "000001",
182
+ "000002", "000003"], "locale": "en_US", "max_columns": 5, "max_rows": 150,
183
+ "name": "iris'' dataset model", "number_of_predictions": 1, "objective_fields":
184
+ ["000004"], "private": true, "range": [1, 150], "resource": "model/4fea700915526875f3001c2b",
185
+ "rows": 150, "size": 4608, "source": "source/4fea6fd9035d0741f4001bdb", "source_status":
186
+ false, "status": {"code": 5, "elapsed": 153, "message": "The model has been
187
+ created", "progress": 1}, "tags": [], "updated": "2012-06-27T02:28:47.911000"}]}'
188
+ http_version: '1.1'
189
+ recorded_at: Thu, 28 Jun 2012 22:26:25 GMT
190
+ - request:
191
+ method: delete
192
+ uri: https://bigml.io/andromeda/model/4fecd9e6035d0741f000335e?username=<USERNAME>&api_key=<API_KEY>
193
+ body:
194
+ encoding: US-ASCII
195
+ string: ''
196
+ headers:
197
+ connection:
198
+ - close
199
+ response:
200
+ status:
201
+ code: 204
202
+ message: NO CONTENT
203
+ headers:
204
+ content-length:
205
+ - '0'
206
+ content-type:
207
+ - text/html; charset=utf-8
208
+ date:
209
+ - Thu, 28 Jun 2012 22:24:13 GMT
210
+ server:
211
+ - nginx/1.0.12
212
+ connection:
213
+ - Close
214
+ body:
215
+ encoding: US-ASCII
216
+ string: ''
217
+ http_version: '1.1'
218
+ recorded_at: Thu, 28 Jun 2012 22:26:26 GMT
219
+ - request:
220
+ method: delete
221
+ uri: https://bigml.io/andromeda/model/4fea700915526875f3001c2b?username=<USERNAME>&api_key=<API_KEY>
222
+ body:
223
+ encoding: US-ASCII
224
+ string: ''
225
+ headers:
226
+ connection:
227
+ - close
228
+ response:
229
+ status:
230
+ code: 204
231
+ message: NO CONTENT
232
+ headers:
233
+ content-length:
234
+ - '0'
235
+ content-type:
236
+ - text/html; charset=utf-8
237
+ date:
238
+ - Thu, 28 Jun 2012 22:21:42 GMT
239
+ server:
240
+ - nginx/1.0.12
241
+ connection:
242
+ - Close
243
+ body:
244
+ encoding: US-ASCII
245
+ string: ''
134
246
  http_version: '1.1'
135
- recorded_at: Wed, 20 Jun 2012 03:57:35 GMT
247
+ recorded_at: Thu, 28 Jun 2012 22:26:28 GMT
136
248
  - request:
137
249
  method: get
138
250
  uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
@@ -150,7 +262,7 @@ http_interactions:
150
262
  content-type:
151
263
  - application/json; charset=utf-8
152
264
  date:
153
- - Wed, 20 Jun 2012 03:53:45 GMT
265
+ - Thu, 28 Jun 2012 22:24:16 GMT
154
266
  server:
155
267
  - nginx/1.0.12
156
268
  content-length:
@@ -162,5 +274,5 @@ http_interactions:
162
274
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
163
275
  "total_count": 0}, "objects": []}'
164
276
  http_version: '1.1'
165
- recorded_at: Wed, 20 Jun 2012 03:57:36 GMT
277
+ recorded_at: Thu, 28 Jun 2012 22:26:29 GMT
166
278
  recorded_with: VCR 2.2.2
@@ -0,0 +1,346 @@
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:27:15 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-28T22:28:47.980000", "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/4fecda9f035d0741f000336e", "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": 71, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:29:41.567000"}]}'
45
+ http_version: '1.1'
46
+ recorded_at: Thu, 28 Jun 2012 22:29:28 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://bigml.io/andromeda/source/4fecda9f035d0741f000336e?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
+ - Thu, 28 Jun 2012 22:24:45 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: Thu, 28 Jun 2012 22:29:32 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
+ - Thu, 28 Jun 2012 22:27:20 GMT
94
+ server:
95
+ - nginx/1.0.12
96
+ content-length:
97
+ - '704'
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-28T22:28:49.685000", "credits": 0.00439453125, "description":
105
+ "", "locale": "en_US", "name": "iris'' dataset", "number_of_models": 0, "number_of_predictions":
106
+ 0, "private": true, "resource": "dataset/4fecdaa1035d0741ef003297", "rows":
107
+ 150, "size": 4608, "source": "source/4fecda9f035d0741f000336e", "source_status":
108
+ false, "status": {"bytes": 4608, "code": 5, "elapsed": 149, "field_errors":
109
+ [], "message": "The dataset has been created", "row_format_errors": [], "serialized_rows":
110
+ 150}, "tags": [], "updated": "2012-06-28T22:29:41.574000"}]}'
111
+ http_version: '1.1'
112
+ recorded_at: Thu, 28 Jun 2012 22:29:33 GMT
113
+ - request:
114
+ method: delete
115
+ uri: https://bigml.io/andromeda/dataset/4fecdaa1035d0741ef003297?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
+ - Thu, 28 Jun 2012 22:24:48 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: Thu, 28 Jun 2012 22:29:35 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
+ - Thu, 28 Jun 2012 22:27:23 GMT
160
+ server:
161
+ - nginx/1.0.12
162
+ content-length:
163
+ - '101'
164
+ connection:
165
+ - Close
166
+ body:
167
+ encoding: US-ASCII
168
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
169
+ "total_count": 0}, "objects": []}'
170
+ http_version: '1.1'
171
+ recorded_at: Thu, 28 Jun 2012 22:29:36 GMT
172
+ - request:
173
+ method: post
174
+ uri: https://bigml.io/andromeda/source
175
+ body:
176
+ encoding: US-ASCII
177
+ string: ''
178
+ headers:
179
+ content-type:
180
+ - multipart/form-data; boundary=-----------RubyMultipartPost
181
+ content-length:
182
+ - '5147'
183
+ connection:
184
+ - close
185
+ response:
186
+ status:
187
+ code: 201
188
+ message: CREATED
189
+ headers:
190
+ content-type:
191
+ - application/json; charset=utf-8
192
+ date:
193
+ - Thu, 28 Jun 2012 22:24:53 GMT
194
+ location:
195
+ - http://bigml.io/andromeda/source/4fecdae315526875f5003307
196
+ server:
197
+ - nginx/1.0.12
198
+ content-length:
199
+ - '567'
200
+ connection:
201
+ - Close
202
+ body:
203
+ encoding: US-ASCII
204
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
205
+ "created": "2012-06-28T22:29:55.646176", "credits": 0.0, "description": "",
206
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
207
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
208
+ 0, "private": true, "resource": "source/4fecdae315526875f5003307", "size":
209
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
210
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
211
+ "2012-06-28T22:29:55.646203"}'
212
+ http_version: '1.1'
213
+ recorded_at: Thu, 28 Jun 2012 22:29:39 GMT
214
+ - request:
215
+ method: post
216
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
217
+ body:
218
+ encoding: UTF-8
219
+ string: ! '{"source":"source/4fecdae315526875f5003307"}'
220
+ headers:
221
+ content-type:
222
+ - application/json
223
+ connection:
224
+ - close
225
+ response:
226
+ status:
227
+ code: 201
228
+ message: CREATED
229
+ headers:
230
+ content-type:
231
+ - application/json; charset=utf-8
232
+ date:
233
+ - Thu, 28 Jun 2012 22:27:28 GMT
234
+ location:
235
+ - http://bigml.io/andromeda/dataset/4fecdae515526875f500330a
236
+ server:
237
+ - nginx/1.0.12
238
+ content-length:
239
+ - '921'
240
+ connection:
241
+ - Close
242
+ body:
243
+ encoding: US-ASCII
244
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:29:57.525870",
245
+ "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
246
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
247
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
248
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
249
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
250
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
251
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
252
+ true, "resource": "dataset/4fecdae515526875f500330a", "rows": 0, "size": 4608,
253
+ "source": "source/4fecdae315526875f5003307", "source_status": true, "status":
254
+ {"code": 1, "message": "The dataset is being processed and will be created
255
+ soon"}, "tags": [], "updated": "2012-06-28T22:29:57.525889"}'
256
+ http_version: '1.1'
257
+ recorded_at: Thu, 28 Jun 2012 22:29:41 GMT
258
+ - request:
259
+ method: post
260
+ uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
261
+ body:
262
+ encoding: UTF-8
263
+ string: ! '{"dataset":"dataset/4fecdae515526875f500330a"}'
264
+ headers:
265
+ content-type:
266
+ - application/json
267
+ connection:
268
+ - close
269
+ response:
270
+ status:
271
+ code: 201
272
+ message: CREATED
273
+ headers:
274
+ content-type:
275
+ - application/json; charset=utf-8
276
+ date:
277
+ - Thu, 28 Jun 2012 22:24:57 GMT
278
+ location:
279
+ - http://bigml.io/andromeda/model/4fecdab6035d0741ef00329a
280
+ server:
281
+ - nginx/1.0.12
282
+ content-length:
283
+ - '691'
284
+ connection:
285
+ - Close
286
+ body:
287
+ encoding: US-ASCII
288
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:29:10.710713",
289
+ "credits": 0.017578125, "dataset": "dataset/4fecdae515526875f500330a", "dataset_status":
290
+ true, "description": "", "holdout": 0.0, "input_fields": [], "locale": "en_US",
291
+ "max_columns": 5, "max_rows": 150, "name": "iris'' dataset model", "number_of_predictions":
292
+ 0, "objective_fields": [], "private": true, "range": [1, 150], "resource":
293
+ "model/4fecdab6035d0741ef00329a", "rows": 150, "size": 4608, "source": "source/4fecdae315526875f5003307",
294
+ "source_status": true, "status": {"code": 1, "message": "The model is being
295
+ processed and will be created soon"}, "tags": [], "updated": "2012-06-28T22:29:10.710742"}'
296
+ http_version: '1.1'
297
+ recorded_at: Thu, 28 Jun 2012 22:29:43 GMT
298
+ - request:
299
+ method: post
300
+ uri: https://bigml.io/andromeda/prediction?username=<USERNAME>&api_key=<API_KEY>
301
+ body:
302
+ encoding: UTF-8
303
+ string: ! '{"model":"model/4fecdab6035d0741ef00329a","input_data":{"000001":3}}'
304
+ headers:
305
+ content-type:
306
+ - application/json
307
+ connection:
308
+ - close
309
+ response:
310
+ status:
311
+ code: 201
312
+ message: CREATED
313
+ headers:
314
+ content-type:
315
+ - application/json; charset=utf-8
316
+ date:
317
+ - Thu, 28 Jun 2012 22:27:32 GMT
318
+ location:
319
+ - http://bigml.io/andromeda/prediction/4fecdab8035d0741f40032a8
320
+ server:
321
+ - nginx/1.0.12
322
+ content-length:
323
+ - '1222'
324
+ connection:
325
+ - Close
326
+ body:
327
+ encoding: US-ASCII
328
+ string: ! '{"category": 0, "code": 201, "created": "2012-06-28T22:29:12.746361",
329
+ "credits": 0.01, "dataset": "dataset/4fecdae515526875f500330a", "dataset_status":
330
+ true, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
331
+ "double", "name": "sepal width", "optype": "numeric", "preferred": true},
332
+ "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
333
+ "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
334
+ "string", "name": "species", "optype": "categorical", "preferred": true}},
335
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fecdab6035d0741ef00329a",
336
+ "model_status": true, "name": "Prediction for species", "objective_fields":
337
+ ["000004"], "prediction": {"000004": "Iris-virginica"}, "prediction_path":
338
+ {"bad_fields": [], "next_predicates": [{"field": "000002", "operator": ">",
339
+ "value": 2.45}, {"field": "000002", "operator": "<=", "value": 2.45}], "path":
340
+ [], "unknown_fields": []}, "private": true, "resource": "prediction/4fecdab8035d0741f40032a8",
341
+ "source": "source/4fecdae315526875f5003307", "source_status": true, "status":
342
+ {"code": 5, "message": "The prediction has been created"}, "tags": [], "updated":
343
+ "2012-06-28T22:29:12.746385"}'
344
+ http_version: '1.1'
345
+ recorded_at: Thu, 28 Jun 2012 22:29:45 GMT
346
+ recorded_with: VCR 2.2.2