Publications by John Cruz

Trees and Rules

15.04.2024

Required Libraries library(tidyverse) library(kableExtra) library(janitor) library(mlbench) library(caret) ## KNN library(latex2exp) library(AppliedPredictiveModeling) library(ggcorrplot) library(randomForest) library(party) library(gbm) library(Cubist) library(rpart) library(partykit) library(ipred) library(rpart.plot) 8.1 Recreate the simulated ...

6581 sym R (8965 sym/31 pcs) 5 img 13 tbl

Non-Linear Regression

04.04.2024

Required Libraries library(tidyverse) library(kableExtra) library(janitor) library(mlbench) library(caret) ## KNN library(latex2exp) library(earth) ## MARS library(AppliedPredictiveModeling) library(ggcorrplot) 7.2 Friedman (1991) introduced several benchmark data sets create by simulation. One of these simulations used the following nonlinear equ...

3527 sym R (20776 sym/49 pcs) 5 img 23 tbl

Linear Regression

01.04.2024

Required Libraries library(tidyverse) library(AppliedPredictiveModeling) library(kableExtra) library(latex2exp) library(caret) library(janitor) library(gridExtra) library(ggcorrplot) 6.2 Developing a model to predict permeability (see Sect. 1.4) could save significant resources for a pharmaceutical company, while at the same time more rapidly iden...

5530 sym R (12292 sym/38 pcs) 6 img 15 tbl

Crime

31.03.2024

Required Libraries library(ggplot2) library(tidyverse) library(knitr) library(ggcorrplot) library(caret) library(ROCR) library(MASS) library(summarytools) library(latex2exp) library(janitor) library(kableExtra) Introduction Our objective is to explore and build a binary logistic regression model on the training data set to predict whether the neig...

14288 sym R (16096 sym/15 pcs) 12 img 10 tbl

ATM and Power Forecasting

24.03.2024

Required Libraries library(fpp3) library(tidyverse) library(kableExtra) library(janitor) library(readxl) library(psych) library(cowplot) library(DescTools) library(latex2exp) Part A – ATM Forecast The goal is to forecast how much cash is taken out of four (4) different ATM machines for May 2010. We are given an Excel formatted spreadsheet contai...

10150 sym R (13692 sym/69 pcs) 30 img 23 tbl

ARIMA

18.03.2024

Required Libraries library(tidyverse) library(fpp3) library(kableExtra) library(cowplot) Problem 9.1 Figure 9.32 shows the ACFs for 36 random numbers, 360 random numbers and 1,000 random numbers. Explain the differences among these figures. Do they all indicate that the data are white noise? The differences among these figures are that the ACF r...

5911 sym R (9875 sym/46 pcs) 33 img 6 tbl

Exponential Smoothing

07.03.2024

Required Libraries library(tidyverse) library(fpp3) library(kableExtra) Problem 8.1 Consider the the number of pigs slaughtered in Victoria, available in the aus_livestock dataset. Use the ETS() function to estimate the equivalent model for simple exponential smoothing. Find the optimal values of \(\alpha\) and \(l_0\), and generate forecasts for...

5228 sym R (4793 sym/25 pcs) 15 img 8 tbl

Data Pre-Processing

26.02.2024

Required Libraries library(tidyverse) library(ggplot2) library(GGally) library(mlbench) library(psych) library(caret) library(missMethods) Problem 3.1 The UC Irvine Machine Learning Repository6 contains a data set related to glass identification. The data consist of 214 glass samples labeled as one of seven class categories. There are nine predict...

3686 sym R (2450 sym/13 pcs) 8 img 5 tbl

Forecasting

17.02.2024

Required Libraries library(fpp3) Problem 5.1 Produce forecasts for the following series using whichever of NAIVE(y), SNAIVE(y) or RW(y ~ drift()) is more appropriate in each case: Australian Population (global_economy) We don’t observe any seasonality, only a strong, positive linear trend. Using the RW() (random walk) drift function would be m...

3759 sym R (4821 sym/29 pcs) 16 img

Time Series Decomposition

12.02.2024

Required Libraries library(fpp3) library(gridExtra) Problem 3.1 Consider the GDP information in global_economy. Plot the GDP per capita for each country over time. Which country has the highest GDP per capita? How has this changed over time? The country with the highest GDP is Monaco, followed by Liechtenstein and Luxembourg. Since the start of th...

5430 sym R (6185 sym/26 pcs) 24 img 6 tbl