Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Statistics Cookbook

You're reading from  R Statistics Cookbook

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789802566
Pages 448 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Francisco Juretig Francisco Juretig
Profile icon Francisco Juretig

Table of Contents (12) Chapters

Preface Getting Started with R and Statistics Univariate and Multivariate Tests for Equality of Means Linear Regression Bayesian Regression Nonparametric Methods Robust Methods Time Series Analysis Mixed Effects Models Predictive Models Using the Caret Package Bayesian Networks and Hidden Markov Models Other Books You May Enjoy

Classification in caret and ROC curves

Classification models are harder to evaluate than regression models, because when we are classifying labels, we might have a severe imbalance. If, for example, we were predicting whether people are going to finish their university degrees or not, and 50% of people finish their degrees, the accuracy would be an ideal metric. But what happens when we have 95% of people finishing their degrees? In that case, the accuracy will be a very bad metric (maybe the model explains most of that 95% well, but doesn't work for the other 5% of the data).

There are several ways of assessing how well a classification model works that consider class imbalance. Apart from all these metrics, we can work with either ROC and precision-recall curves that allow us to choose a model that has the right performance for each label.

Remember that most classification...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}