介绍
这篇文章主要介绍R语言逻辑回归的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
<强>逻辑回归强>
祝辞,# # # # # # # # # # # # # # #逻辑回归 祝辞,setwd(“/用户/yaozhilin/下载/R_edu/data") 祝辞,accepts<-read.csv (“accepts.csv") 祝辞,名字(接受) ,[1]“application_id",“account_number",“bad_ind",,,,“vehicle_year",,“vehicle_make", ,[6]“bankruptcy_ind",“tot_derog",,,“tot_tr",,,,,“age_oldest_tr",“tot_open_tr",, [11],“tot_rev_tr",,,“tot_rev_debt",,“tot_rev_line",,“rev_util",,,,“fico_score",, [16],“purch_price",,“msrp",,,,,,“down_pyt",,,,“loan_term",,,“loan_amt",,, [21],“ltv",,,,,,“tot_income",,,“veh_mileage",,“used_ind",,, 祝辞,accepts<接受[complete.cases(接受),) 祝辞,select<样本(1:nrow(接受),长度(接受application_id美元)* 0.7) 祝辞,train<接受(选择)# # # 70%用于建模 祝辞,test<接受(选择)# # # 30%用于检测 祝辞,附加(火车) 祝辞,# # #用glm (y ~ x、家庭=二项(链接=發ogit")) 祝辞,gl<强>多元逻辑回归强>
祝辞,# # #多元逻辑回归 祝辞,glsR语言逻辑回归的示例分析