Exemplo n.º 1
0
 def test_dimension(self):
     try:
         select(X)
     except ValueError:
         fail()
     with raises(ValueError):
         select(x)
Exemplo n.º 2
0
 def test_criterion(self):
     try:
         for criterion in criteria:
             select(X, criterion=criterion)
     except ValueError:
         fail()
     with raises(ValueError):
         select(X, method='')
     with raises(ValueError):
         select(X, method=None)
Exemplo n.º 3
0
 def test_method(self):
     try:
         for method in methods:
             select(X, method=method)
     except ValueError:
         fail()
     with raises(ValueError):
         select(X, method='')
     with raises(ValueError):
         select(X, method=None)
Exemplo n.º 4
0
 def test_lamb(self):
     try:
         select(X, method='glasso', criterion='none', lamb=None)
         select(X, method='glasso', criterion='none', lamb=0)
         select(X, method='glasso', criterion='none', lamb=[0])
         select(X, method='glasso', criterion='none', lamb=[0, 0.1])
         select(X, method='glasso', criterion='stars', lamb=None)
         select(X, method='glasso', criterion='stars', lamb=0)
         select(X, method='glasso', criterion='stars', lamb=[0])
         select(X, method='glasso', criterion='stars', lamb=[0, 0.1])
         select(X, method='iamb', criterion='none', lamb=None)
         select(X, method='iamb', criterion='none', lamb=0)
         select(X, method='iamb', criterion='none', lamb=[0])
         select(X, method='iamb', criterion='none', lamb=[0, 0.1])
         select(X, method='iamb', criterion='none', lamb=[-0.1, 0, 0.1])
         select(X, method='iamb', criterion='stars', lamb=None)
         select(X, method='iamb', criterion='stars', lamb=0)
         select(X, method='iamb', criterion='stars', lamb=[0])
         select(X, method='iamb', criterion='stars', lamb=[0, 0.1])
         select(X, method='iamb', criterion='stars', lamb=[-0.1, 0, 0.1])
     except ValueError:
         fail()
     with raises(ValueError):
         select(X, method='glasso', criterion='none', lamb=[-0.1, 0, 0.1])
     with raises(ValueError):
         select(X, method='glasso', criterion='stars', lamb=[-0.1, 0, 0.1])
Exemplo n.º 5
0
 def test_length(self):
     with raises(ValueError):
         select(X[:, :1])
     with raises(ValueError):
         select(X[:1])