File size: 433 Bytes
932b3cb
 
 
3cab2dd
932b3cb
 
 
 
 
 
 
 
3cab2dd
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from sklearn.model_selection import train_test_split
import numpy as np

from cluster.clusterer import Clusterer
# for determing which clustering funciton to call
from cluster.opts import clustering_methods


def main(
    X: np.array,
    y: np.array,
    args: dict,
) -> dict:
    cluster_alg: Clusterer = clustering_methods[args["algorithm"]]
    model = cluster_alg.main(X, args)
    model.eval(X, y)
    return model.to_dict()