Changeset 1268 for framspy/dissimilarity


Ignore:
Timestamp:
07/06/23 21:06:55 (17 months ago)
Author:
oriona
Message:

Coefficients indices changed to floats in range (0-1) to normalize frequency measure value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/dissimilarity/density-distribution.py

    r1267 r1268  
    282282        elif self.metric == 'emd':
    283283            if self.frequency:
    284                 num_points = len(s1)
    285                 dist_matrix = self.calculateDistanceMatrix(range(num_points),range(num_points))
     284                num_points = np.linspace(0, 1, len(s1), True)
     285                dist_matrix = self.calculateDistanceMatrix(num_points,num_points)
    286286            else:
    287287                dist_matrix = self.calculateDistanceMatrix(s1[0],s2[0])
Note: See TracChangeset for help on using the changeset viewer.