Skip to content

Commit

Permalink
added silverman_h
Browse files Browse the repository at this point in the history
  • Loading branch information
seatonullberg committed Sep 18, 2018
1 parent bbe3f70 commit 0046c46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions visualization_apps/MgO_pareto/PCA/bandwidth_test.py
Expand Up @@ -5,7 +5,7 @@
from sklearn.cluster import KMeans, DBSCAN
from sklearn.manifold import TSNE
from pypospack.pyposmat.data.datafile import PyposmatDataFile
from pypospack.kde import chiu1999_h
from pypospack.kde import chiu1999_h, silverman1986_h


def angle_between(a1, a2):
Expand Down Expand Up @@ -50,7 +50,8 @@ def angle_between(a1, a2):

# check bandwidth of each cluster
for s in subselections:
print("Chiu Bandwidth: {}".format(chiu1999_h(s.values.T)))
print("Chiu Bandwidth: {c}\nSilverman Bandwidth: {s}\n".format(c=chiu1999_h(s.values.T),
s=silverman1986_h(s.values.T)))

print("\n")

Expand Down

0 comments on commit 0046c46

Please sign in to comment.