From ff1c5978a087757ce2487732fe1a823612cfcaae Mon Sep 17 00:00:00 2001 From: "vladislav.horbatiuk@gmail.com" Date: Thu, 23 May 2013 14:12:56 +0300 Subject: [PATCH 1/2] Refactored converter_tdistributedstochasticneighborembedding_modular.py test and un-blacklisted it; re-generated data for this test. --- data | 2 +- ...ter_tdistributedstochasticneighborembedding_modular.py | 8 +++++++- tests/integration/python_modular/generator.py | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data b/data index afe8adad2b7..4fdad64be26 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit afe8adad2b7dd633f94e2e20a9b0269db03aa16c +Subproject commit 4fdad64be26e4bde9121cb4c2b7c4f69a889d391 diff --git a/examples/undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py b/examples/undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py index 328a062f4da..3efce2809da 100644 --- a/examples/undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py +++ b/examples/undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py @@ -1,16 +1,22 @@ #!/usr/bin/env python from tools.load import LoadMatrix +from numpy import random lm=LoadMatrix() data = lm.load_numbers('../data/fm_train_real.dat') parameter_list = [[data]] -def converter_tdistributedstochasticneighborembedding_modular(data): +def converter_tdistributedstochasticneighborembedding_modular(data, seed=1): try: from shogun.Features import RealFeatures from shogun.Converter import TDistributedStochasticNeighborEmbedding + from shogun.Mathematics import Math_init_random + # reproducible results + Math_init_random(seed) + random.seed(seed) + features = RealFeatures(data) converter = TDistributedStochasticNeighborEmbedding() diff --git a/tests/integration/python_modular/generator.py b/tests/integration/python_modular/generator.py index 088eb5bf74a..f8b74f28e3f 100755 --- a/tests/integration/python_modular/generator.py +++ b/tests/integration/python_modular/generator.py @@ -9,7 +9,6 @@ blacklist = ("__init__.py", "classifier_libsvm_minimal_modular.py", "classifier_multiclassocas_modular.py", - "converter_tdistributedstochasticneighborembedding_modular.py", "modelselection_grid_search_kernel.py", "serialization_string_kernels_modular.py", "kernel_fisher_modular.py", From 6bb51d7844d2597b4035911dac470ab8e797ff24 Mon Sep 17 00:00:00 2001 From: "vladislav.horbatiuk@gmail.com" Date: Thu, 23 May 2013 16:38:42 +0300 Subject: [PATCH 2/2] Fixed data file for converter_tdistributedstochasticneighborembedding_modular.py test. --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index 4fdad64be26..dace2ce3691 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 4fdad64be26e4bde9121cb4c2b7c4f69a889d391 +Subproject commit dace2ce36911bb1897a10aa7cda9be594bc8a94e