CSTR-Edinburgh / merlin

This is now the official location of the Merlin project.
http://www.cstr.ed.ac.uk/projects/merlin/
Apache License 2.0
1.31k stars 442 forks source link

Error with Minmax normalization #417

Open chazo1994 opened 5 years ago

chazo1994 commented 5 years ago

I changed output_feature_normalisation to MINMAX and got following error: MINMAX.dat Traceback (most recent call last): File "/data/thinhnv20/Projects/merlin-master-magphase/src/run_merlin.py", line 1270, in <module> main_function(cfg) File "/data/thinhnv20/Projects/merlin-master-magphase/src/run_merlin.py", line 725, in main_function feature_std_vector = numpy.array(global_std_vector[:,feature_index:feature_index+cfg.out_dimension_dict[feature_name]], 'float32') UnboundLocalError: local variable 'global_std_vector' referenced before assignment This issue same like #236 But no one resolved it.

ZackHodari commented 5 years ago

You could try adding the necessary conditions on cfg.output_feature_normalisation L775 (within NORMCMP and if not cfg.GenTestList). Currently this part of the code assumes that MVN would have been used, and doesn't account for MINMAX https://github.com/CSTR-Edinburgh/merlin/blob/master/src/run_merlin.py#L775