Mercurial > ift6266
comparison transformations/DistorsionGauss.py @ 159:e81241cfc2de
merge
author | Myriam Cote <cotemyri@iro.umontreal.ca> |
---|---|
date | Thu, 25 Feb 2010 09:05:48 -0500 |
parents | 7640cb31cf1f |
children |
comparison
equal
deleted
inserted
replaced
158:d1bb6e06497a | 159:e81241cfc2de |
---|---|
14 import numpy | 14 import numpy |
15 import random | 15 import random |
16 | 16 |
17 class DistorsionGauss(): | 17 class DistorsionGauss(): |
18 | 18 |
19 def __init__(self): | 19 def __init__(self,seed=3459): |
20 self.ecart_type=0.1 #L'ecart type de la gaussienne | 20 self.ecart_type=0.1 #L'ecart type de la gaussienne |
21 self.effectuer=1 #1=on effectue et 0=rien faire | 21 self.effectuer=1 #1=on effectue et 0=rien faire |
22 self.seed=seed | |
23 | |
24 #Les deux generateurs sont de types differents, avoir la meme seed n'a pas d'influence | |
25 #numpy.random.seed(self.seed) | |
26 #random.seed(self.seed) | |
22 | 27 |
23 def get_settings_names(self): | 28 def get_settings_names(self): |
24 return ['effectuer'] | 29 return ['effectuer'] |
30 | |
31 def get_seed(self): | |
32 return self.seed | |
25 | 33 |
26 def get_settings_names_determined_by_complexity(self,complexity): | 34 def get_settings_names_determined_by_complexity(self,complexity): |
27 return ['ecart_type'] | 35 return ['ecart_type'] |
28 | 36 |
29 def regenerate_parameters(self, complexity): | 37 def regenerate_parameters(self, complexity): |