Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.feature_selection import SelectFromModel
- #Logo regression with L1 and L2 penalty terms as feature selection of the base model
- #Parameter threshold is the threshold of the difference between the weight coefficients
- SelectFromModel(LR(threshold=0.5, C=0.1)).fit_transform(iris.data, iris.target)
Add Comment
Please, Sign In to add comment