Comparing Supervised ML algorithms in R on same data set

by Morten Andersen   Last Updated October 31, 2018 09:19 AM

I've recently embarked on my data science journey, and I've therefore also started a data science course.

In this course, we've received an assignment asking us to model a data set using different supervised algorithm (logistic regression, SVM, classification trees, random forest).

Once we've built the models, we're asked to compare them. I get the theoretical pros and cons (blackbox, accuracy, etc.).

My question, however, is related to comparing logistic regression to the remaining algorithms. In the remaining algorithm I get an accuracy through classification tables as I've utilized training/testing sets. These are easily comparable. This has not been done with the logistic regression, as I've not been taught how to in the course.

So, my question is: How do i compare logistic regression to the remaining supervised algorithms?

Thanks in advance.



Answers 1


I assume this is a classification problem. You should be able to create a classification table with the output of logistic regression as well, and once you have that you can compute the accuracy for all of the algorithms. To create a classification table you have to count the True Positive, True Negative, False Positive, and False Negative cases. You can look at this existing thread for tips on how to do it in R: Classification table for logistic regression in R

MRau
MRau
October 31, 2018 08:23 AM

Related Questions




online learning- winnow algorithm and mistake bound

Updated April 16, 2016 08:08 AM