1

for my homework I need to write a regression model of the Boston housing data using MLP as learner and apply regularization (l1 - lasso, l2 - ridge, l1_l2 - elastic net).

I found the keras package and some information on classification problems, however nothing to regression models in R.

Anyone any tips on how to start? or how I can accomplish this? I did lot of research but did not find anything helpful for R.

Any help is very much appreciated!

Best, M

MLU
  • 59
  • 7
  • Have you read the documentation for the keras package? https://keras.rstudio.com/articles/tutorial_overfit_underfit.html – Wil Mar 29 '19 at 12:33
  • Thank you for the quick response. Yes I did read the keras package and I also used it. However, there was not much documentation on it, which made things a bit more complicated. However, I ended up also using the ANN2 package. I did experience some troubles installing it, I had to install a different version of rcppAmardillo first and then it would run. – MLU Apr 02 '19 at 22:05
  • What was the documentation missing that you were interested in? It discusses L1 and L2 regularization as well as regression. I think it even has an example using the Boston housing data. – Wil Apr 03 '19 at 01:02
  • Hi Wil, thanks for getting back to me. You are right, there were some discussions about L1 and L2 and a basic example to the Boston housing data. However, since I am new to this topic I would have wished more explanation. The regularization was described and also shown in an example, but it would have been great to see different examples with some explanation how changes would influence the results. The reg used in the example of your link was L2 = 0.005 which is almost 0 and therefore almost no reg. why? for example The link you provided was very helpful and the information there as well. – MLU Apr 03 '19 at 14:42
  • Understood. [StackOverflow](https://stackoverflow.com/help/on-topic) is focused on programming related questions, such as the implementation of Keras. If your question is about how regularization influences model performance, and other parameter optimization and model selection questions, those are off-topic for StackOverflow and more appropriate for [CrossValidated](https://stats.stackexchange.com/help/on-topic) – Wil Apr 03 '19 at 22:52
  • I see, thanks for the information. I am quite new to stack overflow so I was not aware of that, but now I know. Thank you again for your effort and help. – MLU Apr 04 '19 at 09:03
  • No problem. Though there are rules/guidelines for what is on and off topic, there are occasional grey areas. Especially regarding statistics questions in R, it can definitely be the case that the question is valid on both sites. The links I sent should help in understanding if one site is better than the other for your question, and in some cases it’s important to choose one site or another not because one site is “right”, but because one site will have the right people that give you a better chance of getting the answer that you seek. – Wil Apr 04 '19 at 13:58

0 Answers0