Re: [R] How to use preProcess in Caret?

2019-12-05 Thread Burak Kaymakci
Hello there,

Yes, I'd tried scale as well. I mean, I could do my preprocessing
separately and it was working fine.
I was just wondering how preProcess argument in train function works. As
far as I know, when preProcess argument is set, it normalizes inputs but
not outputs.

Then I've figured we could also use recipes and that normalizes both
predictors and outcomes as you wish.

Here

you can take a look at the question I've asked on SO.
You can see the use of recipe in comments below by "missuse".

I will read the link you've shared as well.

Thank you,
Burak


William Michels , 4 Ara 2019 Çar, 21:04 tarihinde
şunu yazdı:

> Hello,
>
> Have you tried alternative methods of pre-processing your data, such
> as simply calling scale()? What is the effect on convergence, for both
> the caret package and and the neuralnet package? There's an example
> using scale() with the neuralnet package at the link below:
>
> https://datascienceplus.com/fitting-neural-network-in-r/
>
> HTH, Bill.
>
> W. Michels, Ph.D.
>
>
>
> On Sun, Dec 1, 2019 at 10:04 AM Burak Kaymakci 
> wrote:
> >
> > Hello there,
> >
> > I am using caret and neuralnet to train a neural network to predict times
> > table. I am using 'backprop' algorithm for neuralnet to experiment and
> > learn.
> >
> > Before using caret, I've trained a neuralnet without using caret, I've
> > normalized my input & outputs using preProcess with 'range' method. Then
> I
> > predicted my test set, did the multiplication and addition on predictions
> > to get the real values. It gave me good results.
> >
> > What I want to ask is, when I try to train my network using caret, I get
> an
> > error saying algorithm did not converge. I am thinking that I might be
> > doing something wrong with my pre-processing,
> >
> > How would I go about using preProcess in train?
> > Do I pass my not-normalized data set to the train function and train
> > function handles normalization internally?
> >
> > You can find my R gist here
> > 
> >
> > Thank you,
> > Burak
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to use preProcess in Caret?

2019-12-04 Thread William Michels via R-help
Hello,

Have you tried alternative methods of pre-processing your data, such
as simply calling scale()? What is the effect on convergence, for both
the caret package and and the neuralnet package? There's an example
using scale() with the neuralnet package at the link below:

https://datascienceplus.com/fitting-neural-network-in-r/

HTH, Bill.

W. Michels, Ph.D.



On Sun, Dec 1, 2019 at 10:04 AM Burak Kaymakci  wrote:
>
> Hello there,
>
> I am using caret and neuralnet to train a neural network to predict times
> table. I am using 'backprop' algorithm for neuralnet to experiment and
> learn.
>
> Before using caret, I've trained a neuralnet without using caret, I've
> normalized my input & outputs using preProcess with 'range' method. Then I
> predicted my test set, did the multiplication and addition on predictions
> to get the real values. It gave me good results.
>
> What I want to ask is, when I try to train my network using caret, I get an
> error saying algorithm did not converge. I am thinking that I might be
> doing something wrong with my pre-processing,
>
> How would I go about using preProcess in train?
> Do I pass my not-normalized data set to the train function and train
> function handles normalization internally?
>
> You can find my R gist here
> 
>
> Thank you,
> Burak
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.