Hi, i'm trying to do the House Price Prediction (dataset from Kaggle), i want to use the lasso régression and the redige régression. But the probleme is that after using model.matrix, the number of columns reduced. I've already checked my dataset, i don't have any NA value. So is there any other raison that this situation happen? Can some one please help me to resolve this probleme, thank you a lot !
Here it the link of this dataset : House Prices - Advanced Regression Techniques | Kaggle
Here is what i do to the train dataset and the same thing to the test dataset ： I only use the numeric variables and removed the ones with a lot of NA values. I just want to practice lasso and ridge régression.
Then, here is what i do to transform my data frame to matrix.
train_x <- model.matrix(SalePrice~., data = PBdata[, -SalePrice]) train_y <- PBdata$SalePrice
 1259 34  1259 30