Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a wrapper for the t-SNE DR method; added an integration test fo…
…r it (black-listed for now).
- Loading branch information
1 parent
c88afbf
commit 5a2df25
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
.../undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
from tools.load import LoadMatrix | ||
|
||
lm=LoadMatrix() | ||
data = lm.load_numbers('../data/fm_train_real.dat') | ||
|
||
parameter_list = [[data]] | ||
|
||
def converter_tdistributedstochasticneighborembedding_modular(data): | ||
try: | ||
from shogun.Features import RealFeatures | ||
from shogun.Converter import TDistributedStochasticNeighborEmbedding | ||
|
||
features = RealFeatures(data) | ||
|
||
converter = TDistributedStochasticNeighborEmbedding() | ||
converter.set_target_dim(2) | ||
|
||
embedding = converter.apply(features) | ||
|
||
return embedding | ||
except ImportError: | ||
print('No Eigen3 available') | ||
|
||
if __name__=='__main__': | ||
print('TDistributedStochasticNeighborEmbedding') | ||
converter_tdistributedstochasticneighborembedding_modular(*parameter_list[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters