Class: OpenTox::Validation

Inherits:
Object
  • Object
show all
Defined in:
lib/validation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#uriObject

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