rfr = RandomForestRegressor(random_state=seed) tsne1 = TSNE(random_state=seed) pred_tsne_rfr = PredictableTSNE(transformer=tsne1, estimator=rfr, keep_tsne_outputs=True) pred_tsne_rfr.fit(trainFP, list(range(len(trainFP))) pred1 = pred_tsne_rfr.transform(testFP) plt.clf() plt.figure...
import numpy as np import matplotlib.pyplot as plt from hdbscan import HDBSCAN # Generate data test_data = np.array([ [0.0, 0.0], [1.0, 1.0], [0.8, 1.0], [1.0, 0.8], [0.8, 0.8]]) # HDBSCAN np.random.seed(1) hdb_unweighted = HDBSCAN(min_cluster_size=3, gen_min_span_tree=Tr...
(hdbscan.validity.validity_index, greater_is_better=True) SEED = 42 n_iter_search = 20 random_search = RandomizedSearchCV(model2, param_distributions=param_dist, n_iter=n_iter_search, scoring=validity_scorer, random_state=SEED) random_search.fit(mp_matrix) print(f"Best Parameters {random_...