tangram 0.4.0 → 0.7.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -30
- data/docs/Tangram.html +5 -4
- data/docs/Tangram/BagOfWordsCosineSimilarityFeatureContribution.html +518 -0
- data/docs/Tangram/BagOfWordsFeatureContribution.html +24 -13
- data/docs/Tangram/Bigram.html +16 -9
- data/docs/Tangram/BinaryClassificationPredictOutput.html +20 -11
- data/docs/Tangram/FeatureContributions.html +20 -11
- data/docs/Tangram/IdentityFeatureContribution.html +20 -11
- data/docs/Tangram/LibTangram.html +3 -2
- data/docs/Tangram/LibTangram/TangramStringView.html +6 -6
- data/docs/Tangram/LoadModelOptions.html +12 -7
- data/docs/Tangram/Model.html +173 -133
- data/docs/Tangram/MulticlassClassificationPredictOutput.html +24 -13
- data/docs/Tangram/NormalizedFeatureContribution.html +20 -11
- data/docs/Tangram/OneHotEncodedFeatureContribution.html +24 -13
- data/docs/Tangram/PredictOptions.html +16 -9
- data/docs/Tangram/RegressionPredictOutput.html +16 -9
- data/docs/Tangram/Unigram.html +12 -7
- data/docs/Tangram/WordEmbeddingFeatureContribution.html +38 -29
- data/docs/_index.html +9 -2
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +16 -37
- data/docs/index.html +16 -37
- data/docs/method_list.html +69 -29
- data/docs/top-level-namespace.html +2 -2
- data/examples/advanced/Gemfile +2 -0
- data/examples/advanced/Gemfile.lock +15 -0
- data/examples/advanced/README.md +14 -0
- data/examples/{heart_disease.tangram → advanced/heart_disease.tangram} +0 -0
- data/examples/{advanced.rb → advanced/main.rb} +1 -1
- data/examples/basic/Gemfile +2 -0
- data/examples/basic/Gemfile.lock +15 -0
- data/examples/basic/README.md +10 -0
- data/examples/basic/heart_disease.tangram +0 -0
- data/examples/{basic.rb → basic/main.rb} +0 -0
- data/lib/tangram/libtangram/aarch64-apple-darwin/libtangram.dylib +0 -0
- data/lib/tangram/libtangram/aarch64-unknown-linux-gnu/libtangram.so +0 -0
- data/lib/tangram/libtangram/aarch64-unknown-linux-musl/libtangram.so +0 -0
- data/lib/tangram/libtangram/x86_64-apple-darwin/libtangram.dylib +0 -0
- data/lib/tangram/libtangram/x86_64-pc-windows-msvc/tangram.dll +0 -0
- data/lib/tangram/libtangram/x86_64-unknown-linux-gnu/libtangram.so +0 -0
- data/lib/tangram/libtangram/x86_64-unknown-linux-musl/libtangram.so +0 -0
- data/lib/tangram/tangram.rb +9 -9
- data/scripts/release +8 -0
- data/tangram.gemspec +4 -4
- metadata +16 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b18a96257b5b7495c1e1be631f1d4aae94b2dba0ed47691ddf4c233e1909665
|
4
|
+
data.tar.gz: 017c2a846b94f6d9b6e901ad53ed04842ae123dff214fc7b0f641e9cf7c17dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8da9e0efc9b1b90be41721a1738491822f68d2d0cec2258f48c99a99de0383ae99e85001c80234b2516fe0acf935d93e7d82e259e3742bc4e341b2ee8822ed1d
|
7
|
+
data.tar.gz: b5241288d4c8566622f39520f63c7dc340672668731bf7c71613a976954da3dc65bbf5a24a00e0326f65c32d4425fbe17eb841a1c5cfcaa6dfe75e8f3bb1448f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Tangram for Ruby
|
2
2
|
|
3
|
-
- [Watch the Video](https://www.tangram.
|
4
|
-
- [Read the Docs](https://www.tangram.
|
3
|
+
- [Watch the Video](https://www.tangram.dev)
|
4
|
+
- [Read the Docs](https://www.tangram.dev/docs)
|
5
5
|
|
6
|
-
The Tangram Ruby
|
6
|
+
The Tangram Ruby library makes it easy to make predictions with your Tangram machine learning model from Ruby.
|
7
7
|
|
8
8
|
## Usage
|
9
9
|
|
@@ -25,36 +25,12 @@ input = {
|
|
25
25
|
output = model.predict(input)
|
26
26
|
```
|
27
27
|
|
28
|
-
For more information, [read the docs](https://www.tangram.
|
28
|
+
For more information, [read the docs](https://www.tangram.dev/docs).
|
29
29
|
|
30
30
|
## Platform Support
|
31
31
|
|
32
|
-
Tangram for Ruby is currently supported on Linux, macOS, and Windows with AMD64 CPUs. Are you interested in another platform? [Open an issue](https://github.com/
|
32
|
+
Tangram for Ruby is currently supported on Linux, macOS, and Windows with ARM64 and AMD64 CPUs. Are you interested in another platform? [Open an issue](https://github.com/tangramdotdev/tangram/issues/new) or send us an email at [help@tangram.dev](mailto:help@tangram.dev).
|
33
33
|
|
34
34
|
## Examples
|
35
35
|
|
36
|
-
The source for this
|
37
|
-
|
38
|
-
### Basic
|
39
|
-
|
40
|
-
The basic example demonstrates loading a model from a `.tangram` file and making a prediction.
|
41
|
-
|
42
|
-
To run the example:
|
43
|
-
|
44
|
-
```
|
45
|
-
$ ruby examples/basic.rb
|
46
|
-
```
|
47
|
-
|
48
|
-
### Advanced
|
49
|
-
|
50
|
-
The advanced example demonstrates logging predictions and true values to the Tangram app. Before running the example, run `tangram app` to start the app running locally, open `http://localhost:8080` in your browser, and upload the file `examples/heart_disease.tangram` to it.
|
51
|
-
|
52
|
-
To run the example:
|
53
|
-
|
54
|
-
```
|
55
|
-
$ TANGRAM_URL=http://localhost:8080 ruby examples/advanced.rb
|
56
|
-
```
|
57
|
-
|
58
|
-
Now if you refresh the production stats or production metrics tabs for the model you uploaded, you should see predictions and true values.
|
59
|
-
|
60
|
-
For more information, [read the docs](https://www.tangram.xyz/docs).
|
36
|
+
The source for this package contains a number of examples in the `examples` directory. Each example has a `README.md` explaining how to run it.
|
data/docs/Tangram.html
CHANGED
@@ -85,7 +85,8 @@
|
|
85
85
|
|
86
86
|
<h2>Overview</h2><div class="docstring">
|
87
87
|
<div class="discussion">
|
88
|
-
|
88
|
+
|
89
|
+
<p>This is the main module in the <code>tangram</code> gem.</p>
|
89
90
|
|
90
91
|
|
91
92
|
</div>
|
@@ -101,7 +102,7 @@
|
|
101
102
|
|
102
103
|
|
103
104
|
|
104
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Tangram/BagOfWordsFeatureContribution.html" title="Tangram::BagOfWordsFeatureContribution (class)">BagOfWordsFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/Bigram.html" title="Tangram::Bigram (class)">Bigram</a></span>, <span class='object_link'><a href="Tangram/BinaryClassificationPredictOutput.html" title="Tangram::BinaryClassificationPredictOutput (class)">BinaryClassificationPredictOutput</a></span>, <span class='object_link'><a href="Tangram/FeatureContributions.html" title="Tangram::FeatureContributions (class)">FeatureContributions</a></span>, <span class='object_link'><a href="Tangram/IdentityFeatureContribution.html" title="Tangram::IdentityFeatureContribution (class)">IdentityFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/LoadModelOptions.html" title="Tangram::LoadModelOptions (class)">LoadModelOptions</a></span>, <span class='object_link'><a href="Tangram/Model.html" title="Tangram::Model (class)">Model</a></span>, <span class='object_link'><a href="Tangram/MulticlassClassificationPredictOutput.html" title="Tangram::MulticlassClassificationPredictOutput (class)">MulticlassClassificationPredictOutput</a></span>, <span class='object_link'><a href="Tangram/NormalizedFeatureContribution.html" title="Tangram::NormalizedFeatureContribution (class)">NormalizedFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/OneHotEncodedFeatureContribution.html" title="Tangram::OneHotEncodedFeatureContribution (class)">OneHotEncodedFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/PredictOptions.html" title="Tangram::PredictOptions (class)">PredictOptions</a></span>, <span class='object_link'><a href="Tangram/RegressionPredictOutput.html" title="Tangram::RegressionPredictOutput (class)">RegressionPredictOutput</a></span>, <span class='object_link'><a href="Tangram/Unigram.html" title="Tangram::Unigram (class)">Unigram</a></span>, <span class='object_link'><a href="Tangram/WordEmbeddingFeatureContribution.html" title="Tangram::WordEmbeddingFeatureContribution (class)">WordEmbeddingFeatureContribution</a></span>
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Tangram/BagOfWordsCosineSimilarityFeatureContribution.html" title="Tangram::BagOfWordsCosineSimilarityFeatureContribution (class)">BagOfWordsCosineSimilarityFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/BagOfWordsFeatureContribution.html" title="Tangram::BagOfWordsFeatureContribution (class)">BagOfWordsFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/Bigram.html" title="Tangram::Bigram (class)">Bigram</a></span>, <span class='object_link'><a href="Tangram/BinaryClassificationPredictOutput.html" title="Tangram::BinaryClassificationPredictOutput (class)">BinaryClassificationPredictOutput</a></span>, <span class='object_link'><a href="Tangram/FeatureContributions.html" title="Tangram::FeatureContributions (class)">FeatureContributions</a></span>, <span class='object_link'><a href="Tangram/IdentityFeatureContribution.html" title="Tangram::IdentityFeatureContribution (class)">IdentityFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/LoadModelOptions.html" title="Tangram::LoadModelOptions (class)">LoadModelOptions</a></span>, <span class='object_link'><a href="Tangram/Model.html" title="Tangram::Model (class)">Model</a></span>, <span class='object_link'><a href="Tangram/MulticlassClassificationPredictOutput.html" title="Tangram::MulticlassClassificationPredictOutput (class)">MulticlassClassificationPredictOutput</a></span>, <span class='object_link'><a href="Tangram/NormalizedFeatureContribution.html" title="Tangram::NormalizedFeatureContribution (class)">NormalizedFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/OneHotEncodedFeatureContribution.html" title="Tangram::OneHotEncodedFeatureContribution (class)">OneHotEncodedFeatureContribution</a></span>, <span class='object_link'><a href="Tangram/PredictOptions.html" title="Tangram::PredictOptions (class)">PredictOptions</a></span>, <span class='object_link'><a href="Tangram/RegressionPredictOutput.html" title="Tangram::RegressionPredictOutput (class)">RegressionPredictOutput</a></span>, <span class='object_link'><a href="Tangram/Unigram.html" title="Tangram::Unigram (class)">Unigram</a></span>, <span class='object_link'><a href="Tangram/WordEmbeddingFeatureContribution.html" title="Tangram::WordEmbeddingFeatureContribution (class)">WordEmbeddingFeatureContribution</a></span>
|
105
106
|
|
106
107
|
|
107
108
|
</p>
|
@@ -117,9 +118,9 @@
|
|
117
118
|
</div>
|
118
119
|
|
119
120
|
<div id="footer">
|
120
|
-
Generated on
|
121
|
+
Generated on Mon Jul 26 14:54:00 2021 by
|
121
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
122
|
-
0.9.26 (ruby-2.
|
123
|
+
0.9.26 (ruby-2.7.4).
|
123
124
|
</div>
|
124
125
|
|
125
126
|
</div>
|
@@ -0,0 +1,518 @@
|
|
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::BagOfWordsCosineSimilarityFeatureContribution
|
8
|
+
|
9
|
+
— 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::BagOfWordsCosineSimilarityFeatureContribution";
|
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> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Tangram.html" title="Tangram (module)">Tangram</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">BagOfWordsCosineSimilarityFeatureContribution</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::BagOfWordsCosineSimilarityFeatureContribution
|
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::BagOfWordsCosineSimilarityFeatureContribution</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>This describes the contribution of a feature from a bag of words cosine similarity feature group.</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="#column_name_a-instance_method" title="#column_name_a (instance method)">#<strong>column_name_a</strong> ⇒ 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 source column a for the feature group.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#column_name_b-instance_method" title="#column_name_b (instance method)">#<strong>column_name_b</strong> ⇒ 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>This is the name of the source column b for the feature group.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#feature_contribution_value-instance_method" title="#feature_contribution_value (instance method)">#<strong>feature_contribution_value</strong> ⇒ 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 amount that the feature contributed to the output.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="public ">
|
208
|
+
<span class="summary_signature">
|
209
|
+
|
210
|
+
<a href="#feature_value-instance_method" title="#feature_value (instance method)">#<strong>feature_value</strong> ⇒ Object </a>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="note title readonly">readonly</span>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'>
|
230
|
+
<p>This is the value of the feature.</p>
|
231
|
+
</div></span>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
</ul>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
<h2>
|
243
|
+
Instance Method Summary
|
244
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
245
|
+
</h2>
|
246
|
+
|
247
|
+
<ul class="summary">
|
248
|
+
|
249
|
+
<li class="public ">
|
250
|
+
<span class="summary_signature">
|
251
|
+
|
252
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(column_name_a:, column_name_b:, feature_contribution_value:, feature_value:) ⇒ BagOfWordsCosineSimilarityFeatureContribution </a>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</span>
|
257
|
+
|
258
|
+
|
259
|
+
<span class="note title constructor">constructor</span>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
<span class="summary_desc"><div class='inline'>
|
269
|
+
<p>A new instance of BagOfWordsCosineSimilarityFeatureContribution.</p>
|
270
|
+
</div></span>
|
271
|
+
|
272
|
+
</li>
|
273
|
+
|
274
|
+
|
275
|
+
</ul>
|
276
|
+
|
277
|
+
|
278
|
+
<div id="constructor_details" class="method_details_list">
|
279
|
+
<h2>Constructor Details</h2>
|
280
|
+
|
281
|
+
<div class="method_details first">
|
282
|
+
<h3 class="signature first" id="initialize-instance_method">
|
283
|
+
|
284
|
+
#<strong>initialize</strong>(column_name_a:, column_name_b:, feature_contribution_value:, feature_value:) ⇒ <tt><span class='object_link'><a href="" title="Tangram::BagOfWordsCosineSimilarityFeatureContribution (class)">BagOfWordsCosineSimilarityFeatureContribution</a></span></tt>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</h3><div class="docstring">
|
291
|
+
<div class="discussion">
|
292
|
+
|
293
|
+
<p>Returns a new instance of BagOfWordsCosineSimilarityFeatureContribution.</p>
|
294
|
+
|
295
|
+
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
<div class="tags">
|
299
|
+
|
300
|
+
|
301
|
+
</div><table class="source_code">
|
302
|
+
<tr>
|
303
|
+
<td>
|
304
|
+
<pre class="lines">
|
305
|
+
|
306
|
+
|
307
|
+
200
|
308
|
+
201
|
309
|
+
202
|
310
|
+
203
|
311
|
+
204
|
312
|
+
205</pre>
|
313
|
+
</td>
|
314
|
+
<td>
|
315
|
+
<pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 200</span>
|
316
|
+
|
317
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>column_name_a:</span><span class='comma'>,</span> <span class='label'>column_name_b:</span><span class='comma'>,</span> <span class='label'>feature_contribution_value:</span><span class='comma'>,</span> <span class='label'>feature_value:</span><span class='rparen'>)</span>
|
318
|
+
<span class='ivar'>@column_name_a</span> <span class='op'>=</span> <span class='id identifier rubyid_column_name_a'>column_name_a</span>
|
319
|
+
<span class='ivar'>@column_name_b</span> <span class='op'>=</span> <span class='id identifier rubyid_column_name_b'>column_name_b</span>
|
320
|
+
<span class='ivar'>@feature_contribution_value</span> <span class='op'>=</span> <span class='id identifier rubyid_feature_contribution_value'>feature_contribution_value</span>
|
321
|
+
<span class='ivar'>@feature_value</span> <span class='op'>=</span> <span class='id identifier rubyid_feature_value'>feature_value</span>
|
322
|
+
<span class='kw'>end</span></pre>
|
323
|
+
</td>
|
324
|
+
</tr>
|
325
|
+
</table>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
</div>
|
329
|
+
|
330
|
+
<div id="instance_attr_details" class="attr_details">
|
331
|
+
<h2>Instance Attribute Details</h2>
|
332
|
+
|
333
|
+
|
334
|
+
<span id=""></span>
|
335
|
+
<div class="method_details first">
|
336
|
+
<h3 class="signature first" id="column_name_a-instance_method">
|
337
|
+
|
338
|
+
#<strong>column_name_a</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
</h3><div class="docstring">
|
345
|
+
<div class="discussion">
|
346
|
+
|
347
|
+
<p>This is the name of the source column a for the feature group.</p>
|
348
|
+
|
349
|
+
|
350
|
+
</div>
|
351
|
+
</div>
|
352
|
+
<div class="tags">
|
353
|
+
|
354
|
+
|
355
|
+
</div><table class="source_code">
|
356
|
+
<tr>
|
357
|
+
<td>
|
358
|
+
<pre class="lines">
|
359
|
+
|
360
|
+
|
361
|
+
193
|
362
|
+
194
|
363
|
+
195</pre>
|
364
|
+
</td>
|
365
|
+
<td>
|
366
|
+
<pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 193</span>
|
367
|
+
|
368
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_column_name_a'>column_name_a</span>
|
369
|
+
<span class='ivar'>@column_name_a</span>
|
370
|
+
<span class='kw'>end</span></pre>
|
371
|
+
</td>
|
372
|
+
</tr>
|
373
|
+
</table>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
|
377
|
+
<span id=""></span>
|
378
|
+
<div class="method_details ">
|
379
|
+
<h3 class="signature " id="column_name_b-instance_method">
|
380
|
+
|
381
|
+
#<strong>column_name_b</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
</h3><div class="docstring">
|
388
|
+
<div class="discussion">
|
389
|
+
|
390
|
+
<p>This is the name of the source column b for the feature group.</p>
|
391
|
+
|
392
|
+
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
<div class="tags">
|
396
|
+
|
397
|
+
|
398
|
+
</div><table class="source_code">
|
399
|
+
<tr>
|
400
|
+
<td>
|
401
|
+
<pre class="lines">
|
402
|
+
|
403
|
+
|
404
|
+
195
|
405
|
+
196
|
406
|
+
197</pre>
|
407
|
+
</td>
|
408
|
+
<td>
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 195</span>
|
410
|
+
|
411
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_column_name_b'>column_name_b</span>
|
412
|
+
<span class='ivar'>@column_name_b</span>
|
413
|
+
<span class='kw'>end</span></pre>
|
414
|
+
</td>
|
415
|
+
</tr>
|
416
|
+
</table>
|
417
|
+
</div>
|
418
|
+
|
419
|
+
|
420
|
+
<span id=""></span>
|
421
|
+
<div class="method_details ">
|
422
|
+
<h3 class="signature " id="feature_contribution_value-instance_method">
|
423
|
+
|
424
|
+
#<strong>feature_contribution_value</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
</h3><div class="docstring">
|
431
|
+
<div class="discussion">
|
432
|
+
|
433
|
+
<p>This is the amount that the feature contributed to the output.</p>
|
434
|
+
|
435
|
+
|
436
|
+
</div>
|
437
|
+
</div>
|
438
|
+
<div class="tags">
|
439
|
+
|
440
|
+
|
441
|
+
</div><table class="source_code">
|
442
|
+
<tr>
|
443
|
+
<td>
|
444
|
+
<pre class="lines">
|
445
|
+
|
446
|
+
|
447
|
+
199
|
448
|
+
200
|
449
|
+
201</pre>
|
450
|
+
</td>
|
451
|
+
<td>
|
452
|
+
<pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 199</span>
|
453
|
+
|
454
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_feature_contribution_value'>feature_contribution_value</span>
|
455
|
+
<span class='ivar'>@feature_contribution_value</span>
|
456
|
+
<span class='kw'>end</span></pre>
|
457
|
+
</td>
|
458
|
+
</tr>
|
459
|
+
</table>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
|
463
|
+
<span id=""></span>
|
464
|
+
<div class="method_details ">
|
465
|
+
<h3 class="signature " id="feature_value-instance_method">
|
466
|
+
|
467
|
+
#<strong>feature_value</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
</h3><div class="docstring">
|
474
|
+
<div class="discussion">
|
475
|
+
|
476
|
+
<p>This is the value of the feature.</p>
|
477
|
+
|
478
|
+
|
479
|
+
</div>
|
480
|
+
</div>
|
481
|
+
<div class="tags">
|
482
|
+
|
483
|
+
|
484
|
+
</div><table class="source_code">
|
485
|
+
<tr>
|
486
|
+
<td>
|
487
|
+
<pre class="lines">
|
488
|
+
|
489
|
+
|
490
|
+
197
|
491
|
+
198
|
492
|
+
199</pre>
|
493
|
+
</td>
|
494
|
+
<td>
|
495
|
+
<pre class="code"><span class="info file"># File 'lib/tangram/tangram.rb', line 197</span>
|
496
|
+
|
497
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_feature_value'>feature_value</span>
|
498
|
+
<span class='ivar'>@feature_value</span>
|
499
|
+
<span class='kw'>end</span></pre>
|
500
|
+
</td>
|
501
|
+
</tr>
|
502
|
+
</table>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
</div>
|
506
|
+
|
507
|
+
|
508
|
+
</div>
|
509
|
+
|
510
|
+
<div id="footer">
|
511
|
+
Generated on Mon Jul 26 14:54:00 2021 by
|
512
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
513
|
+
0.9.26 (ruby-2.7.4).
|
514
|
+
</div>
|
515
|
+
|
516
|
+
</div>
|
517
|
+
</body>
|
518
|
+
</html>
|