def M_intraClasses(self,classList):
somme1 = 0.0
#for each class in the classlist
for i in range(0,len(classList)):
#take a cluster
cluster = classList[i].getListOfGraphems()
s1 = []
#now for each element in the cluster ( s1 is f(x,y) which contains values, so s1 will contain vectors instead of values)
for sommet in range(0,len(cluster)):
s1.append(self.sub[sommet,:])
#take fmax and fmin
fmax = amax(s1)
fmin = amin(s1)
#compute the standard deviation divided by fmax - fmin
somme1 += std(s1)**2/(((fmax - fmin)**2 + self.epsilon)/2.0)
#since the intra-region uniformity should be low i maximize it but taking 1 out of it.
uniforme = 1.0-(somme1/float(len(classList)))
return uniforme
Title | # Comments | Views | Activity |
---|---|---|---|
Are there experts in experts exchange that have expertise in SPSS? | 24 | 431 | |
C#: Searching duplicate letters in a string | 7 | 153 | |
More Advanced Dialog Problem in VC++ | 25 | 164 | |
What is a good method for incrementing a string sequence from "A" to "ZZZZ" in C# or vb.Net? | 17 | 77 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!