Re: [scikit-learn] Applying clustering to cosine distance matrix

2018-02-12 Thread prince gosavi
Will look into it.Although I have problem generating cluster as my data is 14000x14000 distance_matrix and it says "Memory Error". I have 6GB RAM. Any insight on this error is welcomed. Regards On Tue, Feb 13, 2018 at 3:19 AM, federico vaggi wrote: > [image: Boxbe]

Re: [scikit-learn] Applying clustering to cosine distance matrix

2018-02-12 Thread federico vaggi
As a caveat, a lot of clustering algorithms assume that the distance matrix is a proper metric. If your distance is not a proper metric then the results might be meaningless (the narrative docs do a good job of discussing this). On Mon, 12 Feb 2018 at 13:30 prince gosavi wrote: > Hi, > Thanks f

Re: [scikit-learn] Applying clustering to cosine distance matrix

2018-02-12 Thread prince gosavi
Hi, Thanks for those tips Sebastian.That just saved my day. Regards, Rajkumar On Tue, Feb 13, 2018 at 12:44 AM, Sebastian Raschka wrote: > [image: Boxbe] This message is eligible > for Automatic Cleanup! (se.rasc...@gmail.com) Add cleanup rule >

Re: [scikit-learn] Applying clustering to cosine distance matrix

2018-02-12 Thread Sebastian Raschka
Hi, by default, the clustering classes from sklearn, (e.g., DBSCAN), take an [num_examples, num_features] array as input, but you can also provide the distance matrix directly, e.g., by instantiating it with metric='precomputed' my_dbscan = DBSCAN(..., metric='precomputed') my_dbscan.fit(my_dis