home/modeling/application/r

// modeling · application

Modeling in R

R is a great tool for creating models as it allows creating models using a majority of the algorithms explored in the Theory section. In this section, models are created in a Supervised and Unsupervised Learning setup along with Time Series Forecasting models.

R code and process monitor for building models

Various kinds of models can be created using R for solving Regression and Classification problems. Linear and Logistic Regression models can easily be created in R, while libraries such as glmnet allow for performing regularised Linear and Logistic Regression. rpart allows creating Decision Tree models, while caret facilitates creating a KNN model. Similar libraries are used for handling Classification problems, where ANN, SVM and Naive Bayes are also explored. Various Ensemble methods such as Bagging, Boosting and Stacking are also implemented using R. For Regression problems, the Boston Dataset has been used, while for Classification problems, the Titanic dataset has been put to use.

For Clustering, R provides inbuilt functions such as kmeans and hclust, with libraries such as dbscan for creating a DBScan Clustering model (using the Iris dataset without the dependent variable). For Dimensionality Reduction, the Boston dataset has been used for implementing Principal Component Analysis and Factor Analysis, while for Anomaly Detection, the Iris dataset has been used for creating Kernel Density Estimation and Isolation Forest models.

The Air Passengers dataset has been used for creating various Time Series models, using Averaging techniques, Smoothening techniques, Time Series decomposition, and ARIMA methods for forecasting.

Supervised Learning Models

Regression Problems

glmnetrpartcaret

Classification Problems

ANNSVMNaive Bayes

Unsupervised Learning Models

Clustering Problems

kmeanshclustdbscan

Dimensionality Reduction

PCAFactor Analysis

Anomaly Detection

Kernel Density EstimationOne Class SVM

Time Series Forecasting

Time Series

AveragingSmootheningARIMA
ESC
100 pages indexed · Esc to close