Publications by Destinee Redfearn
Project 4, Heart Failure
#Predicting survival of patients with heart failure. This is a classification problem. #Import the dataset library(readr) heartFailure <- read_csv("C:/Users/dnred/OneDrive/Desktop/CS 583/heartFailure.csv") ## Rows: 299 Columns: 13 ## ── Column specification ───────────────────────────�...
177 sym R (65013 sym/171 pcs) 3 img
4-30 Comparing Performance
library(mlbench) ## Warning: package 'mlbench' was built under R version 4.3.3 library(caret) ## Warning: package 'caret' was built under R version 4.3.3 ## Loading required package: ggplot2 ## Loading required package: lattice data("PimaIndiansDiabetes") #prepare training scheme trainControl <- trainControl(method="repeatedcv", number=10, repea...
33 sym R (3894 sym/25 pcs) 5 img
Accuracy test, Classwork 4-23
#load the packages library(caret) ## Warning: package 'caret' was built under R version 4.3.3 ## Loading required package: ggplot2 ## Loading required package: lattice library(klaR) ## Warning: package 'klaR' was built under R version 4.3.3 ## Loading required package: MASS #load the iris dataset data(iris) #define 80%/20% train/test split of t...
20 sym R (5901 sym/17 pcs)
Regression Analysis
#upload the data library(readxl) ## Warning: package 'readxl' was built under R version 4.3.3 AgeHeight <- read_excel("C:/Users/dnred/Downloads/AgeHeight.xlsx") View(AgeHeight) #create a linear model lmHeight <- lm(height~age, data=AgeHeight) #review the results summary(lmHeight) ## ## Call: ## lm(formula = height ~ age, data = AgeHeight)...
38 sym R (7245 sym/31 pcs) 4 img
Titanic Analysis
library(readr) At238b <- read_csv("https://goo.gl/At238b") ## Rows: 1309 Columns: 14 ## ── Column specification ──────────────────────────────────────────────────────── ## Delimiter: "," ## chr (8): pclass, name, sex, ticket, cabi...
57 sym R (12741 sym/51 pcs) 3 img
Classwork 4-9
library(e1071) ## Warning: package 'e1071' was built under R version 4.3.3 data(iris) set.seed(1234) rndSample <- sample(1:nrow(iris), 100) tr <- iris[rndSample, ] ts <- iris[-rndSample, ] s <- svm(Species ~ ., tr) ps <- predict (s, ts) (cm <- table(ps, ts$Species)) ## ## ps setosa versicolor virginica ## setosa ...
30 sym R (10039 sym/27 pcs)
Classwork 4-2
#defining dataset train <- data.frame(ClaimID = c(1,2,3), RearEnd = c(TRUE, FALSE, TRUE), Fraud = c(TRUE, FALSE, TRUE)) train ## ClaimID RearEnd Fraud ## 1 1 TRUE TRUE ## 2 2 FALSE FALSE ## 3 3 TRUE TRUE #specify the model formula, data, and method parameters #classify the feature Fraud using the predictor Re...
56 sym R (7241 sym/46 pcs) 7 img
Decision Trees
library(dplyr) ## Warning: package 'dplyr' was built under R version 4.3.3 ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(readr) library(C50) ## Warning: package 'C...
50 sym R (64786 sym/47 pcs)
Project 2 Draft
Import the dataset library(readr) schoolExpenditure <- read_csv("C:/Users/dnred/Downloads/schoolExpenditure.csv") ## Rows: 220 Columns: 14 ## ── Column specification ──────────────────────────────────────────────────────── ## Delim...
892 sym R (62227 sym/141 pcs) 16 img
KNN_SupervisedLearning_Classification
library(readr) wisc_bc_data <- read_csv("C:/Users/dnred/Downloads/wisc_bc_data.csv") ## Rows: 569 Columns: 32 ## ── Column specification ──────────────────────────────────────────────────────── ## Delimiter: "," ## chr (1): diagn...
40 sym R (20622 sym/37 pcs)