diff transformations/Occlusion.py @ 125:5d3a7a4e30e9

little changes in Rature and occlusion to fit with visualisation
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Thu, 18 Feb 2010 12:58:34 -0500
parents 999bf84ddec6
children a507adba0ce3
line wrap: on
line diff
--- a/transformations/Occlusion.py	Thu Feb 18 12:33:17 2010 -0500
+++ b/transformations/Occlusion.py	Thu Feb 18 12:58:34 2010 -0500
@@ -61,10 +61,10 @@
         return ['haut','bas','gauche','droite','x_arrivee','y_arrivee','endroit','rajout','appliquer']
 
     def regenerate_parameters(self, complexity):
-        self.haut=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
-        self.bas=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
-        self.gauche=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
-        self.droite=min(15,int(numpy.abs(numpy.random.normal(int(7*complexity),2))))
+        self.haut=min(15,int(numpy.abs(numpy.random.normal(int(8*complexity),2))))
+        self.bas=min(15,int(numpy.abs(numpy.random.normal(int(8*complexity),2))))
+        self.gauche=min(15,int(numpy.abs(numpy.random.normal(int(8*complexity),2))))
+        self.droite=min(15,int(numpy.abs(numpy.random.normal(int(8*complexity),2))))
         if self.haut+self.bas+self.gauche+self.droite==0:   #Tres improbable
             self.haut=1
             self.bas=1
@@ -76,7 +76,7 @@
         self.y_arrivee=int(numpy.random.normal(0,3)) 
         
         self.rajout=numpy.random.randint(0,self.longueur-1)  #les bouts de quelle lettre
-        self.appliquer=numpy.random.binomial(1,0.3)    #####  30 % du temps, on met une occlusion #####
+        self.appliquer=numpy.random.binomial(1,0.4)    #####  30 % du temps, on met une occlusion #####
         
         if complexity == 0: #On ne fait rien dans ce cas
             self.applique=0