8c1fb3d50a2ffc6216d1f3ed4f783bcf0c0e8ea2,test/unit_test/test_kmeans_model.py,,,#,244
Before Change
// ------------------------- Special test suite --------------------------------
// Create test DTM.
dtm_empty = pd.DataFrame()
// Create test id temp label map.
id_temp_label_map_empty = {}
// Create front end option for voronoi.
// noinspection PyTypeChecker
front_end_option_special = KMeansOption(
viz="wrong",
n_init=10,
k_value=2,
max_iter=100,
tolerance=1e-4,
init_method=KMeansInit.k_means
)
// Pack all test components.
test_option_empty = KMeansTestOptions(
doc_term_matrix=dtm_empty,
front_end_option=front_end_option_special,
id_temp_label_map=id_temp_label_map_empty
)
// Create empty K-Means test.
test_empty = KMeansModel(test_options=test_option_empty)
// -----------------------------------------------------------------------------
// Create dtm special.
dtm_special = pd.DataFrame(data=[[1, 2], [1, 2]],
index=[0, 1],
columns=["A", "B"])
// Create test id temp label map.
id_temp_label_map_special = {0: "F1.txt", 1: "F2.txt"}
// Create special front end option.
test_option_special = KMeansTestOptions(
doc_term_matrix=dtm_special,
front_end_option=front_end_option_special,
id_temp_label_map=id_temp_label_map_special
)
// Create special K-Means test.
test_special = KMeansModel(test_options=test_option_special)
After Change
// ------------------------- 3D scatter test suite -----------------------------
dtm_threeD = pd.DataFrame(
data=np.array([(100, 100, 100, 100, 100, 200, 900, 100),
(100, 200, 200, 100, 300, 100, 600, 100),
(10, 300, 400, 100, 200, 400, 700, 1000),
(100, 400, 100, 100, 100, 100, 100, 100)]),
index=np.array([0, 1, 2, 3]),
columns=np.array(["A", "B", "C", "D", "E", "F", "G", "H"]))
// Create test id temp label map.
id_temp_label_map_threeD = \
{0: "F1.txt", 1: "F2.txt", 2: "F3.txt", 3: "F4.txt"}
// Create test front end option for 3D.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 45
Instances
Project Name: WheatonCS/Lexos
Commit Name: 8c1fb3d50a2ffc6216d1f3ed4f783bcf0c0e8ea2
Time: 2018-06-18
Author: cusanelli_krisandra@wheatoncollege.edu
File Name: test/unit_test/test_kmeans_model.py
Class Name:
Method Name:
Project Name: WheatonCS/Lexos
Commit Name: 6472faf3787ff54159f6bc6441054f31bc8340e2
Time: 2018-06-18
Author: cusanelli_krisandra@wheatoncollege.edu
File Name: test/unit_test/test_kmeans_model.py
Class Name:
Method Name:
Project Name: WheatonCS/Lexos
Commit Name: 8c1fb3d50a2ffc6216d1f3ed4f783bcf0c0e8ea2
Time: 2018-06-18
Author: cusanelli_krisandra@wheatoncollege.edu
File Name: test/unit_test/test_kmeans_model.py
Class Name:
Method Name:
Project Name: WheatonCS/Lexos
Commit Name: d1dd828fc580e7388625bf6ad5ab4495783e2139
Time: 2018-06-18
Author: cusanelli_krisandra@wheatoncollege.edu
File Name: test/unit_test/test_kmeans_model.py
Class Name:
Method Name: