tangram 0.4.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +6 -30
  4. data/docs/Tangram.html +5 -4
  5. data/docs/Tangram/BagOfWordsCosineSimilarityFeatureContribution.html +518 -0
  6. data/docs/Tangram/BagOfWordsFeatureContribution.html +24 -13
  7. data/docs/Tangram/Bigram.html +16 -9
  8. data/docs/Tangram/BinaryClassificationPredictOutput.html +20 -11
  9. data/docs/Tangram/FeatureContributions.html +20 -11
  10. data/docs/Tangram/IdentityFeatureContribution.html +20 -11
  11. data/docs/Tangram/LibTangram.html +3 -2
  12. data/docs/Tangram/LibTangram/TangramStringView.html +6 -6
  13. data/docs/Tangram/LoadModelOptions.html +12 -7
  14. data/docs/Tangram/Model.html +173 -133
  15. data/docs/Tangram/MulticlassClassificationPredictOutput.html +24 -13
  16. data/docs/Tangram/NormalizedFeatureContribution.html +20 -11
  17. data/docs/Tangram/OneHotEncodedFeatureContribution.html +24 -13
  18. data/docs/Tangram/PredictOptions.html +16 -9
  19. data/docs/Tangram/RegressionPredictOutput.html +16 -9
  20. data/docs/Tangram/Unigram.html +12 -7
  21. data/docs/Tangram/WordEmbeddingFeatureContribution.html +38 -29
  22. data/docs/_index.html +9 -2
  23. data/docs/class_list.html +1 -1
  24. data/docs/file.README.html +16 -37
  25. data/docs/index.html +16 -37
  26. data/docs/method_list.html +69 -29
  27. data/docs/top-level-namespace.html +2 -2
  28. data/examples/advanced/Gemfile +2 -0
  29. data/examples/advanced/Gemfile.lock +15 -0
  30. data/examples/advanced/README.md +14 -0
  31. data/examples/{heart_disease.tangram → advanced/heart_disease.tangram} +0 -0
  32. data/examples/{advanced.rb → advanced/main.rb} +1 -1
  33. data/examples/basic/Gemfile +2 -0
  34. data/examples/basic/Gemfile.lock +15 -0
  35. data/examples/basic/README.md +10 -0
  36. data/examples/basic/heart_disease.tangram +0 -0
  37. data/examples/{basic.rb → basic/main.rb} +0 -0
  38. data/lib/tangram/libtangram/aarch64-apple-darwin/libtangram.dylib +0 -0
  39. data/lib/tangram/libtangram/aarch64-unknown-linux-gnu/libtangram.so +0 -0
  40. data/lib/tangram/libtangram/aarch64-unknown-linux-musl/libtangram.so +0 -0
  41. data/lib/tangram/libtangram/x86_64-apple-darwin/libtangram.dylib +0 -0
  42. data/lib/tangram/libtangram/x86_64-pc-windows-msvc/tangram.dll +0 -0
  43. data/lib/tangram/libtangram/x86_64-unknown-linux-gnu/libtangram.so +0 -0
  44. data/lib/tangram/libtangram/x86_64-unknown-linux-musl/libtangram.so +0 -0
  45. data/lib/tangram/tangram.rb +9 -9
  46. data/scripts/release +8 -0
  47. data/tangram.gemspec +4 -4
  48. metadata +16 -8
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>This describes the contribution of a feature from a bag of words feature group.</p>
104
+
105
+ <p>This describes the contribution of a feature from a bag of words feature group.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -138,7 +139,8 @@
138
139
 
139
140
 
140
141
 
141
- <span class="summary_desc"><div class='inline'><p>This is the name of the source column for the feature group.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the name of the source column for the feature group.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -166,7 +168,8 @@
166
168
 
167
169
 
168
170
 
169
- <span class="summary_desc"><div class='inline'><p>This is the amount that the feature contributed to the output.</p>
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>This is the amount that the feature contributed to the output.</p>
170
173
  </div></span>
171
174
 
172
175
  </li>
@@ -194,7 +197,8 @@
194
197
 
195
198
 
196
199
 
197
- <span class="summary_desc"><div class='inline'><p>This is the value of the feature.</p>
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>This is the value of the feature.</p>
198
202
  </div></span>
199
203
 
200
204
  </li>
@@ -222,7 +226,8 @@
222
226
 
223
227
 
224
228
 
225
- <span class="summary_desc"><div class='inline'><p>This is the ngram for the feature.</p>
229
+ <span class="summary_desc"><div class='inline'>
230
+ <p>This is the ngram for the feature.</p>
226
231
  </div></span>
227
232
 
228
233
  </li>
@@ -260,7 +265,8 @@
260
265
 
261
266
 
262
267
 
263
- <span class="summary_desc"><div class='inline'><p>A new instance of BagOfWordsFeatureContribution.</p>
268
+ <span class="summary_desc"><div class='inline'>
269
+ <p>A new instance of BagOfWordsFeatureContribution.</p>
264
270
  </div></span>
265
271
 
266
272
  </li>
@@ -283,7 +289,8 @@
283
289
 
284
290
  </h3><div class="docstring">
285
291
  <div class="discussion">
286
- <p>Returns a new instance of BagOfWordsFeatureContribution.</p>
292
+
293
+ <p>Returns a new instance of BagOfWordsFeatureContribution.</p>
287
294
 
288
295
 
289
296
  </div>
@@ -336,7 +343,8 @@
336
343
 
337
344
  </h3><div class="docstring">
338
345
  <div class="discussion">
339
- <p>This is the name of the source column for the feature group.</p>
346
+
347
+ <p>This is the name of the source column for the feature group.</p>
340
348
 
341
349
 
342
350
  </div>
@@ -378,7 +386,8 @@
378
386
 
379
387
  </h3><div class="docstring">
380
388
  <div class="discussion">
381
- <p>This is the amount that the feature contributed to the output.</p>
389
+
390
+ <p>This is the amount that the feature contributed to the output.</p>
382
391
 
383
392
 
384
393
  </div>
@@ -420,7 +429,8 @@
420
429
 
421
430
  </h3><div class="docstring">
422
431
  <div class="discussion">
423
- <p>This is the value of the feature.</p>
432
+
433
+ <p>This is the value of the feature.</p>
424
434
 
425
435
 
426
436
  </div>
@@ -462,7 +472,8 @@
462
472
 
463
473
  </h3><div class="docstring">
464
474
  <div class="discussion">
465
- <p>This is the ngram for the feature.</p>
475
+
476
+ <p>This is the ngram for the feature.</p>
466
477
 
467
478
 
468
479
  </div>
@@ -497,9 +508,9 @@
497
508
  </div>
498
509
 
499
510
  <div id="footer">
500
- Generated on Wed May 12 10:45:10 2021 by
511
+ Generated on Mon Jul 26 14:54:00 2021 by
501
512
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
502
- 0.9.26 (ruby-2.6.7).
513
+ 0.9.26 (ruby-2.7.4).
503
514
  </div>
504
515
 
505
516
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>This describes a bigram ngram.</p>
104
+
105
+ <p>This describes a bigram ngram.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -138,7 +139,8 @@
138
139
 
139
140
 
140
141
 
141
- <span class="summary_desc"><div class='inline'><p>This is the first token in the bigram.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the first token in the bigram.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -166,7 +168,8 @@
166
168
 
167
169
 
168
170
 
169
- <span class="summary_desc"><div class='inline'><p>This is the second token in the bigram.</p>
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>This is the second token in the bigram.</p>
170
173
  </div></span>
171
174
 
172
175
  </li>
@@ -204,7 +207,8 @@
204
207
 
205
208
 
206
209
 
207
- <span class="summary_desc"><div class='inline'><p>A new instance of Bigram.</p>
210
+ <span class="summary_desc"><div class='inline'>
211
+ <p>A new instance of Bigram.</p>
208
212
  </div></span>
209
213
 
210
214
  </li>
@@ -227,7 +231,8 @@
227
231
 
228
232
  </h3><div class="docstring">
229
233
  <div class="discussion">
230
- <p>Returns a new instance of Bigram.</p>
234
+
235
+ <p>Returns a new instance of Bigram.</p>
231
236
 
232
237
 
233
238
  </div>
@@ -276,7 +281,8 @@
276
281
 
277
282
  </h3><div class="docstring">
278
283
  <div class="discussion">
279
- <p>This is the first token in the bigram.</p>
284
+
285
+ <p>This is the first token in the bigram.</p>
280
286
 
281
287
 
282
288
  </div>
@@ -318,7 +324,8 @@
318
324
 
319
325
  </h3><div class="docstring">
320
326
  <div class="discussion">
321
- <p>This is the second token in the bigram.</p>
327
+
328
+ <p>This is the second token in the bigram.</p>
322
329
 
323
330
 
324
331
  </div>
@@ -353,9 +360,9 @@
353
360
  </div>
354
361
 
355
362
  <div id="footer">
356
- Generated on Wed May 12 10:45:10 2021 by
363
+ Generated on Mon Jul 26 14:54:00 2021 by
357
364
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
358
- 0.9.26 (ruby-2.6.7).
365
+ 0.9.26 (ruby-2.7.4).
359
366
  </div>
360
367
 
361
368
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p><code>predict</code> outputs <code>BinaryClassificationPredictOutput</code> when the model&#39;s task is binary classification.</p>
104
+
105
+ <p><code>predict</code> outputs <code>BinaryClassificationPredictOutput</code> when the model&#39;s task is binary classification.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -138,7 +139,8 @@
138
139
 
139
140
 
140
141
 
141
- <span class="summary_desc"><div class='inline'><p>This is the name of the predicted class.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the name of the predicted class.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -166,7 +168,8 @@
166
168
 
167
169
 
168
170
 
169
- <span class="summary_desc"><div class='inline'><p>If computing feature contributions was enabled in the predict options, this value will explain the model&#39;s output, showing how much each feature contributed to the output.</p>
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>If computing feature contributions was enabled in the predict options, this value will explain the model&#39;s output, showing how much each feature contributed to the output.</p>
170
173
  </div></span>
171
174
 
172
175
  </li>
@@ -194,7 +197,8 @@
194
197
 
195
198
 
196
199
 
197
- <span class="summary_desc"><div class='inline'><p>This is the probability the model assigned to the predicted class.</p>
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>This is the probability the model assigned to the predicted class.</p>
198
202
  </div></span>
199
203
 
200
204
  </li>
@@ -232,7 +236,8 @@
232
236
 
233
237
 
234
238
 
235
- <span class="summary_desc"><div class='inline'><p>A new instance of BinaryClassificationPredictOutput.</p>
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>A new instance of BinaryClassificationPredictOutput.</p>
236
241
  </div></span>
237
242
 
238
243
  </li>
@@ -277,7 +282,8 @@
277
282
 
278
283
  </h3><div class="docstring">
279
284
  <div class="discussion">
280
- <p>Returns a new instance of BinaryClassificationPredictOutput.</p>
285
+
286
+ <p>Returns a new instance of BinaryClassificationPredictOutput.</p>
281
287
 
282
288
 
283
289
  </div>
@@ -328,7 +334,8 @@
328
334
 
329
335
  </h3><div class="docstring">
330
336
  <div class="discussion">
331
- <p>This is the name of the predicted class.</p>
337
+
338
+ <p>This is the name of the predicted class.</p>
332
339
 
333
340
 
334
341
  </div>
@@ -370,7 +377,8 @@
370
377
 
371
378
  </h3><div class="docstring">
372
379
  <div class="discussion">
373
- <p>If computing feature contributions was enabled in the predict options, this value will explain the model&#39;s output, showing how much each feature contributed to the output.</p>
380
+
381
+ <p>If computing feature contributions was enabled in the predict options, this value will explain the model&#39;s output, showing how much each feature contributed to the output.</p>
374
382
 
375
383
 
376
384
  </div>
@@ -412,7 +420,8 @@
412
420
 
413
421
  </h3><div class="docstring">
414
422
  <div class="discussion">
415
- <p>This is the probability the model assigned to the predicted class.</p>
423
+
424
+ <p>This is the probability the model assigned to the predicted class.</p>
416
425
 
417
426
 
418
427
  </div>
@@ -483,9 +492,9 @@
483
492
  </div>
484
493
 
485
494
  <div id="footer">
486
- Generated on Wed May 12 10:45:10 2021 by
495
+ Generated on Mon Jul 26 14:54:00 2021 by
487
496
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
488
- 0.9.26 (ruby-2.6.7).
497
+ 0.9.26 (ruby-2.7.4).
489
498
  </div>
490
499
 
491
500
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>This is a description of the feature contributions for the prediction if the task is regression or binary classification, or for a single class if the task is multiclass classification.</p>
104
+
105
+ <p>This is a description of the feature contributions for the prediction if the task is regression or binary classification, or for a single class if the task is multiclass classification.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -138,7 +139,8 @@
138
139
 
139
140
 
140
141
 
141
- <span class="summary_desc"><div class='inline'><p>This is the value the model would output if all features had baseline values.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the value the model would output if all features had baseline values.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -166,7 +168,8 @@
166
168
 
167
169
 
168
170
 
169
- <span class="summary_desc"><div class='inline'><p>This list will contain one entry for each of the model&#39;s features.</p>
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>This list will contain one entry for each of the model&#39;s features.</p>
170
173
  </div></span>
171
174
 
172
175
  </li>
@@ -194,7 +197,8 @@
194
197
 
195
198
 
196
199
 
197
- <span class="summary_desc"><div class='inline'><p>This is the value the model output.</p>
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>This is the value the model output.</p>
198
202
  </div></span>
199
203
 
200
204
  </li>
@@ -232,7 +236,8 @@
232
236
 
233
237
 
234
238
 
235
- <span class="summary_desc"><div class='inline'><p>A new instance of FeatureContributions.</p>
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>A new instance of FeatureContributions.</p>
236
241
  </div></span>
237
242
 
238
243
  </li>
@@ -255,7 +260,8 @@
255
260
 
256
261
  </h3><div class="docstring">
257
262
  <div class="discussion">
258
- <p>Returns a new instance of FeatureContributions.</p>
263
+
264
+ <p>Returns a new instance of FeatureContributions.</p>
259
265
 
260
266
 
261
267
  </div>
@@ -306,7 +312,8 @@
306
312
 
307
313
  </h3><div class="docstring">
308
314
  <div class="discussion">
309
- <p>This is the value the model would output if all features had baseline values.</p>
315
+
316
+ <p>This is the value the model would output if all features had baseline values.</p>
310
317
 
311
318
 
312
319
  </div>
@@ -348,7 +355,8 @@
348
355
 
349
356
  </h3><div class="docstring">
350
357
  <div class="discussion">
351
- <p>This list will contain one entry for each of the model&#39;s features. Note that features are computed from columns, so there will likely be more features than columns.</p>
358
+
359
+ <p>This list will contain one entry for each of the model&#39;s features. Note that features are computed from columns, so there will likely be more features than columns.</p>
352
360
 
353
361
 
354
362
  </div>
@@ -390,7 +398,8 @@
390
398
 
391
399
  </h3><div class="docstring">
392
400
  <div class="discussion">
393
- <p>This is the value the model output. Any difference from the <code>baseline_value</code> is because of the deviation of the features from their baseline values.</p>
401
+
402
+ <p>This is the value the model output. Any difference from the <code>baseline_value</code> is because of the deviation of the features from their baseline values.</p>
394
403
 
395
404
 
396
405
  </div>
@@ -425,9 +434,9 @@
425
434
  </div>
426
435
 
427
436
  <div id="footer">
428
- Generated on Wed May 12 10:45:10 2021 by
437
+ Generated on Mon Jul 26 14:54:00 2021 by
429
438
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
430
- 0.9.26 (ruby-2.6.7).
439
+ 0.9.26 (ruby-2.7.4).
431
440
  </div>
432
441
 
433
442
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>This describes the contribution of a feature from an identity feature group.</p>
104
+
105
+ <p>This describes the contribution of a feature from an identity feature group.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -138,7 +139,8 @@
138
139
 
139
140
 
140
141
 
141
- <span class="summary_desc"><div class='inline'><p>This is the name of the source column for the feature group.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the name of the source column for the feature group.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -166,7 +168,8 @@
166
168
 
167
169
 
168
170
 
169
- <span class="summary_desc"><div class='inline'><p>This is the amount that the feature contributed to the output.</p>
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>This is the amount that the feature contributed to the output.</p>
170
173
  </div></span>
171
174
 
172
175
  </li>
@@ -194,7 +197,8 @@
194
197
 
195
198
 
196
199
 
197
- <span class="summary_desc"><div class='inline'><p>This is the value of the feature.</p>
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>This is the value of the feature.</p>
198
202
  </div></span>
199
203
 
200
204
  </li>
@@ -232,7 +236,8 @@
232
236
 
233
237
 
234
238
 
235
- <span class="summary_desc"><div class='inline'><p>A new instance of IdentityFeatureContribution.</p>
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>A new instance of IdentityFeatureContribution.</p>
236
241
  </div></span>
237
242
 
238
243
  </li>
@@ -255,7 +260,8 @@
255
260
 
256
261
  </h3><div class="docstring">
257
262
  <div class="discussion">
258
- <p>Returns a new instance of IdentityFeatureContribution.</p>
263
+
264
+ <p>Returns a new instance of IdentityFeatureContribution.</p>
259
265
 
260
266
 
261
267
  </div>
@@ -306,7 +312,8 @@
306
312
 
307
313
  </h3><div class="docstring">
308
314
  <div class="discussion">
309
- <p>This is the name of the source column for the feature group.</p>
315
+
316
+ <p>This is the name of the source column for the feature group.</p>
310
317
 
311
318
 
312
319
  </div>
@@ -348,7 +355,8 @@
348
355
 
349
356
  </h3><div class="docstring">
350
357
  <div class="discussion">
351
- <p>This is the amount that the feature contributed to the output.</p>
358
+
359
+ <p>This is the amount that the feature contributed to the output.</p>
352
360
 
353
361
 
354
362
  </div>
@@ -390,7 +398,8 @@
390
398
 
391
399
  </h3><div class="docstring">
392
400
  <div class="discussion">
393
- <p>This is the value of the feature.</p>
401
+
402
+ <p>This is the value of the feature.</p>
394
403
 
395
404
 
396
405
  </div>
@@ -425,9 +434,9 @@
425
434
  </div>
426
435
 
427
436
  <div id="footer">
428
- Generated on Wed May 12 10:45:10 2021 by
437
+ Generated on Mon Jul 26 14:54:00 2021 by
429
438
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
430
- 0.9.26 (ruby-2.6.7).
439
+ 0.9.26 (ruby-2.7.4).
431
440
  </div>
432
441
 
433
442
  </div>