Publications by Michael Darkoh
MS 5333
Problem 1 KNN classifier is usually used to solve classification problems that is those with a qualitative response, by identifying the neighborhood of the study variable Xo and then the estimation of the conditional probability namely of \(P(Y = j|X = x_0)\) is made, for the class \(j\), as a fraction of points in the neighborhood whose response...
3167 sym 4 img
Assignment 2
Problem 1 a) library(ISLR) ## Warning: package 'ISLR' was built under R version 4.1.1 library(corrplot) ## Warning: package 'corrplot' was built under R version 4.1.1 ## corrplot 0.92 loaded summary(Weekly) ## Year Lag1 Lag2 Lag3 ## Min. :1990 Min. :-18.1950 Min. :-18.1950 Min. :...
4000 sym R (13842 sym/97 pcs) 3 img
MS 5333 Assignment 4
Problem 1 a) The k-fold cross validation is implemented by taking the amount of observations, n, and randomly splitting them into k, non-overlapping groups of length of approximately n/k. These groups acts as a validation set, and the remainder acts as a training set. The test error is then estimated by averaging the k resulting MSE estimates. b)...
2742 sym R (7204 sym/43 pcs)
MS 5333 Assignment 5
Problem 1 a) The lasso, relative to least squares, is: More flexible and hence will give improved prediction accuracy when its increase in bias is less than its decrease in variance. More flexible and hence will give improved prediction accuracy when its increase in variance is less than its decrease in bias. Less flexible and hence will give i...
3190 sym R (11965 sym/58 pcs) 6 img
MS-5333-Assignment 6
library(fpp2) library(AppliedPredictiveModeling) library(mlbench) library(tidyverse) library(ggplot2) library(gridExtra) library(caret) library(randomForest) library(seasonal) library(psych) library(corrplot) library(knitr) library(kableExtra) Problem 1 a) #Polynomial regression library(ISLR) library(boot) ## ## Attaching package: 'boot' ## The...
598 sym R (7108 sym/25 pcs) 5 img
MS 5333 Assignment 7
library(fpp2) library(AppliedPredictiveModeling) library(mlbench) library(tidyverse) library(ggplot2) library(gridExtra) library(caret) library(randomForest) library(seasonal) library(psych) library(corrplot) library(knitr) library(kableExtra) Problem 1 a) Gini index, classification error, and entropy in a simple classification setting with two ...
1541 sym R (8682 sym/59 pcs) 8 img
MS 5333 Assignment 8
library(fpp2) library(AppliedPredictiveModeling) library(mlbench) library(tidyverse) library(ggplot2) library(gridExtra) library(caret) library(randomForest) library(seasonal) library(psych) library(corrplot) library(knitr) library(kableExtra) Problem 1 a) #A data set with n = 500 and p = 2, such that the observations belong to two classes with ...
442 sym R (10488 sym/44 pcs) 26 img