Python Forum
ValueError: The condensed distance matrix must contain only finite values.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ValueError: The condensed distance matrix must contain only finite values.
#1
Hi, I am learning Python and I have the following code that gives me the following error:

ValueError: The condensed distance matrix must contain only finite values.

The code I have is:

hier_clust = linkage(segmentation_std, method='ward')
This seems to be very simple. I got the code from a course that I took and it works fine for the course data.

However, when I apply it to my own data (~500 data points with no duplication), I got this error. Can someone help?

I searched online and there are others who encountered the same issue. I still couldn't find the solution tho.

Thanks,
Sam
Reply
#2
show code in context, include full unmodified error traceback
use code tags
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Finite difference scheme in python erdemath 0 1,413 Nov-17-2021, 03:19 PM
Last Post: erdemath
  Could anyone help me get the jaccard distance between my dataframes please? :) a_real_phoenix 0 1,761 Jun-27-2019, 06:01 PM
Last Post: a_real_phoenix
  Clustering based on a variable and on a distance matrix flucoe 2 6,226 Dec-16-2018, 09:57 PM
Last Post: flucoe

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020