I am creating a model for a binary classification problem where each of my data points has 300 dimensions (I use 300 functions). I am using PassiveAggressiveClassifier from sklearn. The model works very well.
I want to build the boundary of the solution model. How can i do this?
To get an idea of ββthe data, I draw it in 2D using TSNE. I reduced the size of the data in 2 stages - from 300 to 50, then from 50 to 2 (this is a general recommendation). Below is a snippet of code for it:
from sklearn.manifold import TSNE from sklearn.decomposition import TruncatedSVD X_Train_reduced = TruncatedSVD(n_components=50, random_state=0).fit_transform(X_train) X_Train_embedded = TSNE(n_components=2, perplexity=40, verbose=2).fit_transform(X_Train_reduced)

I get a decent schedule.
Is there a way that I can add a solution border to this graph that represents the actual solution border of my model in 300x space?
python scikit-learn machine-learning plot data-science
Anuj gupta
source share