%div.card.bg-light %div.card-body %h6.card-title Model: Source: %a{:href=>model.source, :rel=>"external"} = model.source %br - model.classification? ? type = "Classification" : type = "Regression" = "Type:\t" = type %br = "Training compounds:\t" = data_entries.count/3 %br = "Training dataset:\t" %a{:href=>"#{to("/predict/dataset/#{training_dataset.name}")}"} = training_dataset.name %div.card.bg-light %div.card-body %h6.card-title Algorithms: %p.card-text Similarity: %a.card-link{:href=> "http://www.rubydoc.info/gems/lazar/OpenTox%2F#{model.model.algorithms["similarity"]["method"].sub("::", "%2F")}", :rel=>"external"} = model.model.algorithms["similarity"]["method"] = ", min: #{model.model.algorithms["similarity"]["min"]}" %br Prediction: - if model.model.algorithms["prediction"]["method"] !~ /Caret/ %a.card-link{:href=>"http://www.rubydoc.info/gems/lazar/OpenTox%2F#{model.model.algorithms["prediction"]["method"].sub("::","%2f")}", :rel=>"external"} = model.model.algorithms["prediction"]["method"] - else %a.card-link{:href=>"http://www.rubydoc.info/gems/lazar/OpenTox/Algorithm/Caret", :rel=>"external"} = model.model.algorithms["prediction"]["method"] %br Descriptors: = model.model.algorithms["descriptors"]["method"]+"," = model.model.algorithms["descriptors"]["type"] %div.card.bg-light %div.card-body - if type == "Classification" %h6.card-text Independent crossvalidations: - else %h6.card-text Independent crossvalidations (-log10 transformed): - crossvalidations.each_with_index do |cv,idx| %div.card.bg-light %div.card-body %h6.card-title= "Nr.#{idx+1} | Num folds:#{cv.folds}" %p.card-text / predictions nr %div.row %div.col-6 %h6 Predictions number: - cv.nr_predictions.each do |key,value| %div.row %div.col %h6 = key %div.col = value - if model.classification? %hr %div.row / accuracy %div.col-6 %h6 Accuracy: - cv.accuracy.each do |key, value| %div.row %div.col %h6 = key %div.col = value.signif(3) %hr / matrixes %div.row - cv.confusion_matrix.each do |key,matrix| %div.col-4 %h6 Confusion Matrix: %i= key %br %table.table.table-sm.table-borderless.col-4 %tbody %tr %td %td %td %h6 actual %td %tr %td %td %td active %td inactive %tr %td %h6 predicted %td active %td = matrix[0][0] %td = matrix[0][1] %tr %td %td inactive %td = matrix[1][0] %td = matrix[1][1] %br - if model.regression? %hr %div.row %div.col %h6 %a.card-link{:href=>"https://en.wikipedia.org/wiki/Root-mean-square_deviation", :rel=>"external"} RMSE: - cv.rmse.each do |key,value| %div.row %div.col %h6 = key %div.col = value.signif(3) %div.col %h6 %a.card-link{:href=>"https://en.wikipedia.org/wiki/Mean_absolute_error", :rel=>"external"} MAE: - cv.mae.each do |key,value| %div.row %div.col %h6 = key %div.col = value.signif(3) %div.col %h6 %a.card-link{:href=>"https://en.wikipedia.org/wiki/Coefficient_of_determination", :rel=>"external"}= "R"+"2"+":" - cv.r_squared.each do |key,value| %div.row %div.col %h6.card-title = key %div.col = value.signif(3) %hr %div.row %div.col %h6 Within prediction interval: - cv.within_prediction_interval.each do |key,value| %div.row %div.col %h6 = key %div.col = value %div.col %h6 Out of prediction interval: - cv.out_of_prediction_interval.each do |key,value| %div.row %div.col %h6 = key %div.col = value %div.card.bg-light %div.card-body %h6.card-title QMRF: %a.btn.btn-outline-info{:href=>"#{to("/predict/report/#{model.id}")}", :id=>"report#{model.id}", :style=>"font-size:small;"} %span.fa.fa-download XML %br