Neha gupta
2019-Dec-22 23:54 UTC
[R] all the MAE metric values are missing (Error message)
Hi Jim The objective function is passed to san_res where we have defined the 4 parameters of gbm and the values are initialized in san_res. The output variable price has only three values: 0, 1, 2 (like categorical values), so someone told me try to remove the log10 from the price. I am not sure what to do, I spent two days but did not fix this issue. On Sun, Dec 22, 2019 at 11:22 PM Jim Lemon <drjimlemon at gmail.com> wrote:> Hi Neha, > The error message looks suspicious, as it refers to "all the MAEs" > while there is only one NA value in the summary. I would carefully > check the object that you are passing to san_res. > > Jim > > On Mon, Dec 23, 2019 at 4:17 AM Neha gupta <neha.bologna90 at gmail.com> > wrote: > > > > I am using the following code to tune the 4 parameters of Gradient > Boosting > > algorithm using Simulated annealing (optim). When I run the program, > after > > few seconds it stops and displays the following error: > > > > I point out here that the same code works for RF ( mtry parameter) and > SVM > > (cost and sigma parameters). So, I guess the problem should be in the 4 > > parameters of GBM > > > > Something is wrong; all the MAE metric values are missing: > > RMSE Rsquared MAE > > Min. : NA Min. : NA Min. : NA > > 1st Qu.: NA 1st Qu.: NA 1st Qu.: NA > > Median : NA Median : NA Median : NA > > Mean :NaN Mean :NaN Mean :NaN > > 3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA > > Max. : NA Max. : NA Max. : NA > > NA's :1 NA's :1 NA's :1 > > >[[alternative HTML version deleted]]
Hi Neha, Well, that's a clue to why you are getting NAs: log10(0) [1] -Inf Another possibility is that the values used in the initial calculation have been read in as factors. Jim On Mon, Dec 23, 2019 at 10:55 AM Neha gupta <neha.bologna90 at gmail.com> wrote:> > Hi Jim > > The objective function is passed to san_res where we have defined the 4 parameters of gbm and the values are initialized in san_res. > > The output variable price has only three values: 0, 1, 2 (like categorical values), so someone told me try to remove the log10 from the price. >
Neha gupta
2019-Dec-23 11:45 UTC
[R] all the MAE metric values are missing (Error message)
Hi Jim, Another possibility is that the values used in the initial calculation have been read in as factors Which calculation you are talking about? I did not use factors as variable. Regards On Mon, Dec 23, 2019 at 3:12 AM Jim Lemon <drjimlemon at gmail.com> wrote:> Hi Neha, > Well, that's a clue to why you are getting NAs: > > log10(0) > [1] -Inf > > Another possibility is that the values used in the initial calculation > have been read in as factors. > > Jim > > On Mon, Dec 23, 2019 at 10:55 AM Neha gupta <neha.bologna90 at gmail.com> > wrote: > > > > Hi Jim > > > > The objective function is passed to san_res where we have defined the 4 > parameters of gbm and the values are initialized in san_res. > > > > The output variable price has only three values: 0, 1, 2 (like > categorical values), so someone told me try to remove the log10 from the > price. > > >[[alternative HTML version deleted]]