<h2 dir="auto">Hi there,<br>
I am new to python and machine learning. I am facing the problem for the following code. Can anybody suggest me what should be done to remove the error. Thanks in advance .<br>
Seaborn version:0.9.0<br>
Python: 3.6.0<br>
Code:</h2>
<h2 dir="auto">sns.distplot(d_p,color="skyblue", label="Distribution of neighbour image distances in route produced with GD")<br>
# plt.savefig('dis_p.png')#distribution of distance of neighbour images(real frames) in route<br>
sns.distplot(d_m,color="red", label="Distribution of neighbour image distances in route manually sellected")<br>
plt.legend()<br>
plt.savefig('disroute.png')#distribution of distance of neighbour images(real frames) in manually selected route<br>
plt.clf()<br>
sns.distplot(d_p_latent,color="skyblue", label="Distribution of neighbour pair distances in path produced with GD")<br>
plt.savefig('distance_p_latent.png')#<br>
plt.clf()<br>
sns.distplot(d_m_latent,color="red", label="Distribution of neighbour pair distances in path w.r.t. manually selected route")<br>
plt.legend(loc=2, fontsize = 'x-small')<br>
plt.savefig('dis_m_lnt.png')</h2>
<p dir="auto">Error:<br>
#########<br>
ile "C:\VAE_learning-a-representation-for-navigation-master\navigation_function.py", line 546, in evaluate<br>
sns.distplot(d_p,color="skyblue", label="Distribution of neighbour image distances in route produced with GD")<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\seaborn\distributions.py", line 231, in distplot<br>
kdeplot(a, vertical=vertical, ax=ax, color=kde_color, **kde_kws)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\seaborn\distributions.py", line 691, in kdeplot<br>
cumulative=cumulative, **kwargs)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\seaborn\distributions.py", line 294, in _univariate_kdeplot<br>
x, y = _scipy_univariate_kde(data, bw, gridsize, cut, clip)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\seaborn\distributions.py", line 366, in _scipy_univariate_kde<br>
kde = stats.gaussian_kde(data, bw_method=bw)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\scipy\stats\kde.py", line 172, in <strong>init</strong><br>
self.set_bandwidth(bw_method=bw_method)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\scipy\stats\kde.py", line 499, in set_bandwidth<br>
self._compute_covariance()<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\scipy\stats\kde.py", line 510, in _compute_covariance<br>
self._data_inv_cov = linalg.inv(self._data_covariance)<br>
File "C:\Users\Anaconda3\envs\reti\lib\site-packages\scipy\linalg\basic.py", line 975, in inv<br>
raise LinAlgError("singular matrix")<br>
numpy.linalg.LinAlgError: singular matrix</p>
<p dir="auto">'LinAlgError: singular matrix' error pops up when trying to call the pairplot() function.</p>