How does the Lasso function handle NaN values?

조회 수: 10 (최근 30일)
Ty Lees
Ty Lees 2017년 9월 26일
답변: David Fink 2017년 9월 28일
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?

채택된 답변

David Fink
David Fink 2017년 9월 28일
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개)

카테고리

Help CenterFile Exchange에서 Linear Regression에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by