For a neural network to work, predictors and responses are needed. The case is that with the missing values of the answers it works but for that I have to set the missing values of the predictors as 0's. If both are 0's it also works, but if both are NaN it does not work.
Cleaning data for machine learning
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
FERNANDO CALVO RODRIGUEZ
le 14 Mar 2023
Commenté : FERNANDO CALVO RODRIGUEZ
le 31 Mar 2023
Hey!
I am trying to clean up the missing data described as NaN for a regression using the neural network fitnet function. The thing is that these missing values for each observation I have, I don't know them and I can't remove them because I would lose the meaning. I know that in python it can be done with a pandas drop function, but in matlab I don't know how to do it without getting an error in the neural network.
If someone knows something, it would be appreciated.
3 commentaires
Luca Ferro
le 14 Mar 2023
Modifié(e) : Luca Ferro
le 14 Mar 2023
It's not quite clear to me if you want to remove the NaNs or replace them with 0s.
In any case, it would be very useful if you could share the data
Réponse acceptée
Vijeta
le 28 Mar 2023
Hi Fernando,
One way to handle missing data (NaN values) in a regression problem using the fitnet function in MATLAB is to impute the missing values with some reasonable estimate before feeding the data into the neural network. There are several methods for imputing missing values, such as mean imputation, median imputation, and regression imputation.
- A graphical user-friendly MATLAB interface is presented here: the Missing Data Imputation (MDI) Toolbox.
- MDI Toolbox allows imputing incomplete datasets, following missing completely at random pattern.
- Different state-of-the-art methods are included in the toolbox, such as trimmed scores regression and data augmentation
You can refer to the following documentation: https://www.mathworks.com/help/deeplearning/ref/fitnet.html?s_tid=srchtitle_fitnet_1
Thanks.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Gaussian Process Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!