Machine Learning in R

Machine Learning in R#

Classification#

This tutorial walks you through a basic machine learning workflow in R using the Iris dataset. It covers data loading, preprocessing, and exploratory analysis, followed by splitting the data into training and testing sets. After scaling features, a Random Forest classifier is trained and evaluated using a confusion matrix. This notebook provides a clear, step-by-step introduction to classification with R.

Classification Tutorial

Regression#

This tutorial guides you through a complete regression workflow in R using the Iris dataset. It demonstrates how to load and explore the data, perform preprocessing like centering and scaling, and conduct exploratory data analysis to understand variable relationships. The dataset is then split into training and testing sets, and two regression models—Linear Regression and Random Forest—are trained to predict petal length based on other floral measurements and species. Finally, model performance is evaluated using metrics such as R-squared, Mean Absolute Error (MAE), and Mean Squared Error (MSE), offering a practical, hands-on introduction to regression modeling in R.

Regression Tutorial