Skip to content

Commit

Permalink
Fix #2 and #6
Browse files Browse the repository at this point in the history
  • Loading branch information
davidealbanese committed Feb 6, 2020
1 parent 3f43829 commit 5fcca0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mictools/null.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def compute_null_oneclass(X, Y=None, rowwise=False, B=9, c=5, nperm=250000, seed
rs = np.random.RandomState(seed)
mine = minepy.MINE(alpha=B, c=c, est="mic_e")

Xa = X.as_matrix()
Xa = X.values
if Y is None:
idx = np.arange(Xa.shape[0])
Ya, max_idx_rowwise = None, None
else:
Ya = Y.as_matrix()
Ya = Y.values
if rowwise:
max_idx_rowwise = min(Xa.shape[0], Ya.shape[0])
idx = None
Expand Down
4 changes: 2 additions & 2 deletions mictools/pval.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def compute_pval_oneclass(X, null_dist, Y=None, single=False, B=9, c=5):

# observed values/distribution
names=['Var1', 'Var2']
Xa = X.as_matrix()
Xa = X.values
if Y is None:
_, tic = minepy.pstats(Xa, alpha=B, c=c, est="mic_e")
index = pd.MultiIndex.from_tuples(
list(itertools.combinations(X.index, 2)), names=names)
else:
Ya = Y.as_matrix()
Ya = Y.values
if single:
_, tic = mictools.utils.sstats(Xa, Ya, alpha=B, c=c, est="mic_e")
index = pd.MultiIndex.from_arrays([X.index, Y.index], names=names)
Expand Down

0 comments on commit 5fcca0c

Please sign in to comment.