Skip to content

Commit

Permalink
Change default parameters
Browse files Browse the repository at this point in the history
Hu-JIN committed Apr 19, 2022
1 parent 9e768ae commit 39a227c
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions musical/denovo.py
Original file line number Diff line number Diff line change
@@ -984,7 +984,7 @@ def plot_selection(self, title=None, plot_pvalues=True, outfile=None, figsize=No
plt.savefig(outfile, bbox_inches='tight')

def assign(self, W_catalog, method_assign='likelihood_bidirectional',
thresh_match=None, thresh_refit=None, thresh_new_sig=0.8, connected_sigs=False, clean_W_s=False):
thresh_match=None, thresh_refit=None, thresh_new_sig=0.0, connected_sigs=False, clean_W_s=False):
# Check if fit has been run
if not hasattr(self, 'W'):
raise ValueError('The model has not been fitted.')
@@ -1029,7 +1029,7 @@ def assign(self, W_catalog, method_assign='likelihood_bidirectional',
return self

def assign_grid(self, W_catalog, method_assign='likelihood_bidirectional',
thresh_match_grid=None, thresh_refit_grid=None, thresh_new_sig=0.8, connected_sigs=False, clean_W_s=False):
thresh_match_grid=None, thresh_refit_grid=None, thresh_new_sig=0.0, connected_sigs=False, clean_W_s=False):
# Check if fit has been run
if not hasattr(self, 'W'):
raise ValueError('The model has not been fitted.')
8 changes: 4 additions & 4 deletions musical/refit.py
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ def _add_missing_connected_sigs(W_s, W_catalog):
W_s = pd.concat([W_s, W_catalog[missing_sigs]], axis=1)
return W_s

def match(W, W_catalog, thresh_new_sig=0.8, method='likelihood_bidirectional', thresh=None,
def match(W, W_catalog, thresh_new_sig=0.0, method='likelihood_bidirectional', thresh=None,
connected_sigs=False, clean_W_s=False):
"""Wrapper around SparseNNLS for matching
@@ -191,7 +191,7 @@ def match(W, W_catalog, thresh_new_sig=0.8, method='likelihood_bidirectional', t
W_s = _add_missing_connected_sigs(W_s, W_catalog)
return W_s, sig_map, model

def match_grid(W, W_catalog, thresh_new_sig=0.8, method='likelihood_bidirectional', thresh_grid=None, ncpu=1, verbose=0,
def match_grid(W, W_catalog, thresh_new_sig=0.0, method='likelihood_bidirectional', thresh_grid=None, ncpu=1, verbose=0,
connected_sigs=False, clean_W_s=False):
"""Matching on a grid of thresholds.
"""
@@ -237,7 +237,7 @@ def assign(X, W, W_catalog,
method='likelihood_bidirectional',
thresh_match=None,
thresh_refit=None,
thresh_new_sig=0.8,
thresh_new_sig=0.0,
connected_sigs=False,
clean_W_s=False):
"""Assign = match + refit.
@@ -252,7 +252,7 @@ def assign(X, W, W_catalog,

def assign_grid(X, W, W_catalog, method='likelihood_bidirectional',
thresh_match_grid=None, thresh_refit_grid=None,
thresh_new_sig=0.8, connected_sigs=False, clean_W_s=False,
thresh_new_sig=0.0, connected_sigs=False, clean_W_s=False,
ncpu=1, verbose=0):
"""Match and refit on a grid"""
if thresh_match_grid is None:

0 comments on commit 39a227c

Please sign in to comment.