Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
183 views
in Technique[技术] by (71.8m points)

r - Why the function seed returns this problem: unused argument (seed = 12345)?

I am trying to split the data into training, validation, and test sets, with the h2o package, following the code in this link: https://www.r-bloggers.com/2017/09/hr-analytics-using-machine-learning-to-predict-employee-turnover/.

Running this code:

split_h2o <- h2o.splitFrame(DatiRev_h2o, c(0.7, 0.15), seed = 12345 )

It returns the following error : "Error in h2o.splitFrame(DatiRev_h2o, c(0.7, 0.15), seed = 12345) : unused argument (seed = 12345)".

Can someone please explain why?

Thanks for the help

question from:https://stackoverflow.com/questions/65850262/why-the-function-seed-returns-this-problem-unused-argument-seed-12345

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I was not able to reproduce the error. Are you sure that's the exact code that produced the error? It looks like it's picking up an extra ( somehow (maybe you had a typo and then you fixed it?).

Here's the same code, as a reproducible example (which is working):

library(h2o)

h2o.init()

hf <- as.h2o(iris)
split_h2o <- h2o.splitFrame(hf, c(0.7, 0.15), seed = 12345)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...