标签:code setw style dmi mod eric 数据挖掘 == tab
带包实现:
rm(list=ls()) setwd("C:/Users/Administrator/Desktop/R语言与数据挖掘作业/实验4-人工神经网络") Data=read.csv("sales_data.csv")[,2:5] library(nnet) colnames(Data)<-c("x1","x2","x3","y") model1=nnet(y~.,data=Data,size=6,decay=5e-4,maxit=1000) pred=predict(model1,Data[,1:3],type="class") (p=sum(as.numeric(pred==Data$y))/nrow(Data)) table(Data$y,pred) prop.table(table(Data$y,pred),1)
标签:code setw style dmi mod eric 数据挖掘 == tab
原文地址:https://www.cnblogs.com/caiyishuai/p/9928186.html