Skip to content

Commit

Permalink
Merge pull request #98 from y-takashina/feature/markov_networks/selec…
Browse files Browse the repository at this point in the history
…t-arguments

Modified arguments in markov_networks.select
  • Loading branch information
ytakashina committed Oct 18, 2018
2 parents 61e7098 + f1399c4 commit 4745d04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions depynd/markov_networks/_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
from depynd.markov_networks import _skeptic, _stars, _glasso, _jose, _gsmn, _iamb, _gsmple


def select(X, method='skeptic', criterion='stars', lamb=None, verbose=False, return_lambda=False, **kwargs):
def select(X, method='skeptic', criterion=None, lamb=None, verbose=False, return_lambda=False, **kwargs):
"""Learn the structure of Markov random field.
Parameters
----------
X : array-like, shape (n_samples, n_features)
Observations of a set of random variables.
method : {'glasso', 'skeptic', 'gsmn', 'iamb'}
method : {'glasso', 'skeptic', 'gsmn', 'iamb', 'gsmple'}
Method for structure learning.
criterion : {'stars', 'none'}
criterion : {'stars', 'none', None}
Criteria for selecting regularization parameter.
lamb : float or array-like or None
Candidates of regularization parameter.
Expand Down Expand Up @@ -55,7 +55,7 @@ def select(X, method='skeptic', criterion='stars', lamb=None, verbose=False, ret
else:
raise ValueError('`%s` is not implemented.' % method)

if criterion == 'none':
if criterion is None or criterion == 'none':
if np.iterable(lamb):
lamb_opt = next(iter(lamb))
elif np.isscalar(lamb):
Expand Down

0 comments on commit 4745d04

Please sign in to comment.