koalaverse / homlr

Supplementary material for Hands-On Machine Learning with R, an applied book covering the fundamentals of machine learning with R.
https://koalaverse.github.io/homlr
Creative Commons Attribution Share Alike 4.0 International
229 stars 88 forks source link

lambda needs to be defined (or estimated) in 3.2 section #42

Open cchanialidis opened 4 years ago

cchanialidis commented 4 years ago

y <- forecast::BoxCox(10, lambda) returns an error (since lambda has not been defined (or estimated) earlier).

Adding a line like lambda <- -0.03616899 would fix this issue. (Note that one can estimate the lambda by using the BoxCox.lambda function).