blob: fd63ea6593a453ed75cbbcfef05c2123fb344ac0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
- case @model_type
- when "classification"
- prediction = @cv.metadata["http://www.opentox.org/api/1.2#classificationStatistics"]["http://www.opentox.org/api/1.2#numCorrect"] + @cv.metadata["http://www.opentox.org/api/1.2#classificationStatistics"]["http://www.opentox.org/api/1.2#numIncorrect"]
%p= "Number of predictions: #{prediction}"
- percent = @cv.metadata["http://www.opentox.org/api/1.2#classificationStatistics"]["http://www.opentox.org/api/1.2#percentCorrect"]
%p= "Correct predictions: #{percent.round(2)} %"
- when "regression"
- prediction = @cv.metadata["http://www.opentox.org/api/1.2#numInstances"].to_i - @cv.metadata["http://www.opentox.org/api/1.2#numUnpredicted"].to_i
%p= "Number of predictions: #{prediction}"
- rSquare = @cv.metadata["http://www.opentox.org/api/1.2#regressionStatistics"]["http://www.opentox.org/api/1.2#rSquare"]
%p= "R-squared: #{rSquare.round(2)} %"
- rootMeanSquaredError = @cv.metadata["http://www.opentox.org/api/1.2#regressionStatistics"]["http://www.opentox.org/api/1.2#rootMeanSquaredError"]
%p= "Root Mean Square Error: #{rootMeanSquaredError.round(2)} %"
- meanAbsoluteError = @cv.metadata["http://www.opentox.org/api/1.2#regressionStatistics"]["http://www.opentox.org/api/1.2#meanAbsoluteError"]
%p= "Mean Absolute Error: #{meanAbsoluteError.round(2)} %"
|