r caret 包中训练函数的模型输出尺寸很大 [英] huge size in model output from train function in r caret package
问题描述
我正在使用 r caret 包中的 train()
函数训练 bagFDA 模型,并将模型输出保存为 .Rdata 文件.输入文件大约有 300k 条记录,包含 26 个变量,但输出 .Rdata 的大小为 3G.我只是运行以下:
I am training a bagFDA model using train()
function in r caret package, and save the model output as a .Rdata file. the input file is about 300k records with 26 variables, but the output .Rdata has a size of 3G. I simply run the following:
modelout <- train(x,y,method="bagFDA")
save(file= "myout.Rdata", modelout)
在窗口系统下.问题:(1)为什么myout.Rdata
这么大?(2) 如何减小文件大小?
under a window system.
question: (1) why myout.Rdata
is so big? (2) how can I reduce the size of the file?
提前致谢!
JT
推荐答案
在 trainControl
中为初学者设置 returnData = FALSE
,这样你就不会创建额外的副本模型中的数据.我的理解是使用 bagFDA 您正在创建许多引导程序,它们基本上创建了相同数量的数据副本.降低 B 参数,默认为 50,也应该缩小它另外,看看这篇文章:
In the trainControl
set returnData = FALSE
for starters, so your not creating an extra copy of the data in the model. My understanding is the with bagFDA you are creating a number of bootstraps, which essentially create the same number of copies of your data. lowering the B parameter, defaulted to 50, should shrink it as well
Also, check out this post:
这篇关于r caret 包中训练函数的模型输出尺寸很大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!