How does the Lasso function handle NaN values?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ty Lees
am 26 Sep. 2017
Beantwortet: David Fink
am 28 Sep. 2017
I have a dataset (assembled as a matrix) that I want to run perform LASSO regression on, however, as a processing step outliers are removed and marked as NaN.
My question is how does the LASSO function handle these NaN values, would it be worth me performing some level of imputation?
0 Kommentare
Akzeptierte Antwort
David Fink
am 28 Sep. 2017
The lasso function ignores all rows (observations) with NaN values.
This can be seen in the code for 'lasso' near line 240 where it checks isfinite() on each row.
>> open lasso
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!