|
pyclustering
0.10.1
pyclustring is a Python, C++ data mining library.
|
3 @brief pyclustering module for samples.
5 @authors Andrei Novikov (pyclustering@yandex.ru)
7 @copyright BSD-3-Clause
14 @brief Answer reader for samples that are used by pyclustering library.
20 @brief Creates instance of answer reader to read proper clustering results of samples.
22 @param[in] answer_path (string): Path to clustering results (answers).
32 @brief Read proper clustering results.
34 @return (list) Clusters where each cluster is represented by list of index point from dataset.
43 @brief Read proper clustering results
45 @return (list) Noise where each outlier is represented by index point from dataset.
54 @brief Read proper cluster lengths.
55 @details Cluster length means amount of point in a cluster.
57 @return (list) Cluster lengths where each length means amount of points in a cluster.
61 return [len(cluster)
for cluster
in clusters]
64 def __read_answer_from_line(self, index_point, line):
66 @brief Read information about point from the specific line and place it to cluster or noise in line with that
69 @param[in] index_point (uint): Index point that should be placed to cluster or noise.
70 @param[in] line (string): Line where information about point should be read.
75 self.
__noise.append(index_point)
77 index_cluster = int(line)
81 self.
__clusters[index_cluster].append(index_point)
84 def __read_answer(self):
86 @brief Read information about proper clusters and noises from the file.
def get_clusters(self)
Read proper clustering results.
def __init__(self, answer_path)
Creates instance of answer reader to read proper clustering results of samples.
def get_noise(self)
Read proper clustering results.
def get_cluster_lengths(self)
Read proper cluster lengths.
Answer reader for samples that are used by pyclustering library.
def __read_answer(self)
Read information about proper clusters and noises from the file.
def __read_answer_from_line(self, index_point, line)
Read information about point from the specific line and place it to cluster or noise in line with tha...