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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/util/R/model.rb +9 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f565084c219dbd2a9227ba96dfcc2dfc99746594
4
- data.tar.gz: 7b7b578da5e1fa45f77ff4c6508298278a6fb96f
3
+ metadata.gz: a491cb85ffe8880ce8d17b7fe84905e8100e8190
4
+ data.tar.gz: 78966fc2770ca77c7a77e8e85ac90337aa9a9996
5
5
  SHA512:
6
- metadata.gz: 08279637308867637c8dac483fd9616850f07efd0501435510c6b42bd5e064c0197e531585143690dee3357d54450a32df72729af6b56e038727746dd42db81d
7
- data.tar.gz: 4c63d2243ca63d1d67069d8e3367b7679db3cc25e20cb023c21f6159eaabde971520561cc1105a21b83ced2562f4a558beadb5bb16e0a0d18d236185524bb4f7
6
+ metadata.gz: 493e53ffa157eb5afc5b84c12e586fc1f821f3e261b6c92c765ba20ccf35988f2be1605cdb564aebe607f3c2c2162823567a94f5dcb0ccb2e036ea881b7db030
7
+ data.tar.gz: 83dd903ba1e8cd0c3088cef60f1490746317d0f803080565d4adfb4b9e256b9c45f59472638171b7166ac0085cdb75908f9bf9ae72adddb044578cda2dba7ef8
@@ -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.64
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-04 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake