美文网首页
Logistic回归

Logistic回归

作者: Socrates1024 | 来源:发表于2016-11-24 18:26 被阅读0次
    library(ggplot2)
    library(lattice)
    library(kernlab)
    library(caret)
    
    train <- createDataPartition(y=iris$Species, p=0.75, list=FALSE)
    training <- iris[train,]
    testing <- iris[-train,]
    
    library(nnet)
    
    iris.logistic <- multinom(Species ~ ., data = training)
    table(predict(iris.logistic, testing, type="class"), testing$Species)
    

    相关文章

      网友评论

          本文标题:Logistic回归

          本文链接:https://www.haomeiwen.com/subject/hpzbpttx.html