tangram 0.1.0.pre.alpha.7 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +15 -0
  4. data/LICENSE +21 -0
  5. data/README.md +36 -1
  6. data/docs/Tangram.html +127 -0
  7. data/docs/Tangram/BagOfWordsCosineSimilarityFeatureContribution.html +507 -0
  8. data/docs/Tangram/BagOfWordsFeatureContribution.html +507 -0
  9. data/docs/Tangram/Bigram.html +363 -0
  10. data/docs/Tangram/BinaryClassificationPredictOutput.html +493 -0
  11. data/docs/Tangram/FeatureContributions.html +435 -0
  12. data/docs/Tangram/IdentityFeatureContribution.html +435 -0
  13. data/docs/Tangram/LibTangram.html +161 -0
  14. data/docs/Tangram/LibTangram/TangramStringView.html +193 -0
  15. data/docs/Tangram/LoadModelOptions.html +291 -0
  16. data/docs/Tangram/Model.html +1250 -0
  17. data/docs/Tangram/MulticlassClassificationPredictOutput.html +565 -0
  18. data/docs/Tangram/NormalizedFeatureContribution.html +435 -0
  19. data/docs/Tangram/OneHotEncodedFeatureContribution.html +507 -0
  20. data/docs/Tangram/PredictOptions.html +421 -0
  21. data/docs/Tangram/RegressionPredictOutput.html +421 -0
  22. data/docs/Tangram/Unigram.html +291 -0
  23. data/docs/Tangram/WordEmbeddingFeatureContribution.html +435 -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 +106 -0
  30. data/docs/file_list.html +56 -0
  31. data/docs/frames.html +17 -0
  32. data/docs/index.html +106 -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/examples/advanced/Gemfile +2 -0
  39. data/examples/advanced/Gemfile.lock +15 -0
  40. data/examples/advanced/README.md +14 -0
  41. data/examples/advanced/heart_disease.tangram +0 -0
  42. data/examples/advanced/main.rb +49 -0
  43. data/examples/basic/Gemfile +2 -0
  44. data/examples/basic/Gemfile.lock +15 -0
  45. data/examples/basic/README.md +10 -0
  46. data/examples/basic/heart_disease.tangram +0 -0
  47. data/examples/basic/main.rb +29 -0
  48. data/lib/tangram.rb +1 -1
  49. data/lib/tangram/libtangram/aarch64-apple-darwin/libtangram.dylib +0 -0
  50. data/lib/tangram/libtangram/aarch64-unknown-linux-gnu/libtangram.so +0 -0
  51. data/lib/tangram/libtangram/aarch64-unknown-linux-musl/libtangram.so +0 -0
  52. data/lib/tangram/libtangram/x86_64-apple-darwin/libtangram.dylib +0 -0
  53. data/lib/tangram/libtangram/x86_64-pc-windows-msvc/tangram.dll +0 -0
  54. data/lib/tangram/libtangram/x86_64-unknown-linux-gnu/libtangram.so +0 -0
  55. data/lib/tangram/libtangram/x86_64-unknown-linux-musl/libtangram.so +0 -0
  56. data/lib/tangram/tangram.rb +895 -0
  57. data/scripts/dev +5 -0
  58. data/scripts/docs +2 -0
  59. data/scripts/fmt +0 -0
  60. data/scripts/release +5 -0
  61. data/tangram.gemspec +10 -11
  62. metadata +67 -17
  63. data/examples/heart-disease/main.rb +0 -25
  64. data/lib/tangram/libtangram-0.1.0-alpha.4-linux-x86_64.so +0 -0
  65. data/lib/tangram/libtangram-0.1.0-alpha.4-macos-x86_64.dylib +0 -0
  66. data/lib/tangram/libtangram.rb +0 -24
  67. data/lib/tangram/model.rb +0 -53
  68. data/lib/tangram/tangram-0.1.0-alpha.4-windows-x86_64.dll +0 -0
  69. data/scripts/build +0 -5
@@ -0,0 +1,421 @@
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::PredictOptions
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::PredictOptions";
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 (P)</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">PredictOptions</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::PredictOptions
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::PredictOptions</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
+ <p>These are the options passed to <code>predict</code>.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#compute_feature_contributions-instance_method" title="#compute_feature_contributions (instance method)">#<strong>compute_feature_contributions</strong> &#x21d2; Object </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+ <span class="note title readonly">readonly</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'><p>Computing feature contributions is disabled by default.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#threshold-instance_method" title="#threshold (instance method)">#<strong>threshold</strong> &#x21d2; Object </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+ <span class="note title readonly">readonly</span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>If your model is a binary classifier, use this field to make predictions using a threshold chosen on the tuning page of the app.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ </ul>
176
+
177
+
178
+
179
+
180
+
181
+ <h2>
182
+ Instance Method Summary
183
+ <small><a href="#" class="summary_toggle">collapse</a></small>
184
+ </h2>
185
+
186
+ <ul class="summary">
187
+
188
+ <li class="public ">
189
+ <span class="summary_signature">
190
+
191
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(compute_feature_contributions:, threshold: nil) &#x21d2; PredictOptions </a>
192
+
193
+
194
+
195
+ </span>
196
+
197
+
198
+ <span class="note title constructor">constructor</span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'><p>A new instance of PredictOptions.</p>
208
+ </div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#to_json-instance_method" title="#to_json (instance method)">#<strong>to_json</strong>(*args) &#x21d2; Object </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'></div></span>
231
+
232
+ </li>
233
+
234
+
235
+ </ul>
236
+
237
+
238
+ <div id="constructor_details" class="method_details_list">
239
+ <h2>Constructor Details</h2>
240
+
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="initialize-instance_method">
243
+
244
+ #<strong>initialize</strong>(compute_feature_contributions:, threshold: nil) &#x21d2; <tt><span class='object_link'><a href="" title="Tangram::PredictOptions (class)">PredictOptions</a></span></tt>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><div class="docstring">
251
+ <div class="discussion">
252
+ <p>Returns a new instance of PredictOptions.</p>
253
+
254
+
255
+ </div>
256
+ </div>
257
+ <div class="tags">
258
+
259
+
260
+ </div><table class="source_code">
261
+ <tr>
262
+ <td>
263
+ <pre class="lines">
264
+
265
+
266
+ 25
267
+ 26
268
+ 27
269
+ 28</pre>
270
+ </td>
271
+ <td>
272
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 25</span>
273
+
274
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>compute_feature_contributions:</span><span class='comma'>,</span> <span class='label'>threshold:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
275
+ <span class='ivar'>@threshold</span> <span class='op'>=</span> <span class='id identifier rubyid_threshold'>threshold</span>
276
+ <span class='ivar'>@compute_feature_contributions</span> <span class='op'>=</span> <span class='id identifier rubyid_compute_feature_contributions'>compute_feature_contributions</span>
277
+ <span class='kw'>end</span></pre>
278
+ </td>
279
+ </tr>
280
+ </table>
281
+ </div>
282
+
283
+ </div>
284
+
285
+ <div id="instance_attr_details" class="attr_details">
286
+ <h2>Instance Attribute Details</h2>
287
+
288
+
289
+ <span id=""></span>
290
+ <div class="method_details first">
291
+ <h3 class="signature first" id="compute_feature_contributions-instance_method">
292
+
293
+ #<strong>compute_feature_contributions</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
294
+
295
+
296
+
297
+
298
+
299
+ </h3><div class="docstring">
300
+ <div class="discussion">
301
+ <p>Computing feature contributions is disabled by default. If you set this field to <code>true</code>, you will be able to access the feature contributions with the <code>feature_contributions</code> field of the predict output.</p>
302
+
303
+
304
+ </div>
305
+ </div>
306
+ <div class="tags">
307
+
308
+
309
+ </div><table class="source_code">
310
+ <tr>
311
+ <td>
312
+ <pre class="lines">
313
+
314
+
315
+ 24
316
+ 25
317
+ 26</pre>
318
+ </td>
319
+ <td>
320
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 24</span>
321
+
322
+ <span class='kw'>def</span> <span class='id identifier rubyid_compute_feature_contributions'>compute_feature_contributions</span>
323
+ <span class='ivar'>@compute_feature_contributions</span>
324
+ <span class='kw'>end</span></pre>
325
+ </td>
326
+ </tr>
327
+ </table>
328
+ </div>
329
+
330
+
331
+ <span id=""></span>
332
+ <div class="method_details ">
333
+ <h3 class="signature " id="threshold-instance_method">
334
+
335
+ #<strong>threshold</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
336
+
337
+
338
+
339
+
340
+
341
+ </h3><div class="docstring">
342
+ <div class="discussion">
343
+ <p>If your model is a binary classifier, use this field to make predictions using a threshold chosen on the tuning page of the app. The default value is <code>0.5</code>.</p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+
350
+
351
+ </div><table class="source_code">
352
+ <tr>
353
+ <td>
354
+ <pre class="lines">
355
+
356
+
357
+ 22
358
+ 23
359
+ 24</pre>
360
+ </td>
361
+ <td>
362
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 22</span>
363
+
364
+ <span class='kw'>def</span> <span class='id identifier rubyid_threshold'>threshold</span>
365
+ <span class='ivar'>@threshold</span>
366
+ <span class='kw'>end</span></pre>
367
+ </td>
368
+ </tr>
369
+ </table>
370
+ </div>
371
+
372
+ </div>
373
+
374
+
375
+ <div id="instance_method_details" class="method_details_list">
376
+ <h2>Instance Method Details</h2>
377
+
378
+
379
+ <div class="method_details first">
380
+ <h3 class="signature first" id="to_json-instance_method">
381
+
382
+ #<strong>to_json</strong>(*args) &#x21d2; <tt>Object</tt>
383
+
384
+
385
+
386
+
387
+
388
+ </h3><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 29
395
+ 30
396
+ 31</pre>
397
+ </td>
398
+ <td>
399
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 29</span>
400
+
401
+ <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>
402
+ <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>threshold</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@threshold</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>compute_feature_contributions</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@compute_feature_contributions</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>
403
+ <span class='kw'>end</span></pre>
404
+ </td>
405
+ </tr>
406
+ </table>
407
+ </div>
408
+
409
+ </div>
410
+
411
+ </div>
412
+
413
+ <div id="footer">
414
+ Generated on Thu Jul 1 17:11:32 2021 by
415
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
416
+ 0.9.26 (ruby-2.7.3).
417
+ </div>
418
+
419
+ </div>
420
+ </body>
421
+ </html>
@@ -0,0 +1,421 @@
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::RegressionPredictOutput
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::RegressionPredictOutput";
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 (R)</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">RegressionPredictOutput</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::RegressionPredictOutput
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::RegressionPredictOutput</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
+ <p><code>predict</code> outputs <code>RegressionPredictOutput</code> when the model&#39;s task is regression.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#feature_contributions-instance_method" title="#feature_contributions (instance method)">#<strong>feature_contributions</strong> &#x21d2; Object </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+ <span class="note title readonly">readonly</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <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>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong> &#x21d2; Object </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+ <span class="note title readonly">readonly</span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>This is the predicted value.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ </ul>
176
+
177
+
178
+
179
+
180
+
181
+ <h2>
182
+ Instance Method Summary
183
+ <small><a href="#" class="summary_toggle">collapse</a></small>
184
+ </h2>
185
+
186
+ <ul class="summary">
187
+
188
+ <li class="public ">
189
+ <span class="summary_signature">
190
+
191
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(value:, feature_contributions:) &#x21d2; RegressionPredictOutput </a>
192
+
193
+
194
+
195
+ </span>
196
+
197
+
198
+ <span class="note title constructor">constructor</span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'><p>A new instance of RegressionPredictOutput.</p>
208
+ </div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#to_json-instance_method" title="#to_json (instance method)">#<strong>to_json</strong>(*args) &#x21d2; Object </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'></div></span>
231
+
232
+ </li>
233
+
234
+
235
+ </ul>
236
+
237
+
238
+ <div id="constructor_details" class="method_details_list">
239
+ <h2>Constructor Details</h2>
240
+
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="initialize-instance_method">
243
+
244
+ #<strong>initialize</strong>(value:, feature_contributions:) &#x21d2; <tt><span class='object_link'><a href="" title="Tangram::RegressionPredictOutput (class)">RegressionPredictOutput</a></span></tt>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><div class="docstring">
251
+ <div class="discussion">
252
+ <p>Returns a new instance of RegressionPredictOutput.</p>
253
+
254
+
255
+ </div>
256
+ </div>
257
+ <div class="tags">
258
+
259
+
260
+ </div><table class="source_code">
261
+ <tr>
262
+ <td>
263
+ <pre class="lines">
264
+
265
+
266
+ 40
267
+ 41
268
+ 42
269
+ 43</pre>
270
+ </td>
271
+ <td>
272
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 40</span>
273
+
274
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>value:</span><span class='comma'>,</span> <span class='label'>feature_contributions:</span><span class='rparen'>)</span>
275
+ <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
276
+ <span class='ivar'>@feature_contributions</span> <span class='op'>=</span> <span class='id identifier rubyid_feature_contributions'>feature_contributions</span>
277
+ <span class='kw'>end</span></pre>
278
+ </td>
279
+ </tr>
280
+ </table>
281
+ </div>
282
+
283
+ </div>
284
+
285
+ <div id="instance_attr_details" class="attr_details">
286
+ <h2>Instance Attribute Details</h2>
287
+
288
+
289
+ <span id=""></span>
290
+ <div class="method_details first">
291
+ <h3 class="signature first" id="feature_contributions-instance_method">
292
+
293
+ #<strong>feature_contributions</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
294
+
295
+
296
+
297
+
298
+
299
+ </h3><div class="docstring">
300
+ <div class="discussion">
301
+ <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>
302
+
303
+
304
+ </div>
305
+ </div>
306
+ <div class="tags">
307
+
308
+
309
+ </div><table class="source_code">
310
+ <tr>
311
+ <td>
312
+ <pre class="lines">
313
+
314
+
315
+ 39
316
+ 40
317
+ 41</pre>
318
+ </td>
319
+ <td>
320
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 39</span>
321
+
322
+ <span class='kw'>def</span> <span class='id identifier rubyid_feature_contributions'>feature_contributions</span>
323
+ <span class='ivar'>@feature_contributions</span>
324
+ <span class='kw'>end</span></pre>
325
+ </td>
326
+ </tr>
327
+ </table>
328
+ </div>
329
+
330
+
331
+ <span id=""></span>
332
+ <div class="method_details ">
333
+ <h3 class="signature " id="value-instance_method">
334
+
335
+ #<strong>value</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
336
+
337
+
338
+
339
+
340
+
341
+ </h3><div class="docstring">
342
+ <div class="discussion">
343
+ <p>This is the predicted value.</p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+
350
+
351
+ </div><table class="source_code">
352
+ <tr>
353
+ <td>
354
+ <pre class="lines">
355
+
356
+
357
+ 37
358
+ 38
359
+ 39</pre>
360
+ </td>
361
+ <td>
362
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 37</span>
363
+
364
+ <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
365
+ <span class='ivar'>@value</span>
366
+ <span class='kw'>end</span></pre>
367
+ </td>
368
+ </tr>
369
+ </table>
370
+ </div>
371
+
372
+ </div>
373
+
374
+
375
+ <div id="instance_method_details" class="method_details_list">
376
+ <h2>Instance Method Details</h2>
377
+
378
+
379
+ <div class="method_details first">
380
+ <h3 class="signature first" id="to_json-instance_method">
381
+
382
+ #<strong>to_json</strong>(*args) &#x21d2; <tt>Object</tt>
383
+
384
+
385
+
386
+
387
+
388
+ </h3><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 44
395
+ 45
396
+ 46</pre>
397
+ </td>
398
+ <td>
399
+ <pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 44</span>
400
+
401
+ <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>
402
+ <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>value</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='ivar'>@value</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>
403
+ <span class='kw'>end</span></pre>
404
+ </td>
405
+ </tr>
406
+ </table>
407
+ </div>
408
+
409
+ </div>
410
+
411
+ </div>
412
+
413
+ <div id="footer">
414
+ Generated on Thu Jul 1 17:11:32 2021 by
415
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
416
+ 0.9.26 (ruby-2.7.3).
417
+ </div>
418
+
419
+ </div>
420
+ </body>
421
+ </html>