<div dir="ltr"><div class="gmail_default" style="font-size:small">Mahalanobis is always tricky, the covariance is between the features, not the samples. This works:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">OPTICS(metric='mahalanobis',metric_params={'VI': np.linalg.inv(np.cov(test_array.T))}).fit(test_array)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Not sure why it wouldn't work when you pass V, as it suggests as an alternative.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 31, 2019 at 12:16 PM Omkar Kumbhar <<a href="mailto:omkar.kumbhar@innoplexus.com">omkar.kumbhar@innoplexus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div dir="ltr" class="gmail-m_2239683791937064453gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,</div><div dir="ltr"><br></div><div dir="ltr">I was having issues while fitting OPTICS using Mahalanobis metric. I tried many things and had a hard time fitting it to my data distribution. </div><div dir="ltr">I have replicated the issue in the ipython notebook below. You could also take a look at the html version of the notebook to look at the issues. Can you guide me on how to resolve this bug?</div><div dir="ltr"><br></div><div dir="ltr">PFA,</div><div dir="ltr">ipython notebook to replicate the issue</div><div dir="ltr">html of ipynb to look at stack traces. <br><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="2" face="tahoma, sans-serif">Thanks & Regards,<br><br>Omkar Kumbhar</font></div><div><font size="2" face="tahoma, sans-serif">Associate Data Scientist</font></div><font face="tahoma, sans-serif"><div>Innoplexus Consulting Services Pvt. Ltd.</div><div><a href="http://www.innoplexus.com/" style="color:rgb(17,85,204)" target="_blank">www.innoplexus.com</a></div></font><div><font size="2" face="tahoma, sans-serif">Mob : +91- 9579464473</font></div><div><div><span style="font-size:12.8px">Landline: </span><span dir="ltr" style="font-size:12.8px"><span dir="ltr"><span style="color:rgb(80,0,80);font-size:12.8px">+91-20-66527300</span><img width="0" height="0"></span></span><span style="font-family:verdana,sans-serif"><img></span></div><div style="font-size:12.8px"><div style="font-size:12.8px"><br></div></div><div><p><img style="width: 1.325in; height: 0.2583in;" width="127" height="25" border="0"><u></u><u></u></p><p><span style="font-size:9pt;font-family:Muli;color:rgb(255,193,0)" lang="EN-US">The Intelligence Machine<sup>TM</sup></span><span style="font-size:9pt;font-family:Muli;color:rgb(119,119,119)" lang="EN-US"> that is disrupting the traditional data and analytics services model</span></p></div><div><br></div></div><div><div></div><div><font size="1">© 2011-19 Innoplexus Consulting Services Pvt. Ltd. <br></font></div><div><div><font size="1"><br></font></div><div><font size="1">Unless otherwise explicitly stated, all rights including those in copyright in the content of this e-mail are owned by Innoplexus Consulting Services Pvt Ltd. and all related legal entities. The contents of this e-mail shall not be copied, reproduced, or transmitted in any form without the written permission of Innoplexus Consulting Services Pvt Ltd or that of the copyright owner. The receipt of this mail is the acknowledgement of the receipt of contents; if the recipient is not the intended addressee then the recipient shall notify the sender immediately. </font></div><div><font size="1"><br></font></div><div><font size="1">The contents are provided for information only and no opinions expressed should be relied on without further consultation with Innoplexus Consulting Services Pvt Ltd. and all related legal entities. While all endeavors have been made to ensure accuracy, Innoplexus Consulting Services Pvt. Ltd. makes no warranty or representation to its accuracy, completeness or fairness and persons who rely on it do so entirely at their own risk. The information herein may be changed or withdrawn at any time without notice. Innoplexus Consulting Services Pvt. Ltd. will not be liable to any client or third party for the accuracy of the information supplied through this service.</font></div><div><font size="1"><br></font></div><div><font size="1">Innoplexus Consulting Services Pvt. Ltd. accepts no responsibility or liability for the contents of any other site, whether linked to this site or not, or any consequences from your acting upon the contents of another site.</font></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br><div><div></div></div></div></div></div><br><img><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>

<br>
<a href="https://www.innoplexus.com/news/bio-international-convention" target="_blank"><img></a>_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>