modelfox 0.8.0

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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +15 -0
  4. data/LICENSE +21 -0
  5. data/README.md +36 -0
  6. data/docs/Tangram/BagOfWordsCosineSimilarityFeatureContribution.html +518 -0
  7. data/docs/Tangram/BagOfWordsFeatureContribution.html +518 -0
  8. data/docs/Tangram/Bigram.html +370 -0
  9. data/docs/Tangram/BinaryClassificationPredictOutput.html +502 -0
  10. data/docs/Tangram/FeatureContributions.html +444 -0
  11. data/docs/Tangram/IdentityFeatureContribution.html +444 -0
  12. data/docs/Tangram/LibTangram/TangramStringView.html +193 -0
  13. data/docs/Tangram/LibTangram.html +161 -0
  14. data/docs/Tangram/LoadModelOptions.html +296 -0
  15. data/docs/Tangram/Model.html +1290 -0
  16. data/docs/Tangram/MulticlassClassificationPredictOutput.html +576 -0
  17. data/docs/Tangram/NormalizedFeatureContribution.html +444 -0
  18. data/docs/Tangram/OneHotEncodedFeatureContribution.html +518 -0
  19. data/docs/Tangram/PredictOptions.html +428 -0
  20. data/docs/Tangram/RegressionPredictOutput.html +428 -0
  21. data/docs/Tangram/Unigram.html +296 -0
  22. data/docs/Tangram/WordEmbeddingFeatureContribution.html +444 -0
  23. data/docs/Tangram.html +128 -0
  24. data/docs/_index.html +317 -0
  25. data/docs/class_list.html +51 -0
  26. data/docs/css/common.css +1 -0
  27. data/docs/css/full_list.css +58 -0
  28. data/docs/css/style.css +497 -0
  29. data/docs/file.README.html +107 -0
  30. data/docs/file_list.html +56 -0
  31. data/docs/frames.html +17 -0
  32. data/docs/index.html +107 -0
  33. data/docs/js/app.js +314 -0
  34. data/docs/js/full_list.js +216 -0
  35. data/docs/js/jquery.js +4 -0
  36. data/docs/method_list.html +595 -0
  37. data/docs/top-level-namespace.html +110 -0
  38. data/lib/modelfox/libmodelfox/aarch64-linux-gnu/libmodelfox.so +0 -0
  39. data/lib/modelfox/libmodelfox/aarch64-linux-musl/libmodelfox.so +0 -0
  40. data/lib/modelfox/libmodelfox/aarch64-macos/libmodelfox.dylib +0 -0
  41. data/lib/modelfox/libmodelfox/x86_64-linux-gnu/libmodelfox.so +0 -0
  42. data/lib/modelfox/libmodelfox/x86_64-linux-musl/libmodelfox.so +0 -0
  43. data/lib/modelfox/libmodelfox/x86_64-macos/libmodelfox.dylib +0 -0
  44. data/lib/modelfox/libmodelfox/x86_64-windows-msvc/modelfox.dll +0 -0
  45. data/lib/modelfox/modelfox.rb +895 -0
  46. data/lib/modelfox.rb +1 -0
  47. data/modelfox.gemspec +15 -0
  48. data/scripts/build +11 -0
  49. data/scripts/dev +6 -0
  50. data/scripts/docs +2 -0
  51. data/scripts/fmt +0 -0
  52. data/scripts/release +1 -0
  53. metadata +109 -0
@@ -0,0 +1,502 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Tangram::BinaryClassificationPredictOutput
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Tangram::BinaryClassificationPredictOutput";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Tangram.html" title="Tangram (module)">Tangram</a></span></span>
41
+ &raquo;
42
+ <span class="title">BinaryClassificationPredictOutput</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Tangram::BinaryClassificationPredictOutput
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Tangram::BinaryClassificationPredictOutput</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/tangram/tangram.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p><code>predict</code> outputs <code>BinaryClassificationPredictOutput</code> when the model&#39;s task is binary classification.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#class_name-instance_method" title="#class_name (instance method)">#<strong>class_name</strong> &#x21d2; Object </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+ <span class="note title readonly">readonly</span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>This is the name of the predicted class.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#feature_contributions-instance_method" title="#feature_contributions (instance method)">#<strong>feature_contributions</strong> &#x21d2; Object </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+ <span class="note title readonly">readonly</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
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>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#probability-instance_method" title="#probability (instance method)">#<strong>probability</strong> &#x21d2; Object </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+ <span class="note title readonly">readonly</span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>This is the probability the model assigned to the predicted class.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ </ul>
208
+
209
+
210
+
211
+
212
+
213
+ <h2>
214
+ Instance Method Summary
215
+ <small><a href="#" class="summary_toggle">collapse</a></small>
216
+ </h2>
217
+
218
+ <ul class="summary">
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(class_name:, probability:, feature_contributions:) &#x21d2; BinaryClassificationPredictOutput </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+ <span class="note title constructor">constructor</span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>A new instance of BinaryClassificationPredictOutput.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ <li class="public ">
247
+ <span class="summary_signature">
248
+
249
+ <a href="#to_json-instance_method" title="#to_json (instance method)">#<strong>to_json</strong>(*args) &#x21d2; Object </a>
250
+
251
+
252
+
253
+ </span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <span class="summary_desc"><div class='inline'></div></span>
264
+
265
+ </li>
266
+
267
+
268
+ </ul>
269
+
270
+
271
+ <div id="constructor_details" class="method_details_list">
272
+ <h2>Constructor Details</h2>
273
+
274
+ <div class="method_details first">
275
+ <h3 class="signature first" id="initialize-instance_method">
276
+
277
+ #<strong>initialize</strong>(class_name:, probability:, feature_contributions:) &#x21d2; <tt><span class='object_link'><a href="" title="Tangram::BinaryClassificationPredictOutput (class)">BinaryClassificationPredictOutput</a></span></tt>
278
+
279
+
280
+
281
+
282
+
283
+ </h3><div class="docstring">
284
+ <div class="discussion">
285
+
286
+ <p>Returns a new instance of BinaryClassificationPredictOutput.</p>
287
+
288
+
289
+ </div>
290
+ </div>
291
+ <div class="tags">
292
+
293
+
294
+ </div><table class="source_code">
295
+ <tr>
296
+ <td>
297
+ <pre class="lines">
298
+
299
+
300
+ 57
301
+ 58
302
+ 59
303
+ 60
304
+ 61</pre>
305
+ </td>
306
+ <td>
307
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 57</span>
308
+
309
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>class_name:</span><span class='comma'>,</span> <span class='label'>probability:</span><span class='comma'>,</span> <span class='label'>feature_contributions:</span><span class='rparen'>)</span>
310
+ <span class='ivar'>@class_name</span> <span class='op'>=</span> <span class='id identifier rubyid_class_name'>class_name</span>
311
+ <span class='ivar'>@probability</span> <span class='op'>=</span> <span class='id identifier rubyid_probability'>probability</span>
312
+ <span class='ivar'>@feature_contributions</span> <span class='op'>=</span> <span class='id identifier rubyid_feature_contributions'>feature_contributions</span>
313
+ <span class='kw'>end</span></pre>
314
+ </td>
315
+ </tr>
316
+ </table>
317
+ </div>
318
+
319
+ </div>
320
+
321
+ <div id="instance_attr_details" class="attr_details">
322
+ <h2>Instance Attribute Details</h2>
323
+
324
+
325
+ <span id=""></span>
326
+ <div class="method_details first">
327
+ <h3 class="signature first" id="class_name-instance_method">
328
+
329
+ #<strong>class_name</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
330
+
331
+
332
+
333
+
334
+
335
+ </h3><div class="docstring">
336
+ <div class="discussion">
337
+
338
+ <p>This is the name of the predicted class.</p>
339
+
340
+
341
+ </div>
342
+ </div>
343
+ <div class="tags">
344
+
345
+
346
+ </div><table class="source_code">
347
+ <tr>
348
+ <td>
349
+ <pre class="lines">
350
+
351
+
352
+ 52
353
+ 53
354
+ 54</pre>
355
+ </td>
356
+ <td>
357
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 52</span>
358
+
359
+ <span class='kw'>def</span> <span class='id identifier rubyid_class_name'>class_name</span>
360
+ <span class='ivar'>@class_name</span>
361
+ <span class='kw'>end</span></pre>
362
+ </td>
363
+ </tr>
364
+ </table>
365
+ </div>
366
+
367
+
368
+ <span id=""></span>
369
+ <div class="method_details ">
370
+ <h3 class="signature " id="feature_contributions-instance_method">
371
+
372
+ #<strong>feature_contributions</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
373
+
374
+
375
+
376
+
377
+
378
+ </h3><div class="docstring">
379
+ <div class="discussion">
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>
382
+
383
+
384
+ </div>
385
+ </div>
386
+ <div class="tags">
387
+
388
+
389
+ </div><table class="source_code">
390
+ <tr>
391
+ <td>
392
+ <pre class="lines">
393
+
394
+
395
+ 56
396
+ 57
397
+ 58</pre>
398
+ </td>
399
+ <td>
400
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 56</span>
401
+
402
+ <span class='kw'>def</span> <span class='id identifier rubyid_feature_contributions'>feature_contributions</span>
403
+ <span class='ivar'>@feature_contributions</span>
404
+ <span class='kw'>end</span></pre>
405
+ </td>
406
+ </tr>
407
+ </table>
408
+ </div>
409
+
410
+
411
+ <span id=""></span>
412
+ <div class="method_details ">
413
+ <h3 class="signature " id="probability-instance_method">
414
+
415
+ #<strong>probability</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
416
+
417
+
418
+
419
+
420
+
421
+ </h3><div class="docstring">
422
+ <div class="discussion">
423
+
424
+ <p>This is the probability the model assigned to the predicted class.</p>
425
+
426
+
427
+ </div>
428
+ </div>
429
+ <div class="tags">
430
+
431
+
432
+ </div><table class="source_code">
433
+ <tr>
434
+ <td>
435
+ <pre class="lines">
436
+
437
+
438
+ 54
439
+ 55
440
+ 56</pre>
441
+ </td>
442
+ <td>
443
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 54</span>
444
+
445
+ <span class='kw'>def</span> <span class='id identifier rubyid_probability'>probability</span>
446
+ <span class='ivar'>@probability</span>
447
+ <span class='kw'>end</span></pre>
448
+ </td>
449
+ </tr>
450
+ </table>
451
+ </div>
452
+
453
+ </div>
454
+
455
+
456
+ <div id="instance_method_details" class="method_details_list">
457
+ <h2>Instance Method Details</h2>
458
+
459
+
460
+ <div class="method_details first">
461
+ <h3 class="signature first" id="to_json-instance_method">
462
+
463
+ #<strong>to_json</strong>(*args) &#x21d2; <tt>Object</tt>
464
+
465
+
466
+
467
+
468
+
469
+ </h3><table class="source_code">
470
+ <tr>
471
+ <td>
472
+ <pre class="lines">
473
+
474
+
475
+ 62
476
+ 63
477
+ 64</pre>
478
+ </td>
479
+ <td>
480
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 62</span>
481
+
482
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
483
+ <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>class_name</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@class_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>probability</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@probability</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
484
+ <span class='kw'>end</span></pre>
485
+ </td>
486
+ </tr>
487
+ </table>
488
+ </div>
489
+
490
+ </div>
491
+
492
+ </div>
493
+
494
+ <div id="footer">
495
+ Generated on Tue Aug 17 17:09:51 2021 by
496
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
497
+ 0.9.26 (ruby-2.7.4).
498
+ </div>
499
+
500
+ </div>
501
+ </body>
502
+ </html>