nimbus 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE.txt +1 -1
- data/README.md +15 -6
- data/bin/nimbus +1 -1
- data/lib/nimbus/configuration.rb +5 -5
- data/lib/nimbus/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fafe3e89add124de9435a9328e8a99817394057ed2c19352b1c6979849459e35
|
4
|
+
data.tar.gz: 27f46862abdeea053a1c01c5751017632a92c0f9ca5ad634dff7e17a22ce7640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b18a6cee7368fa15c908c65341b90a9e5bacf1f8a866219cdb6f65e8dc2274ff8d340d837ca2c62b38039a1b02f74680d978ddc2f7fb52e6ddcedd93418b9da
|
7
|
+
data.tar.gz: d6e32ca7be26e7edd3d43854056a9f9f41f98048947003bc0d20a05cf2e177ae20998883af5ea1d93acaf863d6b77c495789fb57ce80719a05fd4f8682f75aa7
|
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# Nimbus
|
2
2
|
Random Forest algorithm for genomic selection.
|
3
3
|
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/xuanxu/nimbus/actions/workflows/tests.yml/badge.svg)](https://github.com/xuanxu/nimbus/actions/workflows/tests.yml)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/nimbus.png)](http://badge.fury.io/rb/nimbus)
|
6
|
+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/xuanxu/nimbus/blob/master/MIT-LICENSE.txt)
|
7
|
+
[![DOI](http://joss.theoj.org/papers/10.21105/joss.00351/status.svg)](https://doi.org/10.21105/joss.00351)
|
6
8
|
|
7
9
|
## Random Forest
|
8
10
|
|
9
|
-
The [random forest algorithm](http://en.wikipedia.org/wiki/Random_forest) is a classifier consisting in many random decision trees. It is based on choosing random subsets of variables for each tree and using the most frequent, or the averaged tree output as the overall classification. In machine learning terms, it is an
|
11
|
+
The [random forest algorithm](http://en.wikipedia.org/wiki/Random_forest) is a classifier consisting in many random decision trees. It is based on choosing random subsets of variables for each tree and using the most frequent, or the averaged tree output as the overall classification. In machine learning terms, it is an ensemble classifier, so it uses multiple models to obtain better predictive performance than could be obtained from any of the constituent models.
|
10
12
|
|
11
13
|
The forest outputs the class that is the mean or the mode (in regression problems) or the majority class (in classification problems) of the node's output by individual trees.
|
12
14
|
|
@@ -56,7 +58,7 @@ You can disable this behaviour (and speed up the training process) by setting th
|
|
56
58
|
|
57
59
|
## Installation
|
58
60
|
|
59
|
-
You need to have [Ruby](https://www.ruby-lang.org) (2.
|
61
|
+
You need to have [Ruby](https://www.ruby-lang.org) (2.6 or higher) with Rubygems installed in your computer. Then install Nimbus with:
|
60
62
|
|
61
63
|
````shell
|
62
64
|
> gem install nimbus
|
@@ -229,7 +231,7 @@ It should output a `testing_file_predictions.txt` file with the resulting predic
|
|
229
231
|
|
230
232
|
## Test suite
|
231
233
|
|
232
|
-
Nimbus includes a test suite located in the `spec` directory. You can run the specs if you clone the code to your local machine and run the default rake task:
|
234
|
+
Nimbus includes a test suite located in the `spec` directory. The current state of the build is [publicly tracked by Travis CI](https://travis-ci.org/xuanxu/nimbus). You can run the specs locally if you clone the code to your local machine and run the default rake task:
|
233
235
|
|
234
236
|
````shell
|
235
237
|
> git clone git://github.com/xuanxu/nimbus.git
|
@@ -256,11 +258,18 @@ Contributions are welcome. We encourage you to contribute to the Nimbus codebase
|
|
256
258
|
Please read the [CONTRIBUTING](CONTRIBUTING.md) file.
|
257
259
|
|
258
260
|
|
259
|
-
## Credits
|
261
|
+
## Credits and DOI
|
262
|
+
|
263
|
+
If you use Nimbus, please cite our [JOSS paper: http://dx.doi.org/10.21105/joss.00351](http://dx.doi.org/10.21105/joss.00351)
|
264
|
+
|
265
|
+
You can find the citation info in [Bibtex format here](CITATION.bib).
|
266
|
+
|
267
|
+
**Cite as:**
|
268
|
+
*Bazán et al, (2017), Nimbus: a Ruby gem to implement Random Forest algorithms in a genomic selection context, Journal of Open Source Software, 2(16), 351, doi:10.21105/joss.0035*
|
260
269
|
|
261
270
|
Nimbus was developed by [Juanjo Bazán](http://twitter.com/xuanxu) in collaboration with Oscar González-Recio.
|
262
271
|
|
263
272
|
|
264
273
|
## LICENSE
|
265
274
|
|
266
|
-
Copyright ©
|
275
|
+
Copyright © Juanjo Bazán, released under the [MIT license](MIT-LICENSE.txt)
|
data/bin/nimbus
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2011-
|
4
|
+
# Copyright (c) 2011-2019 Juanjo Bazan
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the "Software"), to
|
data/lib/nimbus/configuration.rb
CHANGED
@@ -105,7 +105,7 @@ module Nimbus
|
|
105
105
|
def load(config_file = DEFAULTS[:config_file])
|
106
106
|
user_config_params = {}
|
107
107
|
dirname = Dir.pwd
|
108
|
-
if File.
|
108
|
+
if File.exist?(File.expand_path(config_file, Dir.pwd))
|
109
109
|
begin
|
110
110
|
config_file_path = File.expand_path config_file, Dir.pwd
|
111
111
|
user_config_params = Psych.load(File.open(config_file_path))
|
@@ -121,9 +121,9 @@ module Nimbus
|
|
121
121
|
@forest_file = File.expand_path(user_config_params['input']['forest' ], dirname) if user_config_params['input']['forest']
|
122
122
|
@classes = user_config_params['input']['classes'] if user_config_params['input']['classes']
|
123
123
|
else
|
124
|
-
@training_file = File.expand_path(DEFAULTS[:training_file], Dir.pwd) if File.
|
125
|
-
@testing_file = File.expand_path(DEFAULTS[:testing_file ], Dir.pwd) if File.
|
126
|
-
@forest_file = File.expand_path(DEFAULTS[:forest_file ], Dir.pwd) if File.
|
124
|
+
@training_file = File.expand_path(DEFAULTS[:training_file], Dir.pwd) if File.exist? File.expand_path(DEFAULTS[:training_file], Dir.pwd)
|
125
|
+
@testing_file = File.expand_path(DEFAULTS[:testing_file ], Dir.pwd) if File.exist? File.expand_path(DEFAULTS[:testing_file ], Dir.pwd)
|
126
|
+
@forest_file = File.expand_path(DEFAULTS[:forest_file ], Dir.pwd) if File.exist? File.expand_path(DEFAULTS[:forest_file ], Dir.pwd)
|
127
127
|
end
|
128
128
|
|
129
129
|
@do_training = true unless @training_file.nil?
|
@@ -186,7 +186,7 @@ module Nimbus
|
|
186
186
|
# The format of the input file should be the same as the forest output data of a Nimbus Application.
|
187
187
|
def load_forest
|
188
188
|
trees = []
|
189
|
-
if File.
|
189
|
+
if File.exist?(@forest_file)
|
190
190
|
begin
|
191
191
|
trees = Psych.load(File.open @forest_file)
|
192
192
|
rescue ArgumentError => e
|
data/lib/nimbus/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nimbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juanjo Bazán
|
8
8
|
- Oscar González Recio
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 3.
|
20
|
+
version: '3.12'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 3.
|
27
|
+
version: '3.12'
|
28
28
|
description: Nimbus is a Ruby gem to implement Random Forest in a genomic selection
|
29
29
|
context.
|
30
30
|
email:
|
@@ -70,9 +70,10 @@ files:
|
|
70
70
|
- spec/training_set_spec.rb
|
71
71
|
- spec/tree_spec.rb
|
72
72
|
homepage: http://nimbusgem.org
|
73
|
-
licenses:
|
73
|
+
licenses:
|
74
|
+
- MIT
|
74
75
|
metadata: {}
|
75
|
-
post_install_message:
|
76
|
+
post_install_message:
|
76
77
|
rdoc_options:
|
77
78
|
- "--main"
|
78
79
|
- README.rdoc
|
@@ -90,9 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
- !ruby/object:Gem::Version
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
|
-
|
94
|
-
|
95
|
-
signing_key:
|
94
|
+
rubygems_version: 3.4.6
|
95
|
+
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Random Forest algorithm for Genomics
|
98
98
|
test_files:
|