Publications by Lila Ghemri

Credit_DecisonTrees. Lila Ghemri

17.10.2022

library(dplyr) ## ## 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 'C50' was built under R version 4.2.1 library(gmodels) ## Wa...

63 sym R (64768 sym/47 pcs)

MarkdownTest

31.10.2022

library(mlbench) ## Warning: package 'mlbench' was built under R version 4.2.1 library(ggplot2) ## Warning: package 'ggplot2' was built under R version 4.2.1 data(iris) head(iris, 10) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 ...

138 sym R (1311 sym/8 pcs) 1 img

Iris_RegressionTrees

04.11.2022

rpartXse() combines two steps : 1) Growing the regression trees 2)Post-pruning them. Trees in rpart are grown until one of the 3 conditions is satisfied 1) decrease in the error of the current node is less than a threshold (cp), 2) the number of samples in a node is less than a specified threshold(minsplit) 3) the tree depth exceeds a specif...

2440 sym 3 img

ChurnDatasetTrees

19.11.2022

Loading all required libraries R Markdown str(MChurn) ## tibble [5,000 × 20] (S3: tbl_df/tbl/data.frame) ## $ state : Factor w/ 51 levels "AK","AL","AR",..: 17 36 32 36 37 2 20 25 19 50 ... ## $ account_length : int [1:5000] 128 107 137 84 75 118 121 147 117 141 ... ## $ area_code : ...

4648 sym 5 img

RMarkdown Test

21.11.2022

set.seed(1234) randDat<-matrix(rnorm(50), nrow=5) x<-seq(-10, 10, by =.1) y<-dnorm(x, mean=2.5, sd=0.5) plot(x,y) dist(randDat) #Euclidian Distance default ## 1 2 3 4 ## 2 4.261667 ## 3 4.038030 2.060117 ## 4 3.456732 3.726399 4.037978 ## 5 5.307253 4.41...

196 sym 2 img

Random Forest-Weather(rattle)

21.12.2022

R Markdown weatherDS<-new.env() evalq({ data(weather) data<-na.omit(weather) nobs<-nrow(data) form<-formula(RainTomorrow ~.) target<-all.vars(form)[1] vars<- -grep('^(Date|Location|RISK_)', names(data)) set.seed(42) train<-sample(nobs, 0.7*nobs) }, weatherDS) weatherRF<-new.env(parent=weatherDS) evalq({ Tdata<-data[...

40 sym

A6_Part2

23.12.2022

R Markdown data("PimaIndiansDiabetes") str(PimaIndiansDiabetes) ## 'data.frame': 768 obs. of 9 variables: ## $ pregnant: num 6 1 8 1 0 5 3 10 2 8 ... ## $ glucose : num 148 85 183 89 137 116 78 115 197 125 ... ## $ pressure: num 72 66 64 66 40 74 50 0 70 96 ... ## $ triceps : num 35 29 0 23 35 0 32 0 45 0 ... ## $ insulin : num...

42 sym R (7442 sym/26 pcs)