summaryrefslogtreecommitdiff
path: root/fminer.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-08-06 13:37:17 +0200
committerChristoph Helma <helma@in-silico.ch>2010-08-06 13:37:17 +0200
commit0eb6450c14275a993be561cdac93c8a2b5214b74 (patch)
tree5cce27c35a28ee7e264cddb642e251835af78487 /fminer.rb
parente466524591c664f2f60f06edf97c77ffe4e74f56 (diff)
owl caching disabled, activating/deactivating fragments for regression from David
Diffstat (limited to 'fminer.rb')
-rw-r--r--fminer.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/fminer.rb b/fminer.rb
index 3554dbb..d148f69 100644
--- a/fminer.rb
+++ b/fminer.rb
@@ -1,11 +1,12 @@
ENV['FMINER_SMARTS'] = 'true'
+ENV['FMINER_NO_AROMATIC'] = 'true'
ENV['FMINER_PVALUES'] = 'true'
@@fminer = Bbrc::Bbrc.new
get '/fminer/?' do
- if File.exists?('public/fminer.owl')
- rdf = File.read('public/fminer.owl')
- else
+ #if File.exists?('public/fminer.owl')
+ #rdf = File.read('public/fminer.owl')
+ #else
owl = OpenTox::Owl.create 'Algorithm', url_for('/fminer',:full)
owl.set 'title',"fminer"
owl.set 'creator',"http://github.com/amaunz/fminer2"
@@ -15,7 +16,7 @@ get '/fminer/?' do
}
rdf = owl.rdf
File.open('public/fminer.owl', 'w') {|f| f.print rdf}
- end
+ #end
response['Content-Type'] = 'application/rdf+xml'
rdf
end
@@ -48,8 +49,9 @@ post '/fminer/?' do
id = 1 # fminer start id is not 0
compounds = []
- g_hash = Hash.new# DV: for effect calculation in regression part
+ g_hash = Hash.new# DV: for effect calculation in regression part
@@fminer.Reset
+ #@@fminer.SetChisqSig(0.99)
LOGGER.debug "Fminer: initialising ..."
training_dataset.data.each do |c,features|
begin
@@ -92,9 +94,9 @@ post '/fminer/?' do
id += 1
end
end
- g_array=g_hash.values # DV: calculation of global median for effect calculation
- g_median=OpenTox::Utils.median(g_array)
- minfreq = (0.06*id).round
+ g_array=g_hash.values # DV: calculation of global median for effect calculation
+ g_median=OpenTox::Utils.median(g_array)
+ minfreq = (0.02*id).round
@@fminer.SetMinfreq(minfreq)
LOGGER.debug "Fminer: initialised with #{id} compounds, minimum frequency #{minfreq}"