From 11dd9bce948364283654b2f056fefb933afc3e6e Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 4 Dec 2014 17:38:55 +0100 Subject: several updates in code; validation integrated, probability for classification; updated call for more details for smarts view --- views/predict.haml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'views/predict.haml') diff --git a/views/predict.haml b/views/predict.haml index 62fe93c..e9d222f 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -112,6 +112,7 @@ %p{:style=>"display:inline;"} Algorithm: %code{:style=>"font-size:x-large;"} lazar - model.type.to_s =~ /regression/i ? type = "regression" : type = "classification" + - @model_type = type %p= "Type: "+type - training_dataset = OpenTox::Dataset.new "#{model[RDF::OT.trainingDataset]}" - training_compounds = training_dataset.compounds.size.to_s @@ -123,26 +124,24 @@ %a{:href=>"http://www.maunz.de/libfminer2-bbrc-doc/", :title=>"link opens in new window.", :target=>"_blank"} Fminer backbone refinement classes %br %br - %p{:style=>"display:inline"}= "Training Dataset: " - %a{:href=>"#{to("/predict/#{CGI.escape(model[RDF::OT.trainingDataset])}")}", :title=>"link opens in new window."} download rdf + %p{:style=>"display:inline"}= "Model: " + %a{:href=>"#{to("/predict/#{CGI.escape(model.uri)}")}", :title=>"download"} rdf %br %br %p{:style=>"display:inline"}= "Feature Dataset: " - %a{:href=>"#{to("/predict/#{CGI.escape(model[RDF::OT.featureDataset])}")}", :title=>"download"} download rdf + %a{:href=>"#{to("/predict/#{CGI.escape(model[RDF::OT.featureDataset])}")}", :title=>"download"} rdf %br %br - %p{:style=>"display:inline"}= "Model: " - %a{:href=>"#{to("/predict/#{CGI.escape(model.uri)}")}", :title=>"download"} download rdf + %p{:style=>"display:inline"}= "Training Dataset: " + %a{:href=>"#{to("/predict/#{CGI.escape(model[RDF::OT.trainingDataset])}")}", :title=>"link opens in new window."} rdf %br - %h3 Validation: - -#%p= @cv.inspect - %a{:href => "#"} - Detailed report link - %p Number of predictions: integer - %p Correct predictions: % - - - //%br + - unless model.metadata[RDF::OT.crossValidation].nil? + %h3 Validation: + %a{:href => "#{model.metadata[RDF::OT.crossValidation][0]}", :title=>"link opens in new window.", :target=>"_blank"} + Detailed report link + %br + - @cv = OpenTox::Validation.find "#{model.metadata[RDF::OT.crossValidation][0]+"/statistics"}" + = haml :validation, :layout => false, :validation => @cv, :model_type => @model_type .arrow %img{:src=>"/images/arrow_down_float.png", :alt=>"v", :class=> "arrow"} -- cgit v1.2.3