Skip to content

Commit

Permalink
wrapped prenet in a function in prenet_predict.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sqrhussain committed Dec 19, 2023
1 parent 754bbb3 commit 80999ab
Show file tree
Hide file tree
Showing 6 changed files with 553 additions and 466 deletions.
8 changes: 4 additions & 4 deletions data_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from scipy.sparse import vstack, csc_matrix
from sklearn.neighbors import KDTree

def inject_noise_sparse(seed, n_out):
rng = np.random.RandomState(42)
def inject_noise_sparse(seed, n_out):
rng = np.random.RandomState(42)
n_sample, dim = seed.shape
swap_ratio = 0.05
n_swap_feat = int(swap_ratio * dim)
Expand All @@ -27,8 +27,8 @@ def inject_noise_sparse(seed, n_out):
noise[i, swap_feats] = o2[0, swap_feats]
return noise.tocsr()

def inject_noise(seed, n_out):
rng = np.random.RandomState(42)
def inject_noise(seed, n_out):
rng = np.random.RandomState(42)
n_sample, dim = seed.shape
swap_ratio = 0.05
n_swap_feat = int(swap_ratio * dim)
Expand Down
Loading

0 comments on commit 80999ab

Please sign in to comment.