I am trying to visualize my data, which I will classify later, (I am using this post as a starting point: https://jmetzen.github.io/2015-01-29/ml_advice.html) using seaborn.
Firstly, I created pandas DataFrame out of my data which has 31 rows (the number of datapoints + the row with features names) and 94 columns (the ids in the first column, class labels in the last, and the rest are features values). Originally my data was sparse, but I densed it as pandas didn't want to make DataFrame out of a sparse matrix (or I didn't figure out how).
So as far as I can see, the data is okay and is not causing the problem. Then I try to plot it using pairplot.
df = DataFrame(np.hstack((frd, nl[:, None])), columns = list(range(frd.shape[1]))+ ["class"]))
sns.pairplot(df, hue="class", size=1.5)
But this code would never finish running. It doesn't throw an error, it just never ends. And no image is generated.
I've seen in some posts that one should use %matplotlib inline
. If I pass it in the command line like this ipython --matplotlib inline myscript.py
nothing changes. If I put it inside the script
import matplotlib.pyplot as plt
import seaborn as sns
from pandas import DataFrame
%matplotlib inline
I get SyntaxEerror: invalid syntax.
I am using ipython.
Thanks!