Media is too big
VIEW IN TELEGRAM
▪️▫️▪️▫️▪️▫️▪️▫️◾️
🔘کار باBig Data با استفاده از نرم افزار R
#Big_data #R
🔹با ما همراه باشید و یک متخصص علم داده شوید
╭──•═✾🔘✾═•──╮
••• @Data_Experts •••
╰──•═✾🔝✾═•──╯
▪️▫️▪️▫️▪️▫️
🔘کار باBig Data با استفاده از نرم افزار R
#Big_data #R
🔹با ما همراه باشید و یک متخصص علم داده شوید
╭──•═✾🔘✾═•──╮
••• @Data_Experts •••
╰──•═✾🔝✾═•──╯
▪️▫️▪️▫️▪️▫️
Forwarded from Deleted Account
#R_COD
@R_Experts
@Data_Experts
https://telegram.me/Data_Experts
https://telegram.me/R_Experts
deeper.tree<- rpart(INCOME_C4 ~ ., data = train.data3[,-1], method = "class", cp = .00001, minsplit =5)
options(digits=8)
printcp(deeper.tree)
which.min(deeper.tree$cptable[,"xerror"])
options(digits=8)
X.E=deeper.tree$cptable[8:19,"xerror"]
options(digits=8)
X.S=deeper.tree$cptable[8:19,"xstd"]
CP.OPT=X.E+X.S
which.min(CP.OPT)
OPT.POINT=abs(deeper.tree$cptable[c(1:9,11:29),"xerror"] -deeper.tree$cptable[10,"xerror"])
which.min(OPT.POINT)
cv.tree31<-rpart(INCOME_C4~.,data = train.data3[,-1] ,method = "class",
cp = 0.005876592, minsplit =5,xval =5, model=TRUE)
prp(cv.tree31,type =0,extra = 1,under = T,split.font = 1,
varlen = -10,cex=.7,box.palette=c("mediumvioletred"))
cv.tree31.pred.train <- predict(cv.tree31,train.data3[,-1],type = "class")
confusionMatrix(cv.tree31.pred.train,train.data3[,-1]$INCOME_C4)
cv.tree31v<-rpart(INCOME_C4~., data = valid.data3[,-1] ,method = "class", cp =0.005876592 , minsplit =5,
xval =5, model=TRUE)
prp(cv.tree31v,type =0,extra = 1,under = T,split.font = 1,
varlen = -10,cex=.7,box.palette=c("mediumvioletred"))
#Validation
cv.tree31.pred.valid <- predict(cv.tree31v,valid.data3[,-1],type = "class")
confusionMatrix(cv.tree31.pred.valid,valid.data3[,-1]$INCOME_C4)
@R_Experts
@Data_Experts
https://telegram.me/Data_Experts
https://telegram.me/R_Experts
Telegram
Data Experts
_______________
Related channel :
@R_Experts
________________
Contact us :
@javad_vhd
@farzadHEYdaryy
________________
Instagram: data_experts
Web: dataexperts.ir
Related channel :
@R_Experts
________________
Contact us :
@javad_vhd
@farzadHEYdaryy
________________
Instagram: data_experts
Web: dataexperts.ir
➖➖➖➖➖➖➖➖➖➖➖
🔘تمرین تابع نویسی در R
◽️ تابعی بنویسید که یک بردار از داده ها دریافت کند هر درایه بردار را چک کند در صورت زوج بودن در بردار دلخواه مثلا e و در صورت فرد بودن در بردار o ذخیره کند و در اخر هر سه بردار را نمایش دهد
➖➖➖➖➖➖➖➖➖➖➖
#R
➖➖➖➖➖➖➖➖➖➖➖
🔘تمرین تابع نویسی در R
◽️ تابعی بنویسید که یک بردار از داده ها دریافت کند هر درایه بردار را چک کند در صورت زوج بودن در بردار دلخواه مثلا e و در صورت فرد بودن در بردار o ذخیره کند و در اخر هر سه بردار را نمایش دهد
➖➖➖➖➖➖➖➖➖➖➖
#R
eo<-function(x){🔰 @Data_Experts
o<-c();e<-c()
for(i in 1:length(x)){
if(x[i]%%2==0){e<-c(e,x[i])}
else{o<-c(o,x[i])}
}
xs<-list(odd=o,even=e)
xs
}
x<-c(21,1,20,14,45,87,31,25,69)
eo(x)
➖➖➖➖➖➖➖➖➖➖➖
➖➖➖➖➖➖➖➖➖➖➖