blob: cdf96e3d633796a8a55e2e4481cb871f86766051 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module OpenTox
class Import
# Import datasets from the data folder, create and validate models
# @return [Array<OpenTox::Model::Validation>] Validated models
def self.public_data
models = []
Dir[File.join(File.dirname(__FILE__),"..","data/*csv")].each do |f|
$logger.debug f
m = Model::Validation.from_csv_file f
$logger.debug "#{f} ID: #{m.id.to_s}"
m.crossvalidations.each do |cv|
$logger.debug cv.statistics
end
models << m
end
models
end
end
end
|