If you are a newbie in the world of machine learning, then this tutorial is exactly what you need in order to introduce yourself to this exciting new part of the data science world.
This post includes a full machine learning project that will guide you step by step to create a “template,” which you can use later on other datasets.
Before proceeding, please follow our short tutorial.
Look at the examples given and try to understand the logic behind them. Then try to solve the exercises below using R and without looking at the answers. Then see the solutions to check your answers.
Create a list named “control” that runs a 10-fold cross-validation. HINT: Use
Use the metric of “Accuracy” to evaluate models.
Build the “LDA”, “CART”, “kNN”, “SVM” and “RF” models.
Create a list of the 5 models you just built and name it “results”. HINT: Use
Report the accuracy of each model by using the summary function on the list “results”. HINT: Use
Create a plot of the model evaluation results and compare the spread and the mean accuracy of each model. HINT: Use
Which model seems to be the most accurate?
Summarize the results of the best model and print them. HINT: Use
Run the “LDA” model directly on the validation set to create a factor named “predictions”. HINT: Use
Summarize the results in a confusion matrix. HINT: Use