mlxtend icon indicating copy to clipboard operation
mlxtend copied to clipboard

Highlighting Nearest vectors to the plane

Open mountains-high opened this issue 2 years ago • 1 comments

Describe the workflow you want to enable

Hi there~ It will be great if we add "Highlighting Nearest support vectors to the plane".

Describe your proposed solution

Something like this: New_feature

Describe alternatives you've considered, if relevant

MLxtend has a "Highlighting Test Data Points" feature. highlighting the test data

Additional context

No. Thank you for making a great source.

mountains-high avatar Mar 26 '22 13:03 mountains-high

That's an interesting and nice recommendation. I would almost suggest making a separate function out of this. The reason is that the plot_decision_regions is a model agnostic method. I.e., it works with any type of classifier. For a linear SVM, we can implement this more efficiently based on the decision_function. But on the other hand, there seems to be already a solution for this that doesn't require too much code, so I am not sure if it is worthwhile adding: https://scikit-learn.org/stable/auto_examples/svm/plot_linearsvc_support_vectors.html#sphx-glr-auto-examples-svm-plot-linearsvc-support-vectors-py

rasbt avatar Mar 26 '22 15:03 rasbt