Plot confusion matrix using ggplot2
Course link : https://www.learngeom.com/2023/10/r-ggplot2-Cmatrix.html
Website link : https://www.learngeom.com
fb page link : https://www.facebook.com/elbouhali.geo
fb groupe link : https://www.facebook.com/groups/geomaticsdataea
################
Confusion matrix
Confusion matrix represents the difference between the actual and predicted classifications of a model. It is used to easily recognize how often a classification system mislabels one classification as another.
A confusion matrix is a table that is used to define the performance of a classification algorithm. A confusion matrix visualizes and summarizes the performance of a classification algorithm.
Confusion matrix is a table used in machine learning and statistics to assess the performance of a classification model.
Run the packages
Note that packages must be installed only once, whereas packages must be loaded every time you open R.
Packages used :
* library(ggplot2) * library(scales) * library(caret) * library(dplyr) * library(viridis)
Open data
In R, we can read data into various file formats like csv, excel, xml etc. In this video, we will learn how to read data from a csv file. The file should be present in current working directory so that R can read it. Of course, we can also set our own directory and read files from there.
as. factor function
as. factor() function in R Programming Language is used to convert the passed object(usually Vector) into a Factor. Parameters: Object: Vector to be converted.
What is the function of confusion matrix in R ?
In R Programming the Confusion Matrix can be visualized using confusionMatrix() function which is present in the caret package. where, data – a factor of predicted classes. reference – a factor of classes to be used as the true results.
Plot confusion matrix using ggplot2
The script below is ready for use, but you can change:
- Accuracy and kappa index ;
- scale fill ;
- scale x discrete labels ;
- scale y discrete labels ; - geom text display : percent or total
Plot confusion matrix using ggplot2,
confusion matrix in r,
confusion matrix ggplot2,
plot confusion matrix in r,
confusion matrix rstudio,
confusion matrix,
confusion matrix شرح,
confusion matrix r,
ggplot2 confusion matrix,
r confusion matrix,
rstudio confusion matrix,
how to visualize confusion matrix r,
Plot a confusion matrix in r,
How can I plot a confusion matrix,
Plot confusion matrix r using ggplot,
Plot confusion matrix ggplot
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Plot confusion matrix using ggplot2», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.