models

Deploying R Model as API Web Service using Docker and Microsoft Azure

Objective Our goal here is to create a R Model and put-in into production by deploying it as web service API using Docker to containerize (encapsulate) it and Microsoft Azure to host it. R Model To create the model, we going to use mtcars dataset which one’s is present inside R. head(mtcars) ## mpg cyl disp hp drat wt qsec vs am gear carb ## Mazda RX4 21.0 6 160 110 3.

Continue reading

Credit Card Fraud Detection

Objective Our goal is to train a Neural Network to detect fraudulent credit card transactions in a dataset referring to two days transactions by european cardholders. Source: https://www.kaggle.com/mlg-ulb/creditcardfraud/data Data credit = read.csv(path) The datasets contains transactions made by credit cards in September 2013 by european cardholders. This dataset presents transactions that occurred in two days. As we can see, this dataset consists of thirty explanatory variables, and a response variable which represents whether a transation was a fraud or not.

Continue reading

Exponential Smoothing Model

Introduction The main idea here is breaking the ice in terms of exponential smoothing models First of all it is importan to show some behaviours patterns usually found in time series Trends: it is usually observed when the time series follow one specific direction. It can be linear or not. Seasonality: it is a pattern that repeat in a certain times (specific period) Cycle: Like seasonality but it appears in non specific time

Continue reading

Linear Regression

Data We are using the MASS library that contains the Boston dataset. These records measure the median house value for 506 neighborhoods around Boston. library(MASS) data <- MASS::Boston fix(Boston) names(Boston) ## [1] "crim" "zn" "indus" "chas" "nox" "rm" "age" ## [8] "dis" "rad" "tax" "ptratio" "black" "lstat" "medv" A simple Linear Regression We are using the lm() function to fit a simple linear regression model. The medv is a response variable and lstat the predictor variable.

Continue reading