Class: OpenTox::Validation
- Inherits:
-
Object
- Object
- OpenTox::Validation
- Defined in:
- lib/validation.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
Returns the value of attribute uri.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Validation
constructor
A new instance of Validation.
Constructor Details
#initialize(params) ⇒ Validation
Returns a new instance of Validation.
6 7 8 |
# File 'lib/validation.rb', line 6 def initialize(params) @uri = OpenTox::RestClientWrapper.post(File.join(@@config[:services]["opentox-validation"],"/crossvalidation"),params,nil,false) end |
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/validation.rb', line 4 def uri @uri end |
Class Method Details
.crossvalidation(params) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/validation.rb', line 10 def self.crossvalidation(params) params[:uri] = File.join(@@config[:services]['opentox-validation'], "crossvalidation") params[:num_folds] = 10 unless params[:num_folds] params[:random_seed] = 2 unless params[:random_seed] params[:stratified] = false unless params[:stratified] OpenTox::Validation.new(params) end |