예제 #1
0
import numpy as np

# add the paths necessary for clustering algorithm and ibcc - currently only works on Greg's computer
if os.path.exists("/home/ggdhines"):
    sys.path.append(
        "/home/ggdhines/PycharmProjects/reduction/experimental/clusteringAlg")
else:
    sys.path.append("/home/greg/github/reduction/experimental/clusteringAlg")

from agglomerativeClustering import Ward
from divisiveKmeans import DivisiveKmeans

clusterAlg2 = DivisiveKmeans().__fit__
clusterAlg = Ward().__fit__

penguin = PenguinAggregation()
subject_ids = pickle.load(
    open(aggregation.base_directory + "/Databases/penguin_gold.pickle", "rb"))

X1 = []
Y1 = []
X2 = []
Y2 = []
Z1 = []
Z2 = []
nonEmpty = 0
index = -1
random.shuffle(subject_ids)
while True:
    index += 1
    #for i,subject in enumerate(random.sample(subject_ids,50)):
예제 #2
0
import matplotlib.pyplot as plt
import numpy as np

# add the paths necessary for clustering algorithm and ibcc - currently only works on Greg's computer
if os.path.exists("/home/ggdhines"):
    sys.path.append(
        "/home/ggdhines/PycharmProjects/reduction/experimental/clusteringAlg")
else:
    sys.path.append("/home/greg/github/reduction/experimental/clusteringAlg")

from agglomerativeClustering import Ward
from divisiveKmeans import DivisiveKmeans

clusterAlg2 = DivisiveKmeans().__fit__

dkmeans = PenguinAggregation(clustering_alg=DivisiveKmeans().__fit__)
agglomerative = PenguinAggregation(clustering_alg=Ward().__fit__)
subject_ids = pickle.load(
    open(aggregation.base_directory + "/Databases/penguin_gold.pickle", "rb"))

X1 = []
Y1 = []
X2 = []
Y2 = []
Z1 = []
Z2 = []
nonEmpty = 0
index = -1
random.shuffle(subject_ids)
while True:
    index += 1