SteffenMoritz / ridge

CRAN R Package: Ridge Regression with automatic selection of the penalty parameter
GNU General Public License v2.0
18 stars 11 forks source link

Fix #7: predict.linearRidge does not work if formula goes out of scope #8

Closed dfrankow closed 4 years ago

dfrankow commented 4 years ago

Addresses https://github.com/SteffenMoritz/ridge/issues/7

codecov-io commented 4 years ago

Codecov Report

Merging #8 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master      #8   +/-   ##
======================================
  Coverage    3.41%   3.41%           
======================================
  Files          42      42           
  Lines        2955    2955           
======================================
  Hits          101     101           
  Misses       2854    2854
Impacted Files Coverage Δ
R/linearRidge.R 45.73% <100%> (ø) :arrow_up:
R/predict.ridgeLinear.R 80% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e8482e5...0146bd1. Read the comment docs.

dfrankow commented 4 years ago

The idea: the predict() interface without data predicts on the original data. This change adds the original data into the model at model$model_frame (named after model.frame()).