rbbt-util 5.17.64 → 5.17.65
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/R/model.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a491cb85ffe8880ce8d17b7fe84905e8100e8190
|
4
|
+
data.tar.gz: 78966fc2770ca77c7a77e8e85ac90337aa9a9996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 493e53ffa157eb5afc5b84c12e586fc1f821f3e261b6c92c765ba20ccf35988f2be1605cdb564aebe607f3c2c2162823567a94f5dcb0ccb2e036ea881b7db030
|
7
|
+
data.tar.gz: 83dd903ba1e8cd0c3088cef60f1490746317d0f803080565d4adfb4b9e256b9c45f59472638171b7166ac0085cdb75908f9bf9ae72adddb044578cda2dba7ef8
|
data/lib/rbbt/util/R/model.rb
CHANGED
@@ -31,6 +31,14 @@ module R
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
def self.load(model_file)
|
35
|
+
model = Model.new nil, nil, nil, :model_file => model_file
|
36
|
+
formula = Open.read(model_file + '.formula')
|
37
|
+
model.formula = formula
|
38
|
+
model
|
39
|
+
end
|
40
|
+
|
41
|
+
|
34
42
|
def colClasses(tsv)
|
35
43
|
return nil unless TSV === tsv
|
36
44
|
"c('character', " <<
|
@@ -131,6 +139,7 @@ model = rbbt.model.fit(data, #{formula}, method=#{method}#{args_str})
|
|
131
139
|
save(model, file='#{model_file}')
|
132
140
|
data = NULL
|
133
141
|
EOF
|
142
|
+
Open.write(model_file + '.formula', formula)
|
134
143
|
end
|
135
144
|
end
|
136
145
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.17.
|
4
|
+
version: 5.17.65
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|