@@ -118,15 +118,15 @@ class BNlearnAlgorithm(GraphModel):
118118 """
119119
120120 def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
121- optim = False , verbose = None ):
121+ optim = False , verbose = None , algorithm = None ):
122122 """Init the model."""
123123 if not RPackages .bnlearn :
124124 raise ImportError ("R Package bnlearn is not available." )
125125 super (BNlearnAlgorithm , self ).__init__ ()
126126 self .arguments = {'{FOLDER}' : '/tmp/cdt_bnlearn/' ,
127127 '{FILE}' : os .sep + 'data.csv' ,
128128 '{SKELETON}' : 'FALSE' ,
129- '{ALGORITHM}' : None ,
129+ '{ALGORITHM}' : algorithm ,
130130 '{WHITELIST}' : os .sep + 'whitelist.csv' ,
131131 '{BLACKLIST}' : os .sep + 'blacklist.csv' ,
132132 '{SCORE}' : 'NULL' ,
@@ -312,10 +312,11 @@ class GS(BNlearnAlgorithm):
312312 >>> plt.show()
313313 """
314314
315- def __init__ (self ):
315+ def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
316+ optim = False , verbose = None ):
316317 """Init the model."""
317- super (GS , self ).__init__ ()
318- self . arguments [ '{ALGORITHM}' ] = 'gs'
318+ super (GS , self ).__init__ (score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
319+ optim = False , verbose = None , algorithm = "gs" )
319320
320321
321322class IAMB (BNlearnAlgorithm ):
@@ -334,7 +335,7 @@ class IAMB(BNlearnAlgorithm):
334335 with additional assumptions depending on the conditional test used.
335336
336337 .. note::
337- Tsamardinos I, Aliferis CF, Statnikov A (2003). "Algorithms for Large Scale Markov Blanket
338+ Tsamardinos I, Aliferis CF, Statnikov A (2003). "Algorithms for Large Scale Markov Blanket
338339 Discovery". In "Proceedings of the Sixteenth International Florida Artificial Intelligence Research
339340 Society Conference", pp. 376-381. AAAI Press.
340341
@@ -357,10 +358,11 @@ class IAMB(BNlearnAlgorithm):
357358 >>> plt.show()
358359 """
359360
360- def __init__ (self ):
361+ def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
362+ optim = False , verbose = None ):
361363 """Init the model."""
362- super (IAMB , self ).__init__ ()
363- self . arguments [ '{ALGORITHM}' ] = ' iamb'
364+ super (IAMB , self ).__init__ (score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
365+ optim = False , verbose = None , algorithm = " iamb" )
364366
365367
366368class Fast_IAMB (BNlearnAlgorithm ):
@@ -402,10 +404,11 @@ class Fast_IAMB(BNlearnAlgorithm):
402404 >>> plt.show()
403405 """
404406
405- def __init__ (self ):
407+ def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
408+ optim = False , verbose = None ):
406409 """Init the model."""
407- super (Fast_IAMB , self ).__init__ ()
408- self . arguments [ '{ALGORITHM}' ] = 'fast.iamb'
410+ super (Fast_IAMB , self ).__init__ (score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
411+ optim = False , verbose = None , algorithm = 'fast.iamb' )
409412
410413
411414class Inter_IAMB (BNlearnAlgorithm ):
@@ -446,10 +449,11 @@ class Inter_IAMB(BNlearnAlgorithm):
446449 >>> plt.show()
447450 """
448451
449- def __init__ (self ):
452+ def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
453+ optim = False , verbose = None ):
450454 """Init the model."""
451- super (Inter_IAMB , self ).__init__ ()
452- self . arguments [ '{ALGORITHM}' ] = ' inter.iamb'
455+ super (Inter_IAMB , self ).__init__ (score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
456+ optim = False , verbose = None , algorithm = " inter.iamb" )
453457
454458
455459class MMPC (BNlearnAlgorithm ):
@@ -497,7 +501,8 @@ class MMPC(BNlearnAlgorithm):
497501 >>> plt.show()
498502 """
499503
500- def __init__ (self ):
504+ def __init__ (self , score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
505+ optim = False , verbose = None ):
501506 """Init the model."""
502- super (MMPC , self ).__init__ ()
503- self . arguments [ '{ALGORITHM}' ] = 'mmpc'
507+ super (MMPC , self ).__init__ (score = 'NULL' , alpha = 0.05 , beta = 'NULL' ,
508+ optim = False , verbose = None , algorithm = 'mmpc' )
0 commit comments