Created
July 18, 2020 21:04
-
-
Save karan19100/fdfca971076fdc465de3b7007b731487 to your computer and use it in GitHub Desktop.
step3_predicting_linear_model_by_karanshah
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
act_pred <- data.frame(cbind(actuals=testData$HEMATOCRIT, predicteds=predict)) # actuals_predicteds | |
cor(act_pred) # correlation_accuracy | |
head(act_pred, n=10) | |
# Actual values and predicted ones seem very close to each other. A good metric to see how much they are close is the min-max accuracy, that considers the average between the minimum and the maximum prediction. | |
min_max <- mean(apply(act_pred, 1, min) / apply(act_pred, 1, max)) | |
print(min_max) # show the result | |
mape <- mean(abs((act_pred$predicteds - act_pred$actuals))/act_pred$actuals) | |
print(mape) # show the result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment