作者RickSanchez (Wubba lubba dub-dub)
看板Python
标题[问题] Confusion Matrix 取资料问题
时间Tue Oct 29 00:57:56 2019
大大们好
先承认这是学校作业一部分
个人程式背景薄弱
想要询问一下我有一笔资料features
每次拿一笔资料当作test资料,剩下当作train资料,跑N次
这部分用for回圈写
前面我写 for i in features:
test = i
再来我就不知道要怎麽把剩下的features的存train里面去了
网路上不太知道这个关键子要怎麽下
所以来这边询问
先谢谢大家
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 123.195.195.38 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1572281878.A.16E.html
1F:推 fiorentino: train = feature[:300] 10/29 08:23
2F:→ fiorentino: test = feature[300:] 10/29 08:23
3F:推 TitanEric: 这不是confusion matrix呀 10/29 09:36
4F:嘘 robert09080: 标题问混淆矩阵,内容问切割串列 10/29 10:26
5F:推 penut85420: train=features[:i] + features[i+1:] 10/29 11:58
6F:推 ciaoPTT: 以上用slice 我只会train=0.8 10/29 13:43