Argument x of the train function

19 Views Asked by At

I'm working on predicting some time series values ​​for the production of an article through the neural network models fed forward. To do this, I needed to establish the hyperparameters through the grid.search function.

However, after successfully applying the expand.grid() function, I am a little confused by the "x" argument in the train() function. I really don't know how to work this argument.

I expected to get the ideal hyperparameters for my model after running the train() function. However, I'm stuck on the x argument of the command. I'm also confused about the database format. Whether it needs to be a database or a vector, for example...

Below is the code I have been working on, where my database is a dataframe:

train_control = trainControl(method = "cv", number = 5, search = "grid")
Grid <-  expand.grid( p = c(3,9,12,15,18), size = c(2,4,6,8,12))
print(Grid)

model = train(x, data = modelocestabasicadf, method = 'nnetar', 
        trControl = train_control, tuneGrid = Grid)

I appreciate any help.

0

There are 0 best solutions below