You are right Jeff, that was a mistake, I was focusing on the square root
and made the mistake of talking about taking the square root instead of
raising to the 2nd power.
This is the example I was following (
https://www.youtube.com/watch?v=SaQgA6V8UA4). Of course, I tried fitting
the nnet model
The problem seems to be the fit rather than the predictions. Looks like nnet is
happier with data between 0 and 1, witness
Fit <- nnet(y/max(y) ~ x, a, size = 5, maxit = 1000, lineout = T, decay = 0.001)
plot(y/max(y)~x,a)
lines(fitted(Fit)~x,a)
> On 2 Sep 2020, at 16:21 , Paul Bernal wrote:
>
Why would you expect raising y_pred to the 0.5 to "backtransform" a model
sqrt(y)~x? Wouldn't you raise to the 2?
Why would you "backtransform" x in such a model if it were never transformed in
the first place? Dr Maechler did not suggest that.
And why are you mentioning some random unspecified
Dear Dr. Martin and Dr. Peter,
Hope you are doing well. Thank you for your kind feedback. I also tried
fitting the nnet using y ~ x, but the model kept on generating odd
predictions. If I understand correctly, from what Dr. Martin said, it would
be a good idea to try modeling sqrt(y) ~ x and then
> peter dalgaard
> on Wed, 2 Sep 2020 08:41:09 +0200 writes:
> Generically, nnet(a$y ~ a$x, a ...) should be nnet(y ~ x,
> data=a, ...) otherwise predict will go looking for a$x, no
> matter what is in xnew.
> But more importantly, nnet() is a _classifier_,
> s
Generically, nnet(a$y ~ a$x, a ...) should be nnet(y ~ x, data=a, ...)
otherwise predict will go looking for a$x, no matter what is in xnew.
But more importantly, nnet() is a _classifier_, so the LHS should be a class,
not a numeric variable.
-pd
> On 1 Sep 2020, at 22:19 , Paul Bernal wrote
Dear friends,
Hope you are all doing well. I am currently using R version 4.0.2 and
working with the nnet package.
My dataframe consists of three columns, FECHA which is the date, x, which
is a sequence from 1 to 159, and y, which is the number of covid cases (I
am also providing the dput for thi
7 matches
Mail list logo