决策树c语言程序代码,R C5.0 决策树c50代码,名为 exit 1_r_开发99编程知识库

我收到以下错误

c50代码,名为 exit exit exit

我是根据Kaggle提供的泰坦尼克数据做# Importing datasets

train

# this is the structure

str(train)

输出:-'data.frame': 891 obs. of 12 variables:

$ PassengerId: int 1 2 3 4 5 6 7 8 9 10.. .

$ Survived : int 0 1 1 1 0 0 0 0 1 1.. .

$ Pclass : int 3 1 3 1 3 3 1 3 3 2.. .

$ Name : Factor w/891 levels"Abbing, Mr. Anthony",..: 109 191 358 277 16 559 520 629 417 581.. .

$ Sex : Factor w/2 levels"female","male": 2 1 1 1 2 2 2 2 1 1.. .

$ Age : num 22 38 26 35 35 NA 54 2 27 14.. .

$ SibSp : int 1 1 0 1 0 0 0 3 0 1.. .

$ Parch : int 0 0 0 0 0 0 0 1 2 0.. .

$ Ticket : Factor w/681 levels"110152","110413",..: 524 597 670 50 473 276 86 396 345 133.. .

$ Fare : num 7.25 71.28 7.92 53.1 8.05.. .

$ Cabin : Factor w/148 levels"","A10","A14",..: 1 83 1 57 1 1 131 1 1 1.. .

$ Embarked : Factor w/4 levels"","C","Q","S": 4 2 4 4 4 3 4 4 4 2.. .

然后我尝试使用 C5.0 dtree# Trying with C5.0 decision tree

library(C50)

#C5.0 models require a factor outcome otherwise error

train$Survived

new_model

所以运行上面的行给我这个错误c50 code called exit with value 1

我无法找出发生了什么? 我在不同的数据集中使用类似的代码,它工作正常。 关于如何调试代码的任何想法?

-Thanks

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值