May 2020
Intermediate to advanced
530 pages
17h 8m
English
In the Shogun library, the t-SNE algorithm is implemented in the CTDistributedStochasticNeighborEmbedding class. Objects of this class should be configured with the target number of dimensions and the set_target_dim() method. The fit() and transform() methods should be used for training and data dimensionality reduction, respectively:
void TSNEReduction(Some<CDenseFeatures<DataType>> features, const int target_dim) { auto tsne = some<CTDistributedStochasticNeighborEmbedding>(); tsne->set_target_dim(target_dim); tsne->fit(features); auto new_features = static_cast<CDenseFeatures<DataType> *>(tsne->transform(features)); auto feature_matrix = new_features->get_feature_matrix(); for (index_t i = 0; i < new_features->get_num_vectors(); ...Read now
Unlock full access