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
@@ -124,6 +124,7 @@
124
124
  <span class='symbol'>:normalized</span><span class='comma'>,</span>
125
125
  <span class='symbol'>:one_hot_encoded</span><span class='comma'>,</span>
126
126
  <span class='symbol'>:bag_of_words</span><span class='comma'>,</span>
127
+ <span class='symbol'>:bag_of_words_cosine_similarity</span><span class='comma'>,</span>
127
128
  <span class='symbol'>:word_embedding</span>
128
129
  <span class='rparen'>)</span></pre></dd>
129
130
 
@@ -150,9 +151,9 @@
150
151
  </div>
151
152
 
152
153
  <div id="footer">
153
- Generated on Wed May 12 10:45:10 2021 by
154
+ Generated on Mon Jul 26 14:54:00 2021 by
154
155
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.26 (ruby-2.6.7).
156
+ 0.9.26 (ruby-2.7.4).
156
157
  </div>
157
158
 
158
159
  </div>
@@ -163,12 +163,12 @@
163
163
  <pre class="lines">
164
164
 
165
165
 
166
- 746
167
- 747
168
- 748</pre>
166
+ 790
167
+ 791
168
+ 792</pre>
169
169
  </td>
170
170
  <td>
171
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 746</span>
171
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 790</span>
172
172
 
173
173
  <span class='kw'>def</span> <span class='id identifier rubyid_into_string'>into_string</span>
174
174
  <span class='kw'>self</span><span class='lbracket'>[</span><span class='symbol'>:ptr</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_read_string'>read_string</span><span class='lparen'>(</span><span class='kw'>self</span><span class='lbracket'>[</span><span class='symbol'>:len</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_force_encoding'>force_encoding</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>utf-8</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
@@ -183,9 +183,9 @@
183
183
  </div>
184
184
 
185
185
  <div id="footer">
186
- Generated on Wed May 12 10:45:10 2021 by
186
+ Generated on Mon Jul 26 14:54:00 2021 by
187
187
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
188
- 0.9.26 (ruby-2.6.7).
188
+ 0.9.26 (ruby-2.7.4).
189
189
  </div>
190
190
 
191
191
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>These are the options passed when loading a model.</p>
104
+
105
+ <p>These are the options passed when loading a model.</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>If you are running the app locally or on your own server, use this field to provide the url to it.</p>
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>If you are running the app locally or on your own server, use this field to provide the url to it.</p>
142
144
  </div></span>
143
145
 
144
146
  </li>
@@ -176,7 +178,8 @@
176
178
 
177
179
 
178
180
 
179
- <span class="summary_desc"><div class='inline'><p>A new instance of LoadModelOptions.</p>
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>A new instance of LoadModelOptions.</p>
180
183
  </div></span>
181
184
 
182
185
  </li>
@@ -199,7 +202,8 @@
199
202
 
200
203
  </h3><div class="docstring">
201
204
  <div class="discussion">
202
- <p>Returns a new instance of LoadModelOptions.</p>
205
+
206
+ <p>Returns a new instance of LoadModelOptions.</p>
203
207
 
204
208
 
205
209
  </div>
@@ -246,7 +250,8 @@
246
250
 
247
251
  </h3><div class="docstring">
248
252
  <div class="discussion">
249
- <p>If you are running the app locally or on your own server, use this field to provide the url to it. If not specified, the default value is <a href="https://app.tangram.xyz">https://app.tangram.xyz</a>.</p>
253
+
254
+ <p>If you are running the app locally or on your own server, use this field to provide the url to it. If not specified, the default value is <a href="https://app.tangram.dev">app.tangram.dev</a>.</p>
250
255
 
251
256
 
252
257
  </div>
@@ -281,9 +286,9 @@
281
286
  </div>
282
287
 
283
288
  <div id="footer">
284
- Generated on Wed May 12 10:45:10 2021 by
289
+ Generated on Mon Jul 26 14:54:00 2021 by
285
290
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
286
- 0.9.26 (ruby-2.6.7).
291
+ 0.9.26 (ruby-2.7.4).
287
292
  </div>
288
293
 
289
294
  </div>
@@ -101,7 +101,8 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
- <p>Use this class to load a model, make predictions, and log events to the app.</p>
104
+
105
+ <p>Use this class to load a model, make predictions, and log events to the app.</p>
105
106
 
106
107
 
107
108
  </div>
@@ -141,7 +142,8 @@
141
142
 
142
143
 
143
144
 
144
- <span class="summary_desc"><div class='inline'><p>Load a model from bytes instead of a file.</p>
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Load a model from bytes instead of a file.</p>
145
147
  </div></span>
146
148
 
147
149
  </li>
@@ -164,7 +166,8 @@
164
166
 
165
167
 
166
168
 
167
- <span class="summary_desc"><div class='inline'><p>Load a model from the <code>.tangram</code> file at <code>path</code>.</p>
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>Load a model from the <code>.tangram</code> file at <code>path</code>.</p>
168
171
  </div></span>
169
172
 
170
173
  </li>
@@ -196,7 +199,8 @@
196
199
 
197
200
 
198
201
 
199
- <span class="summary_desc"><div class='inline'><p>Add a prediction event to the queue.</p>
202
+ <span class="summary_desc"><div class='inline'>
203
+ <p>Add a prediction event to the queue.</p>
200
204
  </div></span>
201
205
 
202
206
  </li>
@@ -219,7 +223,8 @@
219
223
 
220
224
 
221
225
 
222
- <span class="summary_desc"><div class='inline'><p>Add a true value event to the queue.</p>
226
+ <span class="summary_desc"><div class='inline'>
227
+ <p>Add a true value event to the queue.</p>
223
228
  </div></span>
224
229
 
225
230
  </li>
@@ -242,7 +247,8 @@
242
247
 
243
248
 
244
249
 
245
- <span class="summary_desc"><div class='inline'><p>Send all events in the queue to the app.</p>
250
+ <span class="summary_desc"><div class='inline'>
251
+ <p>Send all events in the queue to the app.</p>
246
252
  </div></span>
247
253
 
248
254
  </li>
@@ -265,7 +271,8 @@
265
271
 
266
272
 
267
273
 
268
- <span class="summary_desc"><div class='inline'><p>Retrieve the model&#39;s id.</p>
274
+ <span class="summary_desc"><div class='inline'>
275
+ <p>Retrieve the model&#39;s id.</p>
269
276
  </div></span>
270
277
 
271
278
  </li>
@@ -290,7 +297,8 @@
290
297
 
291
298
 
292
299
 
293
- <span class="summary_desc"><div class='inline'><p>A new instance of Model.</p>
300
+ <span class="summary_desc"><div class='inline'>
301
+ <p>A new instance of Model.</p>
294
302
  </div></span>
295
303
 
296
304
  </li>
@@ -313,7 +321,8 @@
313
321
 
314
322
 
315
323
 
316
- <span class="summary_desc"><div class='inline'><p>Send a prediction event to the app.</p>
324
+ <span class="summary_desc"><div class='inline'>
325
+ <p>Send a prediction event to the app.</p>
317
326
  </div></span>
318
327
 
319
328
  </li>
@@ -336,7 +345,8 @@
336
345
 
337
346
 
338
347
 
339
- <span class="summary_desc"><div class='inline'><p>Send a true value event to the app.</p>
348
+ <span class="summary_desc"><div class='inline'>
349
+ <p>Send a true value event to the app.</p>
340
350
  </div></span>
341
351
 
342
352
  </li>
@@ -359,7 +369,8 @@
359
369
 
360
370
 
361
371
 
362
- <span class="summary_desc"><div class='inline'><p>Make a prediction!.</p>
372
+ <span class="summary_desc"><div class='inline'>
373
+ <p>Make a prediction!.</p>
363
374
  </div></span>
364
375
 
365
376
  </li>
@@ -382,7 +393,8 @@
382
393
 
383
394
  </h3><div class="docstring">
384
395
  <div class="discussion">
385
- <p>Returns a new instance of Model.</p>
396
+
397
+ <p>Returns a new instance of Model.</p>
386
398
 
387
399
 
388
400
  </div>
@@ -396,17 +408,17 @@
396
408
  <pre class="lines">
397
409
 
398
410
 
399
- 239
400
- 240
401
- 241
402
- 242
403
- 243</pre>
411
+ 257
412
+ 258
413
+ 259
414
+ 260
415
+ 261</pre>
404
416
  </td>
405
417
  <td>
406
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 239</span>
418
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 257</span>
407
419
 
408
420
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_c_model'>c_model</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
409
- <span class='ivar'>@tangram_url</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='op'>&amp;.</span><span class='id identifier rubyid_tangram_url'>tangram_url</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://app.tangram.xyz</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='id identifier rubyid_options'>options</span><span class='op'>&amp;.</span><span class='id identifier rubyid_tangram_url'>tangram_url</span>
421
+ <span class='ivar'>@tangram_url</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='op'>&amp;.</span><span class='id identifier rubyid_tangram_url'>tangram_url</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://app.tangram.dev</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='id identifier rubyid_options'>options</span><span class='op'>&amp;.</span><span class='id identifier rubyid_tangram_url'>tangram_url</span>
410
422
  <span class='ivar'>@log_queue</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
411
423
  <span class='ivar'>@model</span> <span class='op'>=</span> <span class='const'>FFI</span><span class='op'>::</span><span class='const'>AutoPointer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_c_model'>c_model</span><span class='period'>.</span><span class='id identifier rubyid_read_pointer'>read_pointer</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="LibTangram.html" title="Tangram::LibTangram (module)">LibTangram</a></span></span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:tangram_model_delete</span><span class='rparen'>)</span><span class='rparen'>)</span>
412
424
  <span class='kw'>end</span></pre>
@@ -433,7 +445,8 @@
433
445
 
434
446
  </h3><div class="docstring">
435
447
  <div class="discussion">
436
- <p>Load a model from bytes instead of a file. You should use this only if you already have a <code>.tangram</code> loaded into memory. Otherwise, use <code>Model.from_path</code>, which is faster because it memory maps the file.</p>
448
+
449
+ <p>Load a model from bytes instead of a file. You should use this only if you already have a <code>.tangram</code> loaded into memory. Otherwise, use <code>Model.from_path</code>, which is faster because it memory maps the file.</p>
437
450
 
438
451
 
439
452
  </div>
@@ -452,7 +465,8 @@
452
465
 
453
466
 
454
467
  &mdash;
455
- <div class='inline'><p>The bytes for the .tangram model.</p>
468
+ <div class='inline'>
469
+ <p>The bytes for the .tangram model.</p>
456
470
  </div>
457
471
 
458
472
  </li>
@@ -469,7 +483,8 @@
469
483
 
470
484
 
471
485
  &mdash;
472
- <div class='inline'><p>The options to use when loading the model.</p>
486
+ <div class='inline'>
487
+ <p>The options to use when loading the model.</p>
473
488
  </div>
474
489
 
475
490
  </li>
@@ -496,20 +511,20 @@
496
511
  <pre class="lines">
497
512
 
498
513
 
499
- 227
500
- 228
501
- 229
502
- 230
503
- 231
504
- 232
505
- 233
506
- 234
507
- 235
508
- 236
509
- 237</pre>
514
+ 245
515
+ 246
516
+ 247
517
+ 248
518
+ 249
519
+ 250
520
+ 251
521
+ 252
522
+ 253
523
+ 254
524
+ 255</pre>
510
525
  </td>
511
526
  <td>
512
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 227</span>
527
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 245</span>
513
528
 
514
529
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_bytes'>from_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_bytes'>bytes</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
515
530
  <span class='id identifier rubyid_c_model'>c_model</span> <span class='op'>=</span> <span class='const'>FFI</span><span class='op'>::</span><span class='const'>MemoryPointer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:pointer</span><span class='rparen'>)</span>
@@ -538,7 +553,8 @@
538
553
 
539
554
  </h3><div class="docstring">
540
555
  <div class="discussion">
541
- <p>Load a model from the <code>.tangram</code> file at <code>path</code>.</p>
556
+
557
+ <p>Load a model from the <code>.tangram</code> file at <code>path</code>.</p>
542
558
 
543
559
 
544
560
  </div>
@@ -557,7 +573,8 @@
557
573
 
558
574
 
559
575
  &mdash;
560
- <div class='inline'><p>The path to the <code>.tangram</code> file.</p>
576
+ <div class='inline'>
577
+ <p>The path to the <code>.tangram</code> file.</p>
561
578
  </div>
562
579
 
563
580
  </li>
@@ -574,7 +591,8 @@
574
591
 
575
592
 
576
593
  &mdash;
577
- <div class='inline'><p>The options to use when loading the model.</p>
594
+ <div class='inline'>
595
+ <p>The options to use when loading the model.</p>
578
596
  </div>
579
597
 
580
598
  </li>
@@ -601,20 +619,20 @@
601
619
  <pre class="lines">
602
620
 
603
621
 
604
- 211
605
- 212
606
- 213
607
- 214
608
- 215
609
- 216
610
- 217
611
- 218
612
- 219
613
- 220
614
- 221</pre>
622
+ 229
623
+ 230
624
+ 231
625
+ 232
626
+ 233
627
+ 234
628
+ 235
629
+ 236
630
+ 237
631
+ 238
632
+ 239</pre>
615
633
  </td>
616
634
  <td>
617
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 211</span>
635
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 229</span>
618
636
 
619
637
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_path'>from_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
620
638
  <span class='id identifier rubyid_c_model'>c_model</span> <span class='op'>=</span> <span class='const'>FFI</span><span class='op'>::</span><span class='const'>MemoryPointer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:pointer</span><span class='rparen'>)</span>
@@ -649,7 +667,8 @@
649
667
 
650
668
  </h3><div class="docstring">
651
669
  <div class="discussion">
652
- <p>Add a prediction event to the queue. Remember to call <code>flush_log_queue</code> at a later point to send the event to the app.</p>
670
+
671
+ <p>Add a prediction event to the queue. Remember to call <code>flush_log_queue</code> at a later point to send the event to the app.</p>
653
672
 
654
673
 
655
674
  </div>
@@ -668,7 +687,8 @@
668
687
 
669
688
 
670
689
  &mdash;
671
- <div class='inline'><p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
690
+ <div class='inline'>
691
+ <p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
672
692
  </div>
673
693
 
674
694
  </li>
@@ -683,7 +703,8 @@
683
703
 
684
704
 
685
705
  &mdash;
686
- <div class='inline'><p>A single <code>PredictInput</code>.</p>
706
+ <div class='inline'>
707
+ <p>A single <code>PredictInput</code>.</p>
687
708
  </div>
688
709
 
689
710
  </li>
@@ -698,7 +719,8 @@
698
719
 
699
720
 
700
721
  &mdash;
701
- <div class='inline'><p>A single <code>PredictOutput</code>.</p>
722
+ <div class='inline'>
723
+ <p>A single <code>PredictOutput</code>.</p>
702
724
  </div>
703
725
 
704
726
  </li>
@@ -715,7 +737,8 @@
715
737
 
716
738
 
717
739
  &mdash;
718
- <div class='inline'><p>This is the same <code>predictOptions</code> value that you passed to <code>predict</code>.</p>
740
+ <div class='inline'>
741
+ <p>This is the same <code>predictOptions</code> value that you passed to <code>predict</code>.</p>
719
742
  </div>
720
743
 
721
744
  </li>
@@ -729,18 +752,18 @@
729
752
  <pre class="lines">
730
753
 
731
754
 
732
- 289
733
- 290
734
- 291
735
- 292
736
- 293
737
- 294
738
- 295
739
- 296
740
- 297</pre>
755
+ 307
756
+ 308
757
+ 309
758
+ 310
759
+ 311
760
+ 312
761
+ 313
762
+ 314
763
+ 315</pre>
741
764
  </td>
742
765
  <td>
743
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 289</span>
766
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 307</span>
744
767
 
745
768
  <span class='kw'>def</span> <span class='id identifier rubyid_enqueue_log_prediction'>enqueue_log_prediction</span><span class='lparen'>(</span><span class='label'>identifier:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='comma'>,</span> <span class='label'>output:</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
746
769
  <span class='id identifier rubyid_event'>event</span> <span class='op'>=</span> <span class='id identifier rubyid_prediction_event'>prediction_event</span><span class='lparen'>(</span>
@@ -767,7 +790,8 @@
767
790
 
768
791
  </h3><div class="docstring">
769
792
  <div class="discussion">
770
- <p>Add a true value event to the queue. Remember to call <code>flush_log_queue</code> at a later point to send the event to the app.</p>
793
+
794
+ <p>Add a true value event to the queue. Remember to call <code>flush_log_queue</code> at a later point to send the event to the app.</p>
771
795
 
772
796
 
773
797
  </div>
@@ -786,7 +810,8 @@
786
810
 
787
811
 
788
812
  &mdash;
789
- <div class='inline'><p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
813
+ <div class='inline'>
814
+ <p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
790
815
  </div>
791
816
 
792
817
  </li>
@@ -801,7 +826,8 @@
801
826
 
802
827
 
803
828
  &mdash;
804
- <div class='inline'><p>This is the true value for the prediction.</p>
829
+ <div class='inline'>
830
+ <p>This is the true value for the prediction.</p>
805
831
  </div>
806
832
 
807
833
  </li>
@@ -815,16 +841,16 @@
815
841
  <pre class="lines">
816
842
 
817
843
 
818
- 313
819
- 314
820
- 315
821
- 316
822
- 317
823
- 318
824
- 319</pre>
844
+ 331
845
+ 332
846
+ 333
847
+ 334
848
+ 335
849
+ 336
850
+ 337</pre>
825
851
  </td>
826
852
  <td>
827
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 313</span>
853
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 331</span>
828
854
 
829
855
  <span class='kw'>def</span> <span class='id identifier rubyid_enqueue_log_true_value'>enqueue_log_true_value</span><span class='lparen'>(</span><span class='label'>identifier:</span><span class='comma'>,</span> <span class='label'>true_value:</span><span class='rparen'>)</span>
830
856
  <span class='id identifier rubyid_event'>event</span> <span class='op'>=</span> <span class='id identifier rubyid_true_value_event'>true_value_event</span><span class='lparen'>(</span>
@@ -849,7 +875,8 @@
849
875
 
850
876
  </h3><div class="docstring">
851
877
  <div class="discussion">
852
- <p>Send all events in the queue to the app.</p>
878
+
879
+ <p>Send all events in the queue to the app.</p>
853
880
 
854
881
 
855
882
  </div>
@@ -863,13 +890,13 @@
863
890
  <pre class="lines">
864
891
 
865
892
 
866
- 322
867
- 323
868
- 324
869
- 325</pre>
893
+ 340
894
+ 341
895
+ 342
896
+ 343</pre>
870
897
  </td>
871
898
  <td>
872
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 322</span>
899
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 340</span>
873
900
 
874
901
  <span class='kw'>def</span> <span class='id identifier rubyid_flush_log_queue'>flush_log_queue</span>
875
902
  <span class='id identifier rubyid_log_events'>log_events</span><span class='lparen'>(</span><span class='ivar'>@log_queue</span><span class='rparen'>)</span>
@@ -891,7 +918,8 @@
891
918
 
892
919
  </h3><div class="docstring">
893
920
  <div class="discussion">
894
- <p>Retrieve the model&#39;s id.</p>
921
+
922
+ <p>Retrieve the model&#39;s id.</p>
895
923
 
896
924
 
897
925
  </div>
@@ -905,14 +933,14 @@
905
933
  <pre class="lines">
906
934
 
907
935
 
908
- 246
909
- 247
910
- 248
911
- 249
912
- 250</pre>
936
+ 264
937
+ 265
938
+ 266
939
+ 267
940
+ 268</pre>
913
941
  </td>
914
942
  <td>
915
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 246</span>
943
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 264</span>
916
944
 
917
945
  <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
918
946
  <span class='id identifier rubyid_c_id'>c_id</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="LibTangram.html" title="Tangram::LibTangram (module)">LibTangram</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="LibTangram/TangramStringView.html" title="Tangram::LibTangram::TangramStringView (class)">TangramStringView</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
@@ -935,7 +963,8 @@
935
963
 
936
964
  </h3><div class="docstring">
937
965
  <div class="discussion">
938
- <p>Send a prediction event to the app. If you want to batch events, you can use <code>enqueue_log_prediction</code> instead.</p>
966
+
967
+ <p>Send a prediction event to the app. If you want to batch events, you can use <code>enqueue_log_prediction</code> instead.</p>
939
968
 
940
969
 
941
970
  </div>
@@ -954,7 +983,8 @@
954
983
 
955
984
 
956
985
  &mdash;
957
- <div class='inline'><p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
986
+ <div class='inline'>
987
+ <p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
958
988
  </div>
959
989
 
960
990
  </li>
@@ -969,7 +999,8 @@
969
999
 
970
1000
 
971
1001
  &mdash;
972
- <div class='inline'><p>A single <code>PredictInput</code>.</p>
1002
+ <div class='inline'>
1003
+ <p>A single <code>PredictInput</code>.</p>
973
1004
  </div>
974
1005
 
975
1006
  </li>
@@ -984,7 +1015,8 @@
984
1015
 
985
1016
 
986
1017
  &mdash;
987
- <div class='inline'><p>A single <code>PredictOutput</code>.</p>
1018
+ <div class='inline'>
1019
+ <p>A single <code>PredictOutput</code>.</p>
988
1020
  </div>
989
1021
 
990
1022
  </li>
@@ -1001,7 +1033,8 @@
1001
1033
 
1002
1034
 
1003
1035
  &mdash;
1004
- <div class='inline'><p>This is the same <code>predictOptions</code> value that you passed to <code>predict</code>.</p>
1036
+ <div class='inline'>
1037
+ <p>This is the same <code>predictOptions</code> value that you passed to <code>predict</code>.</p>
1005
1038
  </div>
1006
1039
 
1007
1040
  </li>
@@ -1015,18 +1048,18 @@
1015
1048
  <pre class="lines">
1016
1049
 
1017
1050
 
1018
- 274
1019
- 275
1020
- 276
1021
- 277
1022
- 278
1023
- 279
1024
- 280
1025
- 281
1026
- 282</pre>
1051
+ 292
1052
+ 293
1053
+ 294
1054
+ 295
1055
+ 296
1056
+ 297
1057
+ 298
1058
+ 299
1059
+ 300</pre>
1027
1060
  </td>
1028
1061
  <td>
1029
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 274</span>
1062
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 292</span>
1030
1063
 
1031
1064
  <span class='kw'>def</span> <span class='id identifier rubyid_log_prediction'>log_prediction</span><span class='lparen'>(</span><span class='label'>identifier:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='comma'>,</span> <span class='label'>output:</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1032
1065
  <span class='id identifier rubyid_event'>event</span> <span class='op'>=</span> <span class='id identifier rubyid_prediction_event'>prediction_event</span><span class='lparen'>(</span>
@@ -1053,7 +1086,8 @@
1053
1086
 
1054
1087
  </h3><div class="docstring">
1055
1088
  <div class="discussion">
1056
- <p>Send a true value event to the app. If you want to batch events, you can use <code>enqueue_log_true_value</code> instead.</p>
1089
+
1090
+ <p>Send a true value event to the app. If you want to batch events, you can use <code>enqueue_log_true_value</code> instead.</p>
1057
1091
 
1058
1092
 
1059
1093
  </div>
@@ -1072,7 +1106,8 @@
1072
1106
 
1073
1107
 
1074
1108
  &mdash;
1075
- <div class='inline'><p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
1109
+ <div class='inline'>
1110
+ <p>This is a unique identifier for the prediction, which will associate it with a true value event and allow you to look it up in the app.</p>
1076
1111
  </div>
1077
1112
 
1078
1113
  </li>
@@ -1087,7 +1122,8 @@
1087
1122
 
1088
1123
 
1089
1124
  &mdash;
1090
- <div class='inline'><p>This is the true value for the prediction.</p>
1125
+ <div class='inline'>
1126
+ <p>This is the true value for the prediction.</p>
1091
1127
  </div>
1092
1128
 
1093
1129
  </li>
@@ -1101,16 +1137,16 @@
1101
1137
  <pre class="lines">
1102
1138
 
1103
1139
 
1104
- 302
1105
- 303
1106
- 304
1107
- 305
1108
- 306
1109
- 307
1110
- 308</pre>
1140
+ 320
1141
+ 321
1142
+ 322
1143
+ 323
1144
+ 324
1145
+ 325
1146
+ 326</pre>
1111
1147
  </td>
1112
1148
  <td>
1113
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 302</span>
1149
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 320</span>
1114
1150
 
1115
1151
  <span class='kw'>def</span> <span class='id identifier rubyid_log_true_value'>log_true_value</span><span class='lparen'>(</span><span class='label'>identifier:</span><span class='comma'>,</span> <span class='label'>true_value:</span><span class='rparen'>)</span>
1116
1152
  <span class='id identifier rubyid_event'>event</span> <span class='op'>=</span> <span class='id identifier rubyid_true_value_event'>true_value_event</span><span class='lparen'>(</span>
@@ -1135,7 +1171,8 @@
1135
1171
 
1136
1172
  </h3><div class="docstring">
1137
1173
  <div class="discussion">
1138
- <p>Make a prediction!</p>
1174
+
1175
+ <p>Make a prediction!</p>
1139
1176
 
1140
1177
 
1141
1178
  </div>
@@ -1154,7 +1191,8 @@
1154
1191
 
1155
1192
 
1156
1193
  &mdash;
1157
- <div class='inline'><p>A predict input is either a single predict input which is a map from symbols or strings to strings or floats or an array of such maps. The keys should match the columns in the CSV file you trained your model with.</p>
1194
+ <div class='inline'>
1195
+ <p>A predict input is either a single predict input which is a map from symbols or strings to strings or floats or an array of such maps. The keys should match the columns in the CSV file you trained your model with.</p>
1158
1196
  </div>
1159
1197
 
1160
1198
  </li>
@@ -1171,7 +1209,8 @@
1171
1209
 
1172
1210
 
1173
1211
  &mdash;
1174
- <div class='inline'><p>These are the predict options.</p>
1212
+ <div class='inline'>
1213
+ <p>These are the predict options.</p>
1175
1214
  </div>
1176
1215
 
1177
1216
  </li>
@@ -1189,7 +1228,8 @@
1189
1228
 
1190
1229
 
1191
1230
  &mdash;
1192
- <div class='inline'><p>. Return a single output if <code>input</code> was a single input, or an array if <code>input</code> was an array of <code>input</code>s.</p>
1231
+ <div class='inline'>
1232
+ <p>. Return a single output if <code>input</code> was a single input, or an array if <code>input</code> was an array of <code>input</code>s.</p>
1193
1233
  </div>
1194
1234
 
1195
1235
  </li>
@@ -1202,21 +1242,21 @@
1202
1242
  <pre class="lines">
1203
1243
 
1204
1244
 
1205
- 256
1206
- 257
1207
- 258
1208
- 259
1209
- 260
1210
- 261
1211
- 262
1212
- 263
1213
- 264
1214
- 265
1215
- 266
1216
- 267</pre>
1245
+ 274
1246
+ 275
1247
+ 276
1248
+ 277
1249
+ 278
1250
+ 279
1251
+ 280
1252
+ 281
1253
+ 282
1254
+ 283
1255
+ 284
1256
+ 285</pre>
1217
1257
  </td>
1218
1258
  <td>
1219
- <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 256</span>
1259
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 274</span>
1220
1260
 
1221
1261
  <span class='kw'>def</span> <span class='id identifier rubyid_predict'>predict</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1222
1262
  <span class='id identifier rubyid_is_array'>is_array</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
@@ -1240,9 +1280,9 @@
1240
1280
  </div>
1241
1281
 
1242
1282
  <div id="footer">
1243
- Generated on Wed May 12 10:45:10 2021 by
1283
+ Generated on Mon Jul 26 14:54:00 2021 by
1244
1284
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1245
- 0.9.26 (ruby-2.6.7).
1285
+ 0.9.26 (ruby-2.7.4).
1246
1286
  </div>
1247
1287
 
1248
1288
  </div>