-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I'm not sure this is the right place for this question. But here goes
I'm trying to code the maskedClusterQuality function in python and I'm having trouble replicating the mahal function outputs. Here is a sample of what I did.
PYTHON
`
import numpy
import scipy.io
x = numpy.random.normal(0,1,[100,12])
y = numpy.random.normal(17,1,[1000,12])
cov_x_inv = numpy.linalg.inv(numpy.cov(x,rowvar=False))
cdist = scipy.spatial.distance.cdist
md = cdist(y,x,'mahalanobis',cov_x_inv)
md_py = numpy.mean(md,axis=1)
scipy.io.savemat('D:\sample_feature.mat',dict(x=x,y=y,md=md,md_py=md_py))
`
MATLAB
load('D:\sample_features.mat') md_mat = mahal(y,x) plot(md_py,sqrt(md_mat),'ko')
Whats going on here?
Metadata
Metadata
Assignees
Labels
No labels
