def new(method='centroid',n_features=8):
# Clustering method
nc = METHODS[method]
# Orthogonal feature selector
if n_features is None: n_features = 'all'
selector = SelectKBest(f_classif, k=n_features)
# NOTE: The only last operation of the list
# must be a classifier or clustering model
print(colored('Cluster model created','yellow'))
return [selector, nc]
评论列表
文章目录