简体   繁体   中英

Plot Decision Boundary for Scikit Logistic Regression with 7 Features

I'm implementing binary logistic regression with 7 features in Python with scikit-learn, and I want to plot the decision boundary for it (preferably in Matplotlib). I've seen this and this and this , but none of those work for me when I try to implement them; some require me to only train the model on two features, which I would not prefer.

Ideally, I would like to plot the boundary in both 2d and 3d, 2D

3D

but either would be fine.

You can not visualize data in dimensions greater than 3, as it is really hard to plot points that have more than 3 dimensions. Using color / hue maybe you get get up to 4 or 5. So even visualizing your data is impossible, let alone a decision function in this dimension. What do you mean by plotting the boundary in 2d or 3d?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM