stock price prediction by using nnet

前端 未结 1 1300
小鲜肉
小鲜肉 2021-01-25 23:04
stock<-structure(list(week = c(1L, 2L, 5L, 2L, 3L, 4L, 3L, 2L, 1L, 5L, 
        1L, 3L, 2L, 4L, 3L, 4L, 2L, 3L, 1L, 4L, 3L), 
    close_price = c(774000L, 
        85         


        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-25 23:49

    I think I could do a bit better with a reproducible example but I think the problem may be one (or more) of several reasons. Firstly, do a str(data) to make sure each variable is of the correct type (factor, numeric, etc.). Also, Neural Nets usually respond better to standardized, scaled, and centered data otherwise the inputs get oversaturated with larger numeric inputs which might be the case if the 'week' variable is numeric.

    In summary, definitely check the types of each variable to make sure you are inputting the correct forms and consider scaling your data to be smooth and so the inputs are of comparable magnitudes.

    0 讨论(0)
提交回复
热议问题