SYMBOL INDEX (1357 symbols across 71 files) FILE: docs/conf.py function linkcode_resolve (line 63) | def linkcode_resolve(domain, info): FILE: numpy_ml/bandits/bandits.py class Bandit (line 10) | class Bandit(ABC): method __init__ (line 11) | def __init__(self, rewards, reward_probs, context=None): method __repr__ (line 18) | def __repr__(self): method hyperparameters (line 25) | def hyperparameters(self): method oracle_payoff (line 30) | def oracle_payoff(self, context=None): method pull (line 47) | def pull(self, arm_id, context=None): method reset (line 69) | def reset(self): method _pull (line 74) | def _pull(self, arm_id): class MultinomialBandit (line 78) | class MultinomialBandit(Bandit): method __init__ (line 79) | def __init__(self, payoffs, payoff_probs): method hyperparameters (line 110) | def hyperparameters(self): method oracle_payoff (line 118) | def oracle_payoff(self, context=None): method _pull (line 136) | def _pull(self, arm_id, context): class BernoulliBandit (line 142) | class BernoulliBandit(Bandit): method __init__ (line 143) | def __init__(self, payoff_probs): method hyperparameters (line 168) | def hyperparameters(self): method oracle_payoff (line 175) | def oracle_payoff(self, context=None): method _pull (line 193) | def _pull(self, arm_id, context): class GaussianBandit (line 197) | class GaussianBandit(Bandit): method __init__ (line 198) | def __init__(self, payoff_dists, payoff_probs): method hyperparameters (line 229) | def hyperparameters(self): method _pull (line 237) | def _pull(self, arm_id, context): method oracle_payoff (line 246) | def oracle_payoff(self, context=None): class ShortestPathBandit (line 265) | class ShortestPathBandit(Bandit): method __init__ (line 266) | def __init__(self, G, start_vertex, end_vertex): method hyperparameters (line 300) | def hyperparameters(self): method oracle_payoff (line 309) | def oracle_payoff(self, context=None): method _calc_arm_evs (line 327) | def _calc_arm_evs(self): method _pull (line 336) | def _pull(self, arm_id, context): class ContextualBernoulliBandit (line 346) | class ContextualBernoulliBandit(Bandit): method __init__ (line 347) | def __init__(self, context_probs): method hyperparameters (line 372) | def hyperparameters(self): method get_context (line 379) | def get_context(self): method oracle_payoff (line 395) | def oracle_payoff(self, context): method _pull (line 414) | def _pull(self, arm_id, context): class ContextualLinearBandit (line 421) | class ContextualLinearBandit(Bandit): method __init__ (line 422) | def __init__(self, K, D, payoff_variance=1): method hyperparameters (line 476) | def hyperparameters(self): method parameters (line 486) | def parameters(self): method get_context (line 490) | def get_context(self): method oracle_payoff (line 503) | def oracle_payoff(self, context): method _pull (line 523) | def _pull(self, arm_id, context): FILE: numpy_ml/bandits/policies.py class BanditPolicyBase (line 11) | class BanditPolicyBase(ABC): method __init__ (line 12) | def __init__(self): method __repr__ (line 19) | def __repr__(self): method hyperparameters (line 26) | def hyperparameters(self): method parameters (line 31) | def parameters(self): method act (line 35) | def act(self, bandit, context=None): method reset (line 63) | def reset(self): method _pull_arm (line 69) | def _pull_arm(self, bandit, arm_id, context): method _select_arm (line 75) | def _select_arm(self, bandit, context): method _update_params (line 80) | def _update_params(self, bandit, context): method _initialize_params (line 85) | def _initialize_params(self, bandit): method _reset_params (line 93) | def _reset_params(self): class EpsilonGreedy (line 101) | class EpsilonGreedy(BanditPolicyBase): method __init__ (line 102) | def __init__(self, epsilon=0.05, ev_prior=0.5): method parameters (line 144) | def parameters(self): method hyperparameters (line 149) | def hyperparameters(self): method _initialize_params (line 157) | def _initialize_params(self, bandit): method _select_arm (line 165) | def _select_arm(self, bandit, context=None): method _update_params (line 173) | def _update_params(self, arm_id, reward, context=None): method _reset_params (line 178) | def _reset_params(self): class UCB1 (line 187) | class UCB1(BanditPolicyBase): method __init__ (line 188) | def __init__(self, C=1, ev_prior=0.5): method parameters (line 233) | def parameters(self): method hyperparameters (line 238) | def hyperparameters(self): method _initialize_params (line 246) | def _initialize_params(self, bandit): method _select_arm (line 254) | def _select_arm(self, bandit, context=None): method _update_params (line 262) | def _update_params(self, arm_id, reward, context=None): method _reset_params (line 267) | def _reset_params(self): class ThompsonSamplingBetaBinomial (line 276) | class ThompsonSamplingBetaBinomial(BanditPolicyBase): method __init__ (line 277) | def __init__(self, alpha=1, beta=1): method parameters (line 335) | def parameters(self): method hyperparameters (line 344) | def hyperparameters(self): method _initialize_params (line 352) | def _initialize_params(self, bandit): method _select_arm (line 367) | def _select_arm(self, bandit, context): method _update_params (line 377) | def _update_params(self, arm_id, rwd, context): method _map_estimate (line 386) | def _map_estimate(self, arm_id, rwd): method _reset_params (line 401) | def _reset_params(self): class LinUCB (line 410) | class LinUCB(BanditPolicyBase): method __init__ (line 411) | def __init__(self, alpha=1): method parameters (line 439) | def parameters(self): method hyperparameters (line 444) | def hyperparameters(self): method _initialize_params (line 451) | def _initialize_params(self, bandit): method _select_arm (line 467) | def _select_arm(self, bandit, context): method _update_params (line 478) | def _update_params(self, arm_id, rwd, context): method _reset_params (line 483) | def _reset_params(self): FILE: numpy_ml/bandits/trainer.py function get_scriptdir (line 21) | def get_scriptdir(): function mse (line 26) | def mse(bandit, policy): function smooth (line 42) | def smooth(prev, cur, weight): class BanditTrainer (line 79) | class BanditTrainer: method __init__ (line 80) | def __init__(self): method compare (line 87) | def compare( method train (line 170) | def train( method _train_step (line 268) | def _train_step(self, bandit, policy): method init_logs (line 275) | def init_logs(self, policies): method _print_run_summary (line 309) | def _print_run_summary(self, bandit, policy, regret): method _plot_reward (line 323) | def _plot_reward(self, optimal_rwd, policy, smooth_weight, axes=None, ... method _smoothed_metrics (line 367) | def _smoothed_metrics(self, policy, optimal_rwd, smooth_weight): FILE: numpy_ml/factorization/factors.py class VanillaALS (line 8) | class VanillaALS: method __init__ (line 9) | def __init__(self, K, alpha=1, max_iter=200, tol=1e-4): method parameters (line 64) | def parameters(self): method hyperparameters (line 69) | def hyperparameters(self): method _init_factor_matrices (line 79) | def _init_factor_matrices(self, X, W=None, H=None): method _loss (line 89) | def _loss(self, X, Xhat): method _update_factor (line 95) | def _update_factor(self, X, A): method fit (line 100) | def fit(self, X, W=None, H=None, n_initializations=10, verbose=False): method _fit (line 141) | def _fit(self, X, W, H, verbose): class NMF (line 160) | class NMF: method __init__ (line 161) | def __init__(self, K, max_iter=200, tol=1e-4): method parameters (line 213) | def parameters(self): method hyperparameters (line 218) | def hyperparameters(self): method _init_factor_matrices (line 227) | def _init_factor_matrices(self, X, W, H): method _loss (line 247) | def _loss(self, X, Xhat): method _update_H (line 251) | def _update_H(self, X, W, H): method _update_W (line 262) | def _update_W(self, X, W, H): method fit (line 277) | def fit(self, X, W=None, H=None, n_initializations=10, verbose=False): method _fit (line 354) | def _fit(self, X, W, H, verbose): FILE: numpy_ml/gmm/gmm.py class GMM (line 7) | class GMM(object): method __init__ (line 8) | def __init__(self, C=3, seed=None): method _initialize_params (line 48) | def _initialize_params(self, X): method likelihood_lower_bound (line 65) | def likelihood_lower_bound(self, X): method fit (line 93) | def fit(self, X, max_iter=100, tol=1e-3, verbose=False): method predict (line 145) | def predict(self, X, soft_labels=True): method _E_step (line 185) | def _E_step(self, X): method _M_step (line 210) | def _M_step(self, X): FILE: numpy_ml/hmm/hmm.py class MultinomialHMM (line 7) | class MultinomialHMM: method __init__ (line 8) | def __init__(self, A=None, B=None, pi=None, eps=None): method generate (line 81) | def generate(self, n_steps, latent_state_types, obs_types): method log_likelihood (line 122) | def log_likelihood(self, O): method decode (line 180) | def decode(self, O): method _forward (line 291) | def _forward(self, Obs): method _backward (line 362) | def _backward(self, Obs): method _initialize_parameters (line 429) | def _initialize_parameters(self): method fit (line 451) | def fit( method _E_step (line 537) | def _E_step(self, O): method _M_step (line 622) | def _M_step(self, O, gamma, xi, phi): FILE: numpy_ml/lda/lda.py class LDA (line 5) | class LDA(object): method __init__ (line 6) | def __init__(self, T=10): method _maximize_phi (line 36) | def _maximize_phi(self): method _maximize_gamma (line 60) | def _maximize_gamma(self): method _maximize_beta (line 74) | def _maximize_beta(self): method _maximize_alpha (line 99) | def _maximize_alpha(self, max_iters=1000, tol=0.1): method _E_step (line 137) | def _E_step(self): method _M_step (line 144) | def _M_step(self): method VLB (line 151) | def VLB(self): method initialize_parameters (line 189) | def initialize_parameters(self): method train (line 206) | def train(self, corpus, verbose=False, max_iter=1000, tol=5): function dg (line 255) | def dg(gamma, d, t): FILE: numpy_ml/lda/lda_smoothed.py class SmoothedLDA (line 4) | class SmoothedLDA(object): method __init__ (line 5) | def __init__(self, T, **kwargs): method _init_params (line 42) | def _init_params(self, texts, tokens): method train (line 59) | def train(self, texts, tokens, n_gibbs=2000): method what_did_you_learn (line 90) | def what_did_you_learn(self, top_n=10): method fit_params (line 101) | def fit_params(self, C_wt, C_dt): method _estimate_topic_prob (line 137) | def _estimate_topic_prob(self, ii, d, C_wt, C_dt): method _gibbs_sampler (line 153) | def _gibbs_sampler(self, n_gibbs, texts): FILE: numpy_ml/linear_models/bayesian_regression.py class BayesianLinearRegressionUnknownVariance (line 8) | class BayesianLinearRegressionUnknownVariance: method __init__ (line 9) | def __init__(self, alpha=1, beta=2, mu=0, V=None, fit_intercept=True): method fit (line 81) | def fit(self, X, y): method predict (line 139) | def predict(self, X): class BayesianLinearRegressionKnownVariance (line 167) | class BayesianLinearRegressionKnownVariance: method __init__ (line 168) | def __init__(self, mu=0, sigma=1, V=None, fit_intercept=True): method fit (line 237) | def fit(self, X, y): method predict (line 276) | def predict(self, X): FILE: numpy_ml/linear_models/glm.py class GeneralizedLinearModel (line 48) | class GeneralizedLinearModel: method __init__ (line 49) | def __init__(self, link, fit_intercept=True, tol=1e-5, max_iter=100): method fit (line 129) | def fit(self, X, y): method predict (line 187) | def predict(self, X): FILE: numpy_ml/linear_models/linear_regression.py class LinearRegression (line 6) | class LinearRegression: method __init__ (line 7) | def __init__(self, fit_intercept=True): method update (line 62) | def update(self, X, y, weights=None): method _update1D (line 142) | def _update1D(self, x, y, w): method _update2D (line 156) | def _update2D(self, X, y, W): method fit (line 172) | def fit(self, X, y, weights=None): method predict (line 218) | def predict(self, X): FILE: numpy_ml/linear_models/logistic.py class LogisticRegression (line 5) | class LogisticRegression: method __init__ (line 6) | def __init__(self, penalty="l2", gamma=0, fit_intercept=True): method fit (line 90) | def fit(self, X, y, lr=0.01, tol=1e-7, max_iter=1e7): method _NLL (line 121) | def _NLL(self, X, y, y_pred): method _NLL_grad (line 143) | def _NLL_grad(self, X, y, y_pred): method predict (line 150) | def predict(self, X): function _sigmoid (line 171) | def _sigmoid(x): FILE: numpy_ml/linear_models/naive_bayes.py class GaussianNBClassifier (line 5) | class GaussianNBClassifier: method __init__ (line 6) | def __init__(self, eps=1e-6): method fit (line 79) | def fit(self, X, y): method predict (line 128) | def predict(self, X): method _log_posterior (line 145) | def _log_posterior(self, X): method _log_class_posterior (line 166) | def _log_class_posterior(self, X, class_idx): FILE: numpy_ml/linear_models/ridge.py class RidgeRegression (line 6) | class RidgeRegression: method __init__ (line 7) | def __init__(self, alpha=1, fit_intercept=True): method fit (line 61) | def fit(self, X, y): method predict (line 86) | def predict(self, X): FILE: numpy_ml/neural_nets/activations/activations.py class ActivationBase (line 8) | class ActivationBase(ABC): method __init__ (line 9) | def __init__(self, **kwargs): method __call__ (line 13) | def __call__(self, z): method fn (line 20) | def fn(self, z): method grad (line 25) | def grad(self, x, **kwargs): class Sigmoid (line 30) | class Sigmoid(ActivationBase): method __init__ (line 31) | def __init__(self): method __str__ (line 35) | def __str__(self): method fn (line 39) | def fn(self, z): method grad (line 49) | def grad(self, x): method grad2 (line 60) | def grad2(self, x): class ReLU (line 73) | class ReLU(ActivationBase): method __init__ (line 97) | def __init__(self): method __str__ (line 100) | def __str__(self): method fn (line 104) | def fn(self, z): method grad (line 116) | def grad(self, x): method grad2 (line 128) | def grad2(self, x): class LeakyReLU (line 140) | class LeakyReLU(ActivationBase): method __init__ (line 161) | def __init__(self, alpha=0.3): method __str__ (line 165) | def __str__(self): method fn (line 169) | def fn(self, z): method grad (line 183) | def grad(self, x): method grad2 (line 198) | def grad2(self, x): class GELU (line 210) | class GELU(ActivationBase): method __init__ (line 211) | def __init__(self, approximate=True): method __str__ (line 235) | def __str__(self): method fn (line 239) | def fn(self, z): method grad (line 254) | def grad(self, x): method grad2 (line 279) | def grad2(self, x): class Tanh (line 304) | class Tanh(ActivationBase): method __init__ (line 305) | def __init__(self): method __str__ (line 309) | def __str__(self): method fn (line 313) | def fn(self, z): method grad (line 317) | def grad(self, x): method grad2 (line 328) | def grad2(self, x): class Affine (line 342) | class Affine(ActivationBase): method __init__ (line 343) | def __init__(self, slope=1, intercept=0): method __str__ (line 358) | def __str__(self): method fn (line 362) | def fn(self, z): method grad (line 372) | def grad(self, x): method grad2 (line 383) | def grad2(self, x): class Identity (line 395) | class Identity(Affine): method __init__ (line 396) | def __init__(self): method __str__ (line 407) | def __str__(self): class ELU (line 412) | class ELU(ActivationBase): method __init__ (line 413) | def __init__(self, alpha=1.0): method __str__ (line 445) | def __str__(self): method fn (line 449) | def fn(self, z): method grad (line 462) | def grad(self, x): method grad2 (line 476) | def grad2(self, x): class Exponential (line 491) | class Exponential(ActivationBase): method __init__ (line 492) | def __init__(self): method __str__ (line 496) | def __str__(self): method fn (line 500) | def fn(self, z): method grad (line 509) | def grad(self, x): method grad2 (line 520) | def grad2(self, x): class SELU (line 532) | class SELU(ActivationBase): method __init__ (line 558) | def __init__(self): method __str__ (line 564) | def __str__(self): method fn (line 568) | def fn(self, z): method grad (line 586) | def grad(self, x): method grad2 (line 601) | def grad2(self, x): class HardSigmoid (line 615) | class HardSigmoid(ActivationBase): method __init__ (line 616) | def __init__(self): method __str__ (line 627) | def __str__(self): method fn (line 631) | def fn(self, z): method grad (line 644) | def grad(self, x): method grad2 (line 657) | def grad2(self, x): class SoftPlus (line 669) | class SoftPlus(ActivationBase): method __init__ (line 670) | def __init__(self): method __str__ (line 684) | def __str__(self): method fn (line 688) | def fn(self, z): method grad (line 698) | def grad(self, x): method grad2 (line 710) | def grad2(self, x): FILE: numpy_ml/neural_nets/initializers/initializers.py class ActivationInitializer (line 41) | class ActivationInitializer(object): method __init__ (line 42) | def __init__(self, param=None): method __call__ (line 53) | def __call__(self): method init_from_str (line 66) | def init_from_str(self, act_str): class SchedulerInitializer (line 106) | class SchedulerInitializer(object): method __init__ (line 107) | def __init__(self, param=None, lr=None): method __call__ (line 125) | def __call__(self): method init_from_str (line 138) | def init_from_str(self): method init_from_dict (line 156) | def init_from_dict(self): class OptimizerInitializer (line 176) | class OptimizerInitializer(object): method __init__ (line 177) | def __init__(self, param=None): method __call__ (line 189) | def __call__(self): method init_from_str (line 202) | def init_from_str(self): method init_from_dict (line 219) | def init_from_dict(self): class WeightInitializer (line 242) | class WeightInitializer(object): method __init__ (line 243) | def __init__(self, act_fn_str, mode="glorot_uniform"): method __call__ (line 282) | def __call__(self, weight_shape): method _calc_glorot_gain (line 293) | def _calc_glorot_gain(self): FILE: numpy_ml/neural_nets/layers/layers.py class LayerBase (line 27) | class LayerBase(ABC): method __init__ (line 28) | def __init__(self, optimizer=None): method _init_params (line 42) | def _init_params(self, **kwargs): method forward (line 46) | def forward(self, z, **kwargs): method backward (line 51) | def backward(self, out, **kwargs): method freeze (line 55) | def freeze(self): method unfreeze (line 62) | def unfreeze(self): method flush_gradients (line 66) | def flush_gradients(self): method update (line 76) | def update(self, cur_loss=None): method set_params (line 88) | def set_params(self, summary_dict): method summary (line 130) | def summary(self): class DotProductAttention (line 139) | class DotProductAttention(LayerBase): method __init__ (line 140) | def __init__(self, scale=True, dropout_p=0, init="glorot_uniform", opt... method _init_params (line 194) | def _init_params(self): method hyperparameters (line 206) | def hyperparameters(self): method freeze (line 219) | def freeze(self): method unfreeze (line 227) | def unfreeze(self): method forward (line 232) | def forward(self, Q, K, V, retain_derived=True): method _fwd (line 305) | def _fwd(self, Q, K, V): method backward (line 313) | def backward(self, dLdy, retain_grads=True): method _bwd (line 352) | def _bwd(self, dy, q, k, v, weights): class RBM (line 365) | class RBM(LayerBase): method __init__ (line 366) | def __init__(self, n_out, K=1, init="glorot_uniform", optimizer=None): method _init_params (line 412) | def _init_params(self): method hyperparameters (line 438) | def hyperparameters(self): method CD_update (line 452) | def CD_update(self, X): method forward (line 468) | def forward(self, V, K=None, retain_derived=True): method backward (line 563) | def backward(self, retain_grads=True, *args): method reconstruct (line 587) | def reconstruct(self, X, n_steps=10, return_prob=False): class Add (line 633) | class Add(LayerBase): method __init__ (line 634) | def __init__(self, act_fn=None, optimizer=None): method _init_params (line 669) | def _init_params(self): method hyperparameters (line 675) | def hyperparameters(self): method forward (line 686) | def forward(self, X, retain_derived=True): method backward (line 713) | def backward(self, dLdY, retain_grads=True): method _bwd (line 739) | def _bwd(self, dLdY, X, _sum): class Multiply (line 745) | class Multiply(LayerBase): method __init__ (line 746) | def __init__(self, act_fn=None, optimizer=None): method _init_params (line 781) | def _init_params(self): method hyperparameters (line 787) | def hyperparameters(self): method forward (line 798) | def forward(self, X, retain_derived=True): method backward (line 825) | def backward(self, dLdY, retain_grads=True): method _bwd (line 851) | def _bwd(self, dLdY, X, prod): class Flatten (line 859) | class Flatten(LayerBase): method __init__ (line 860) | def __init__(self, keep_dim="first", optimizer=None): method _init_params (line 895) | def _init_params(self): method hyperparameters (line 901) | def hyperparameters(self): method forward (line 912) | def forward(self, X, retain_derived=True): method backward (line 939) | def backward(self, dLdy, retain_grads=True): class BatchNorm2D (line 969) | class BatchNorm2D(LayerBase): method __init__ (line 970) | def __init__(self, momentum=0.9, epsilon=1e-5, optimizer=None): method _init_params (line 1051) | def _init_params(self): method hyperparameters (line 1074) | def hyperparameters(self): method reset_running_stats (line 1089) | def reset_running_stats(self): method forward (line 1095) | def forward(self, X, retain_derived=True): method backward (line 1158) | def backward(self, dLdy, retain_grads=True): method _bwd (line 1192) | def _bwd(self, dLdy, X): class BatchNorm1D (line 1218) | class BatchNorm1D(LayerBase): method __init__ (line 1219) | def __init__(self, momentum=0.9, epsilon=1e-5, optimizer=None): method _init_params (line 1299) | def _init_params(self): method hyperparameters (line 1321) | def hyperparameters(self): method reset_running_stats (line 1336) | def reset_running_stats(self): method forward (line 1342) | def forward(self, X, retain_derived=True): method backward (line 1390) | def backward(self, dLdy, retain_grads=True): method _bwd (line 1424) | def _bwd(self, dLdy, X): class LayerNorm2D (line 1444) | class LayerNorm2D(LayerBase): method __init__ (line 1445) | def __init__(self, epsilon=1e-5, optimizer=None): method _init_params (line 1498) | def _init_params(self, X_shape): method hyperparameters (line 1514) | def hyperparameters(self): method forward (line 1528) | def forward(self, X, retain_derived=True): method backward (line 1572) | def backward(self, dLdy, retain_grads=True): method _bwd (line 1606) | def _bwd(self, dy, X): class LayerNorm1D (line 1634) | class LayerNorm1D(LayerBase): method __init__ (line 1635) | def __init__(self, epsilon=1e-5, optimizer=None): method _init_params (line 1687) | def _init_params(self): method hyperparameters (line 1700) | def hyperparameters(self): method forward (line 1714) | def forward(self, X, retain_derived=True): method backward (line 1750) | def backward(self, dLdy, retain_grads=True): method _bwd (line 1784) | def _bwd(self, dLdy, X): class Embedding (line 1811) | class Embedding(LayerBase): method __init__ (line 1812) | def __init__( method _init_params (line 1872) | def _init_params(self): method hyperparameters (line 1882) | def hyperparameters(self): method lookup (line 1896) | def lookup(self, ids): method forward (line 1912) | def forward(self, X, retain_derived=True): method _fwd (line 1954) | def _fwd(self, X): method backward (line 1965) | def backward(self, dLdy, retain_grads=True): method _bwd (line 1993) | def _bwd(self, dLdy, X): class FullyConnected (line 2010) | class FullyConnected(LayerBase): method __init__ (line 2011) | def __init__(self, n_out, act_fn=None, init="glorot_uniform", optimize... method _init_params (line 2064) | def _init_params(self): method hyperparameters (line 2076) | def hyperparameters(self): method forward (line 2090) | def forward(self, X, retain_derived=True): method _fwd (line 2122) | def _fwd(self, X): method backward (line 2131) | def backward(self, dLdy, retain_grads=True): method _bwd (line 2165) | def _bwd(self, dLdy, X): method _bwd2 (line 2178) | def _bwd2(self, dLdy, X, dLdy_bwd): class Softmax (line 2192) | class Softmax(LayerBase): method __init__ (line 2193) | def __init__(self, dim=-1, optimizer=None): method _init_params (line 2244) | def _init_params(self): method hyperparameters (line 2251) | def hyperparameters(self): method forward (line 2263) | def forward(self, X, retain_derived=True): method _fwd (line 2294) | def _fwd(self, X): method backward (line 2300) | def backward(self, dLdy, retain_grads=True): method _bwd (line 2330) | def _bwd(self, dLdy, X): class SparseEvolution (line 2352) | class SparseEvolution(LayerBase): method __init__ (line 2353) | def __init__( method _init_params (line 2421) | def _init_params(self): method hyperparameters (line 2438) | def hyperparameters(self): method forward (line 2454) | def forward(self, X, retain_derived=True): method _fwd (line 2486) | def _fwd(self, X): method backward (line 2496) | def backward(self, dLdy, retain_grads=True): method _bwd (line 2530) | def _bwd(self, dLdy, X): method _bwd2 (line 2544) | def _bwd2(self, dLdy, X, dLdy_bwd): method update (line 2558) | def update(self): method _evolve_connections (line 2570) | def _evolve_connections(self): class Conv1D (line 2603) | class Conv1D(LayerBase): method __init__ (line 2604) | def __init__( method _init_params (line 2684) | def _init_params(self): method hyperparameters (line 2696) | def hyperparameters(self): method forward (line 2714) | def forward(self, X, retain_derived=True): method backward (line 2756) | def backward(self, dLdy, retain_grads=True): method _bwd (line 2799) | def _bwd(self, dLdy, X, Z): method _backward_naive (line 2833) | def _backward_naive(self, dLdy, retain_grads=True): class Conv2D (line 2895) | class Conv2D(LayerBase): method __init__ (line 2896) | def __init__( method _init_params (line 2975) | def _init_params(self): method hyperparameters (line 2988) | def hyperparameters(self): method forward (line 3006) | def forward(self, X, retain_derived=True): method backward (line 3048) | def backward(self, dLdy, retain_grads=True): method _bwd (line 3093) | def _bwd(self, dLdy, X, Z): method _backward_naive (line 3118) | def _backward_naive(self, dLdy, retain_grads=True): class Pool2D (line 3181) | class Pool2D(LayerBase): method __init__ (line 3182) | def __init__(self, kernel_shape, stride=1, pad=0, mode="max", optimize... method _init_params (line 3213) | def _init_params(self): method hyperparameters (line 3218) | def hyperparameters(self): method forward (line 3235) | def forward(self, X, retain_derived=True): method backward (line 3290) | def backward(self, dLdY, retain_grads=True): class Deconv2D (line 3353) | class Deconv2D(LayerBase): method __init__ (line 3354) | def __init__( method _init_params (line 3408) | def _init_params(self): method hyperparameters (line 3421) | def hyperparameters(self): method forward (line 3438) | def forward(self, X, retain_derived=True): method backward (line 3480) | def backward(self, dLdY, retain_grads=True): method _bwd (line 3521) | def _bwd(self, dLdY, X, Z): class RNNCell (line 3576) | class RNNCell(LayerBase): method __init__ (line 3577) | def __init__(self, n_out, act_fn="Tanh", init="glorot_uniform", optimi... method _init_params (line 3626) | def _init_params(self): method hyperparameters (line 3655) | def hyperparameters(self): method forward (line 3669) | def forward(self, Xt): method backward (line 3717) | def backward(self, dLdAt): method flush_gradients (line 3766) | def flush_gradients(self): class LSTMCell (line 3782) | class LSTMCell(LayerBase): method __init__ (line 3783) | def __init__( method _init_params (line 3857) | def _init_params(self): method _get_params (line 3910) | def _get_params(self): method hyperparameters (line 3922) | def hyperparameters(self): method forward (line 3937) | def forward(self, Xt): method backward (line 3994) | def backward(self, dLdAt): method flush_gradients (line 4072) | def flush_gradients(self): class RNN (line 4088) | class RNN(LayerBase): method __init__ (line 4089) | def __init__(self, n_out, act_fn="Tanh", init="glorot_uniform", optimi... method _init_params (line 4118) | def _init_params(self): method hyperparameters (line 4129) | def hyperparameters(self): method forward (line 4140) | def forward(self, X): method backward (line 4167) | def backward(self, dLdA): method derived_variables (line 4193) | def derived_variables(self): method gradients (line 4201) | def gradients(self): method parameters (line 4209) | def parameters(self): method set_params (line 4213) | def set_params(self, summary_dict): method freeze (line 4233) | def freeze(self): method unfreeze (line 4240) | def unfreeze(self): method flush_gradients (line 4244) | def flush_gradients(self): method update (line 4248) | def update(self): class LSTM (line 4257) | class LSTM(LayerBase): method __init__ (line 4258) | def __init__( method _init_params (line 4296) | def _init_params(self): method hyperparameters (line 4307) | def hyperparameters(self): method forward (line 4319) | def forward(self, X): method backward (line 4346) | def backward(self, dLdA): method derived_variables (line 4372) | def derived_variables(self): method gradients (line 4380) | def gradients(self): method parameters (line 4388) | def parameters(self): method freeze (line 4392) | def freeze(self): method unfreeze (line 4399) | def unfreeze(self): method set_params (line 4403) | def set_params(self, summary_dict): method flush_gradients (line 4423) | def flush_gradients(self): method update (line 4427) | def update(self): FILE: numpy_ml/neural_nets/losses/losses.py class ObjectiveBase (line 13) | class ObjectiveBase(ABC): method __init__ (line 14) | def __init__(self): method loss (line 18) | def loss(self, y_true, y_pred): method grad (line 22) | def grad(self, y_true, y_pred, **kwargs): class SquaredError (line 26) | class SquaredError(ObjectiveBase): method __init__ (line 27) | def __init__(self): method __call__ (line 42) | def __call__(self, y, y_pred): method __str__ (line 45) | def __str__(self): method loss (line 49) | def loss(y, y_pred): method grad (line 68) | def grad(y, y_pred, z, act_fn): class CrossEntropy (line 110) | class CrossEntropy(ObjectiveBase): method __init__ (line 111) | def __init__(self): method __call__ (line 126) | def __call__(self, y, y_pred): method __str__ (line 129) | def __str__(self): method loss (line 133) | def loss(y, y_pred): method grad (line 170) | def grad(y, y_pred): class VAELoss (line 225) | class VAELoss(ObjectiveBase): method __init__ (line 226) | def __init__(self): method __call__ (line 254) | def __call__(self, y, y_pred, t_mean, t_log_var): method __str__ (line 257) | def __str__(self): method loss (line 261) | def loss(y, y_pred, t_mean, t_log_var): method grad (line 296) | def grad(y, y_pred, t_mean, t_log_var): class WGAN_GPLoss (line 331) | class WGAN_GPLoss(ObjectiveBase): method __init__ (line 332) | def __init__(self, lambda_=10): method __call__ (line 385) | def __call__(self, Y_fake, module, Y_real=None, gradInterp=None): method __str__ (line 412) | def __str__(self): method loss (line 415) | def loss(self, Y_fake, module, Y_real=None, gradInterp=None): method grad (line 457) | def grad(self, Y_fake, module, Y_real=None, gradInterp=None): class NCELoss (line 514) | class NCELoss(ObjectiveBase): method __init__ (line 518) | def __init__( method _init_params (line 621) | def _init_params(self): method hyperparameters (line 648) | def hyperparameters(self): method __call__ (line 663) | def __call__(self, X, target, neg_samples=None, retain_derived=True): method __str__ (line 666) | def __str__(self): method freeze (line 674) | def freeze(self): method unfreeze (line 681) | def unfreeze(self): method flush_gradients (line 685) | def flush_gradients(self): method update (line 695) | def update(self, cur_loss=None): method loss (line 707) | def loss(self, X, target, neg_samples=None, retain_derived=True): method _loss (line 760) | def _loss(self, X, target, neg_samples): method grad (line 818) | def grad(self, retain_grads=True, update_params=True): method _grad (line 858) | def _grad(self, X, input_idx): FILE: numpy_ml/neural_nets/models/vae.py class BernoulliVAE (line 12) | class BernoulliVAE(object): method __init__ (line 13) | def __init__( method _init_params (line 137) | def _init_params(self): method _build_encoder (line 142) | def _build_encoder(self): method _build_decoder (line 191) | def _build_decoder(self): method parameters (line 211) | def parameters(self): method hyperparameters (line 220) | def hyperparameters(self): method derived_variables (line 250) | def derived_variables(self): method gradients (line 275) | def gradients(self): method _sample (line 283) | def _sample(self, t_mean, t_log_var): method forward (line 308) | def forward(self, X_train): method backward (line 341) | def backward(self, X_train, X_recon): method update (line 387) | def update(self, cur_loss=None): method flush_gradients (line 395) | def flush_gradients(self): method fit (line 402) | def fit(self, X_train, n_epochs=20, batchsize=128, verbose=True): FILE: numpy_ml/neural_nets/models/w2v.py class Word2Vec (line 12) | class Word2Vec(object): method __init__ (line 13) | def __init__( method _init_params (line 125) | def _init_params(self): method parameters (line 147) | def parameters(self): method hyperparameters (line 158) | def hyperparameters(self): method derived_variables (line 183) | def derived_variables(self): method gradients (line 196) | def gradients(self): method forward (line 206) | def forward(self, X, targets, retain_derived=True): method backward (line 235) | def backward(self): method update (line 242) | def update(self, cur_loss=None): method flush_gradients (line 248) | def flush_gradients(self): method get_embedding (line 253) | def get_embedding(self, word_ids): method _build_noise_distribution (line 271) | def _build_noise_distribution(self): method _train_epoch (line 296) | def _train_epoch(self, corpus_fps, encoding): method _train_batch (line 308) | def _train_batch(self, X, target): method minibatcher (line 314) | def minibatcher(self, corpus_fps, encoding): method fit (line 399) | def fit( FILE: numpy_ml/neural_nets/models/wgan_gp.py class WGAN_GP (line 11) | class WGAN_GP(object): method __init__ (line 66) | def __init__( method _init_params (line 104) | def _init_params(self): method _build_generator (line 111) | def _build_generator(self): method _build_critic (line 132) | def _build_critic(self): method hyperparameters (line 154) | def hyperparameters(self): method parameters (line 170) | def parameters(self): method derived_variables (line 179) | def derived_variables(self): method gradients (line 192) | def gradients(self): method forward (line 206) | def forward(self, X, module, retain_derived=True): method backward (line 246) | def backward(self, grad, module, retain_grads=True): method _dGradInterp (line 284) | def _dGradInterp(self, dLdGradInterp, dYi_outs): method update_critic (line 304) | def update_critic(self, X_real): method update_generator (line 395) | def update_generator(self, X_shape): method flush_gradients (line 424) | def flush_gradients(self, module): method update (line 436) | def update(self, module, module_loss=None): method fit (line 449) | def fit( FILE: numpy_ml/neural_nets/modules/modules.py class ModuleBase (line 21) | class ModuleBase(ABC): method __init__ (line 22) | def __init__(self): method _init_params (line 29) | def _init_params(self, **kwargs): method forward (line 33) | def forward(self, z, **kwargs): method backward (line 37) | def backward(self, out, **kwargs): method components (line 41) | def components(self): method freeze (line 48) | def freeze(self): method unfreeze (line 53) | def unfreeze(self): method update (line 58) | def update(self, cur_loss=None): method flush_gradients (line 64) | def flush_gradients(self): method set_params (line 76) | def set_params(self, summary_dict): method summary (line 111) | def summary(self): class WavenetResidualModule (line 119) | class WavenetResidualModule(ModuleBase): method __init__ (line 120) | def __init__( method _init_params (line 183) | def _init_params(self): method parameters (line 216) | def parameters(self): method hyperparameters (line 229) | def hyperparameters(self): method derived_variables (line 256) | def derived_variables(self): method gradients (line 275) | def gradients(self): method forward (line 287) | def forward(self, X_main, X_skip=None): method backward (line 330) | def backward(self, dY_skip, dY_main=None): class SkipConnectionIdentityModule (line 360) | class SkipConnectionIdentityModule(ModuleBase): method __init__ (line 361) | def __init__( method _init_params (line 445) | def _init_params(self): method _init_conv2 (line 463) | def _init_conv2(self): method parameters (line 475) | def parameters(self): method hyperparameters (line 488) | def hyperparameters(self): method derived_variables (line 514) | def derived_variables(self): method gradients (line 534) | def gradients(self): method forward (line 546) | def forward(self, X, retain_derived=True): method backward (line 583) | def backward(self, dLdY, retain_grads=True): class SkipConnectionConvModule (line 615) | class SkipConnectionConvModule(ModuleBase): method __init__ (line 616) | def __init__( method _init_params (line 728) | def _init_params(self, X=None): method _calc_skip_padding (line 755) | def _calc_skip_padding(self, X): method _init_conv_skip (line 790) | def _init_conv_skip(self, X): method parameters (line 803) | def parameters(self): method hyperparameters (line 820) | def hyperparameters(self): method derived_variables (line 863) | def derived_variables(self): method gradients (line 889) | def gradients(self): method forward (line 905) | def forward(self, X, retain_derived=True): method backward (line 948) | def backward(self, dLdY, retain_grads=True): class BidirectionalLSTM (line 987) | class BidirectionalLSTM(ModuleBase): method __init__ (line 988) | def __init__( method _init_params (line 1033) | def _init_params(self): method forward (line 1049) | def forward(self, X): method backward (line 1092) | def backward(self, dLdA): method derived_variables (line 1143) | def derived_variables(self): method gradients (line 1154) | def gradients(self): method parameters (line 1164) | def parameters(self): method hyperparameters (line 1174) | def hyperparameters(self): class MultiHeadedAttentionModule (line 1192) | class MultiHeadedAttentionModule(ModuleBase): method __init__ (line 1193) | def __init__(self, n_heads=8, dropout_p=0, init="glorot_uniform", opti... method _init_params (line 1290) | def _init_params(self): method forward (line 1313) | def forward(self, Q, K, V): method backward (line 1343) | def backward(self, dLdy): method derived_variables (line 1365) | def derived_variables(self): method gradients (line 1384) | def gradients(self): method parameters (line 1397) | def parameters(self): method hyperparameters (line 1410) | def hyperparameters(self): FILE: numpy_ml/neural_nets/optimizers/optimizers.py class OptimizerBase (line 8) | class OptimizerBase(ABC): method __init__ (line 9) | def __init__(self, lr, scheduler=None): method __call__ (line 22) | def __call__(self, param, param_grad, param_name, cur_loss=None): method step (line 25) | def step(self): method reset_step (line 29) | def reset_step(self): method copy (line 33) | def copy(self): method set_params (line 37) | def set_params(self, hparam_dict=None, cache_dict=None): method update (line 54) | def update(self, param, param_grad, param_name, cur_loss=None): class SGD (line 58) | class SGD(OptimizerBase): method __init__ (line 59) | def __init__( method __str__ (line 103) | def __str__(self): method update (line 110) | def update(self, param, param_grad, param_name, cur_loss=None): class AdaGrad (line 156) | class AdaGrad(OptimizerBase): method __init__ (line 157) | def __init__(self, lr=0.01, eps=1e-7, clip_norm=None, lr_scheduler=Non... method __str__ (line 208) | def __str__(self): method update (line 215) | def update(self, param, param_grad, param_name, cur_loss=None): class RMSProp (line 262) | class RMSProp(OptimizerBase): method __init__ (line 263) | def __init__( method __str__ (line 314) | def __str__(self): method update (line 322) | def update(self, param, param_grad, param_name, cur_loss=None): class Adam (line 364) | class Adam(OptimizerBase): method __init__ (line 365) | def __init__( method __str__ (line 419) | def __str__(self): method update (line 427) | def update(self, param, param_grad, param_name, cur_loss=None): FILE: numpy_ml/neural_nets/schedulers/schedulers.py function gaussian_cdf (line 9) | def gaussian_cdf(x, mean, var): class SchedulerBase (line 19) | class SchedulerBase(ABC): method __init__ (line 20) | def __init__(self): method __call__ (line 24) | def __call__(self, step=None, cur_loss=None): method copy (line 27) | def copy(self): method set_params (line 31) | def set_params(self, hparam_dict): method learning_rate (line 39) | def learning_rate(self, step=None): class ConstantScheduler (line 43) | class ConstantScheduler(SchedulerBase): method __init__ (line 44) | def __init__(self, lr=0.01, **kwargs): method __str__ (line 57) | def __str__(self): method learning_rate (line 60) | def learning_rate(self, **kwargs): class ExponentialScheduler (line 72) | class ExponentialScheduler(SchedulerBase): method __init__ (line 73) | def __init__( method __str__ (line 119) | def __str__(self): method learning_rate (line 124) | def learning_rate(self, step, **kwargs): class NoamScheduler (line 144) | class NoamScheduler(SchedulerBase): method __init__ (line 145) | def __init__(self, model_dim=512, scale_factor=1, warmup_steps=4000, *... method __str__ (line 187) | def __str__(self): method learning_rate (line 192) | def learning_rate(self, step, **kwargs): class KingScheduler (line 198) | class KingScheduler(SchedulerBase): method __init__ (line 199) | def __init__(self, initial_lr=0.01, patience=1000, decay=0.99, **kwargs): method __str__ (line 241) | def __str__(self): method _steps_without_decrease (line 246) | def _steps_without_decrease(self, robust=False, check_all=False): method _p_decreasing (line 289) | def _p_decreasing(self, loss_history, i): method learning_rate (line 325) | def learning_rate(self, step, cur_loss): FILE: numpy_ml/neural_nets/utils/utils.py function minibatch (line 8) | def minibatch(X, batchsize=256, shuffle=True): function calc_pad_dims_2D (line 51) | def calc_pad_dims_2D(X_shape, out_dim, kernel_shape, stride, dilation=0): function calc_pad_dims_1D (line 123) | def calc_pad_dims_1D(X_shape, l_out, kernel_width, stride, dilation=0, c... function pad1D (line 195) | def pad1D(X, pad, kernel_width=None, stride=None, dilation=0): function pad2D (line 252) | def pad2D(X, pad, kernel_shape=None, stride=None, dilation=0): function dilate (line 309) | def dilate(X, d): function calc_fan (line 352) | def calc_fan(weight_shape): function calc_conv_out_dims (line 380) | def calc_conv_out_dims(X_shape, W_shape, stride=1, pad=0, dilation=0): function _im2col_indices (line 447) | def _im2col_indices(X_shape, fr, fc, p, s, d=0): function im2col (line 486) | def im2col(X, W_shape, pad, stride, dilation=0): function col2im (line 546) | def col2im(X_col, X_shape, W_shape, pad, stride, dilation=0): function conv2D (line 603) | def conv2D(X, W, stride, pad, dilation=0): function conv1D (line 668) | def conv1D(X, W, stride, pad, dilation=0): function deconv2D_naive (line 720) | def deconv2D_naive(X, W, stride, pad, dilation=0): function conv2D_naive (line 797) | def conv2D_naive(X, W, stride, pad, dilation=0): function he_uniform (line 864) | def he_uniform(weight_shape): function he_normal (line 895) | def he_normal(weight_shape): function glorot_uniform (line 926) | def glorot_uniform(weight_shape, gain=1.0): function glorot_normal (line 962) | def glorot_normal(weight_shape, gain=1.0): function truncated_normal (line 998) | def truncated_normal(mean, std, out_shape): FILE: numpy_ml/neural_nets/wrappers/wrappers.py class WrapperBase (line 11) | class WrapperBase(ABC): method __init__ (line 12) | def __init__(self, wrapped_layer): method _init_wrapper_params (line 20) | def _init_wrapper_params(self): method forward (line 24) | def forward(self, z, **kwargs): method backward (line 29) | def backward(self, out, **kwargs): method trainable (line 34) | def trainable(self): method parameters (line 39) | def parameters(self): method hyperparameters (line 44) | def hyperparameters(self): method derived_variables (line 55) | def derived_variables(self): method gradients (line 68) | def gradients(self): method act_fn (line 73) | def act_fn(self): method X (line 78) | def X(self): method _init_params (line 82) | def _init_params(self): method freeze (line 89) | def freeze(self): method unfreeze (line 96) | def unfreeze(self): method flush_gradients (line 100) | def flush_gradients(self): method update (line 108) | def update(self, lr): method _set_wrapper_params (line 117) | def _set_wrapper_params(self, pdict): method set_params (line 123) | def set_params(self, summary_dict): method summary (line 142) | def summary(self): class Dropout (line 152) | class Dropout(WrapperBase): method __init__ (line 153) | def __init__(self, wrapped_layer, p): method _init_wrapper_params (line 177) | def _init_wrapper_params(self): method forward (line 181) | def forward(self, X, retain_derived=True): method backward (line 212) | def backward(self, dLdy, retain_grads=True): function init_wrappers (line 235) | def init_wrappers(layer, wrappers_list): FILE: numpy_ml/ngram/ngram.py class NGramBase (line 12) | class NGramBase(ABC): method __init__ (line 13) | def __init__(self, N, unk=True, filter_stopwords=True, filter_punctuat... method train (line 38) | def train(self, corpus_fp, vocab=None, encoding=None): method _train (line 62) | def _train(self, corpus_fp, vocab=None, encoding=None): method completions (line 105) | def completions(self, words, N): method generate (line 135) | def generate(self, N, seed_words=[""], n_sentences=5): method perplexity (line 178) | def perplexity(self, words, N): method cross_entropy (line 220) | def cross_entropy(self, words, N): method _log_prob (line 255) | def _log_prob(self, words, N): method _n_completions (line 271) | def _n_completions(self, words, N): method _num_grams_with_count (line 285) | def _num_grams_with_count(self, C, N): method log_prob (line 300) | def log_prob(self, words, N): method _log_ngram_prob (line 308) | def _log_ngram_prob(self, ngram): class MLENGram (line 313) | class MLENGram(NGramBase): method __init__ (line 314) | def __init__(self, N, unk=True, filter_stopwords=True, filter_punctuat... method log_prob (line 335) | def log_prob(self, words, N): method _log_ngram_prob (line 356) | def _log_ngram_prob(self, ngram): class AdditiveNGram (line 364) | class AdditiveNGram(NGramBase): method __init__ (line 365) | def __init__( method log_prob (line 402) | def log_prob(self, words, N): method _log_ngram_prob (line 446) | def _log_ngram_prob(self, ngram): class GoodTuringNGram (line 459) | class GoodTuringNGram(NGramBase): method __init__ (line 460) | def __init__( method train (line 490) | def train(self, corpus_fp, vocab=None, encoding=None): method log_prob (line 512) | def log_prob(self, words, N): method _calc_smoothed_counts (line 571) | def _calc_smoothed_counts(self): method _log_ngram_prob (line 629) | def _log_ngram_prob(self, ngram): method _fit_count_models (line 644) | def _fit_count_models(self): FILE: numpy_ml/nonparametric/gp.py class GPRegression (line 18) | class GPRegression: method __init__ (line 19) | def __init__(self, kernel="RBFKernel", alpha=1e-10): method fit (line 44) | def fit(self, X, y): method predict (line 64) | def predict(self, X, conf_interval=0.95, return_cov=False): method marginal_log_likelihood (line 156) | def marginal_log_likelihood(self, kernel_params=None): method sample (line 223) | def sample(self, X, n_samples=1, dist="posterior_predictive"): FILE: numpy_ml/nonparametric/kernel_regression.py class KernelRegression (line 4) | class KernelRegression: method __init__ (line 5) | def __init__(self, kernel=None): method fit (line 40) | def fit(self, X, y): method predict (line 53) | def predict(self, X): FILE: numpy_ml/nonparametric/knn.py class KNN (line 9) | class KNN: method __init__ (line 10) | def __init__( method fit (line 47) | def fit(self, X, y): method predict (line 62) | def predict(self, X): FILE: numpy_ml/plots/bandit_plots.py function random_multinomial_mab (line 23) | def random_multinomial_mab(n_arms=10, n_choices_per_arm=5, reward_range=... function random_bernoulli_mab (line 39) | def random_bernoulli_mab(n_arms=10): function plot_epsilon_greedy_multinomial_payoff (line 46) | def plot_epsilon_greedy_multinomial_payoff(): function plot_ucb1_multinomial_payoff (line 65) | def plot_ucb1_multinomial_payoff(): function plot_thompson_sampling_beta_binomial_payoff (line 82) | def plot_thompson_sampling_beta_binomial_payoff(): function plot_lin_ucb (line 99) | def plot_lin_ucb(): function plot_ucb1_gaussian_shortest_path (line 114) | def plot_ucb1_gaussian_shortest_path(): function plot_comparison (line 151) | def plot_comparison(): FILE: numpy_ml/plots/gmm_plots.py function plot_countour (line 20) | def plot_countour(X, x, y, z, ax, xlim, ylim): function plot_clusters (line 41) | def plot_clusters(model, X, ax): function plot (line 72) | def plot(): FILE: numpy_ml/plots/hmm_plots.py function generate_training_data (line 16) | def generate_training_data(params, n_steps=500, n_examples=15): function default_hmm (line 32) | def default_hmm(): function plot_matrices (line 58) | def plot_matrices(params, best, best_theirs): function test_HMM (line 130) | def test_HMM(): FILE: numpy_ml/plots/lda_plots.py function generate_corpus (line 16) | def generate_corpus(): function plot_unsmoothed (line 62) | def plot_unsmoothed(): FILE: numpy_ml/plots/lm_plots.py function random_binary_tensor (line 33) | def random_binary_tensor(shape, sparsity=0.5): function random_regression_problem (line 38) | def random_regression_problem(n_ex, n_in, n_out, intercept=0, std=1, see... function random_classification_problem (line 54) | def random_classification_problem(n_ex, n_classes, n_in, seed=0): function plot_logistic (line 69) | def plot_logistic(): function plot_bayes (line 112) | def plot_bayes(): function plot_regression (line 219) | def plot_regression(): FILE: numpy_ml/plots/ngram_plots.py function plot_count_models (line 15) | def plot_count_models(GT, N): function compare_probs (line 31) | def compare_probs(fp, N): function plot_gt_freqs (line 80) | def plot_gt_freqs(fp): FILE: numpy_ml/plots/nn_activations_plots.py function plot_activations (line 25) | def plot_activations(): FILE: numpy_ml/plots/nn_schedulers_plots.py function king_loss_fn (line 21) | def king_loss_fn(x): function plot_schedulers (line 32) | def plot_schedulers(): FILE: numpy_ml/plots/nonparametric_plots.py function random_regression_problem (line 18) | def random_regression_problem(n_ex, n_in, n_out, d=3, intercept=0, std=1... function plot_regression (line 35) | def plot_regression(): function plot_knn (line 104) | def plot_knn(): function plot_gp (line 166) | def plot_gp(): function plot_gp_dist (line 196) | def plot_gp_dist(): FILE: numpy_ml/plots/rl_plots.py function test_cross_entropy_agent (line 13) | def test_cross_entropy_agent(): function test_monte_carlo_agent (line 28) | def test_monte_carlo_agent(): function test_temporal_difference_agent (line 52) | def test_temporal_difference_agent(): function test_dyna_agent (line 92) | def test_dyna_agent(): FILE: numpy_ml/plots/trees_plots.py function plot (line 20) | def plot(): FILE: numpy_ml/preprocessing/dsp.py function batch_resample (line 11) | def batch_resample(X, new_dim, mode="bilinear"): function nn_interpolate_2D (line 53) | def nn_interpolate_2D(X, x, y): function nn_interpolate_1D (line 84) | def nn_interpolate_1D(X, t): function bilinear_interpolate (line 106) | def bilinear_interpolate(X, x, y): function DCT (line 161) | def DCT(frame, orthonormal=True): function __DCT2 (line 212) | def __DCT2(frame): function DFT (line 224) | def DFT(frame, positive_only=True): function dft_bins (line 276) | def dft_bins(N, fs=44000, positive_only=True): function magnitude_spectrum (line 304) | def magnitude_spectrum(frames): function power_spectrum (line 323) | def power_spectrum(frames, scale=False): function to_frames (line 354) | def to_frames(x, frame_width, stride, writeable=False): function autocorrelate1D (line 416) | def autocorrelate1D(x): function preemphasis (line 458) | def preemphasis(x, alpha): function cepstral_lifter (line 489) | def cepstral_lifter(mfccs, D): function mel_spectrogram (line 523) | def mel_spectrogram( function mfcc (line 613) | def mfcc( function mel2hz (line 719) | def mel2hz(mel, formula="htk"): function hz2mel (line 745) | def hz2mel(hz, formula="htk"): function mel_filterbank (line 772) | def mel_filterbank( FILE: numpy_ml/preprocessing/general.py function minibatch (line 16) | def minibatch(X, batchsize=256, shuffle=True): class OneHotEncoder (line 54) | class OneHotEncoder: method __init__ (line 55) | def __init__(self): method __call__ (line 69) | def __call__(self, labels): method fit (line 72) | def fit(self, categories): method transform (line 86) | def transform(self, labels, categories=None): method inverse_transform (line 119) | def inverse_transform(self, Y): class Standardizer (line 141) | class Standardizer: method __init__ (line 142) | def __init__(self, with_mean=True, with_std=True): method hyperparameters (line 172) | def hyperparameters(self): method parameters (line 177) | def parameters(self): method __call__ (line 184) | def __call__(self, X): method fit (line 187) | def fit(self, X): method transform (line 216) | def transform(self, X): method inverse_transform (line 244) | def inverse_transform(self, Z): class FeatureHasher (line 275) | class FeatureHasher: method __init__ (line 276) | def __init__(self, n_dim=256, sparse=True): method encode (line 301) | def encode(self, examples): method _encode_dense (line 348) | def _encode_dense(self, examples): method _encode_sparse (line 368) | def _encode_sparse(self, examples): FILE: numpy_ml/preprocessing/nlp.py function ngrams (line 58) | def ngrams(sequence, N): function tokenize_whitespace (line 64) | def tokenize_whitespace( function tokenize_words (line 77) | def tokenize_words( function tokenize_words_bytes (line 89) | def tokenize_words_bytes( function tokenize_bytes_raw (line 112) | def tokenize_bytes_raw(line, encoding="utf-8", splitter=None, **kwargs): function bytes_to_chars (line 141) | def bytes_to_chars(byte_list, encoding="utf-8"): function tokenize_chars (line 151) | def tokenize_chars(line, lowercase=True, filter_punctuation=True, **kwar... function remove_stop_words (line 162) | def remove_stop_words(words): function strip_punctuation (line 167) | def strip_punctuation(line): class BytePairEncoder (line 177) | class BytePairEncoder(object): method __init__ (line 178) | def __init__(self, max_merges=3000, encoding="utf-8"): method fit (line 220) | def fit(self, corpus_fps, encoding="utf-8"): method _get_counts (line 264) | def _get_counts(self, vocab): method _merge (line 273) | def _merge(self, bigram, vocab): method transform (line 284) | def transform(self, text): method _transform (line 310) | def _transform(self, text): method inverse_transform (line 339) | def inverse_transform(self, codes): method codebook (line 377) | def codebook(self): method tokens (line 389) | def tokens(self): class Node (line 399) | class Node(object): method __init__ (line 400) | def __init__(self, key, val): method __gt__ (line 406) | def __gt__(self, other): method __ge__ (line 412) | def __ge__(self, other): method __lt__ (line 418) | def __lt__(self, other): method __le__ (line 424) | def __le__(self, other): class HuffmanEncoder (line 431) | class HuffmanEncoder(object): method fit (line 432) | def fit(self, text): method transform (line 463) | def transform(self, text): method inverse_transform (line 484) | def inverse_transform(self, codes): method tokens (line 506) | def tokens(self): method codes (line 511) | def codes(self): method _counter (line 515) | def _counter(self, text): method _build_tree (line 521) | def _build_tree(self, text): method _generate_codes (line 548) | def _generate_codes(self): method _build_code (line 554) | def _build_code(self, root, current_code): class Token (line 573) | class Token: method __init__ (line 574) | def __init__(self, word): method __repr__ (line 578) | def __repr__(self): class TFIDFEncoder (line 583) | class TFIDFEncoder: method __init__ (line 584) | def __init__( method fit (line 691) | def fit(self, corpus_seq, encoding="utf-8-sig"): method _encode_document (line 769) | def _encode_document( method _keep_top_n_tokens (line 821) | def _keep_top_n_tokens(self): method _drop_low_freq_tokens (line 865) | def _drop_low_freq_tokens(self): method _sort_tokens (line 904) | def _sort_tokens(self): method _calc_idf (line 934) | def _calc_idf(self): method transform (line 964) | def transform(self, ignore_special_chars=True): class Vocabulary (line 1008) | class Vocabulary: method __init__ (line 1009) | def __init__( method __len__ (line 1060) | def __len__(self): method __iter__ (line 1064) | def __iter__(self): method __contains__ (line 1068) | def __contains__(self, word): method __getitem__ (line 1072) | def __getitem__(self, key): method n_tokens (line 1083) | def n_tokens(self): method n_words (line 1088) | def n_words(self): method shape (line 1093) | def shape(self): method most_common (line 1097) | def most_common(self, n=5): method words_with_count (line 1101) | def words_with_count(self, k): method filter (line 1105) | def filter(self, words, unk=True): # noqa: A003 method words_to_indices (line 1128) | def words_to_indices(self, words): method indices_to_words (line 1148) | def indices_to_words(self, indices): method fit (line 1166) | def fit(self, corpus_fps, encoding="utf-8-sig"): method _keep_top_n_tokens (line 1264) | def _keep_top_n_tokens(self): method _drop_low_freq_tokens (line 1298) | def _drop_low_freq_tokens(self): FILE: numpy_ml/rl_models/agents.py class AgentBase (line 12) | class AgentBase(ABC): method __init__ (line 13) | def __init__(self, env): method _create_2num_dicts (line 21) | def _create_2num_dicts(self, obs_encoder=None, act_encoder=None): method flush_history (line 40) | def flush_history(self): method act (line 46) | def act(self, obs): method greedy_policy (line 51) | def greedy_policy(self, **kwargs): method run_episode (line 65) | def run_episode(self, max_steps, render=False): method update (line 87) | def update(self): class CrossEntropyAgent (line 101) | class CrossEntropyAgent(AgentBase): method __init__ (line 102) | def __init__(self, env, n_samples_per_episode=500, retain_prcnt=0.2): method _init_params (line 164) | def _init_params(self): method act (line 195) | def act(self, obs): method run_episode (line 238) | def run_episode(self, max_steps, render=False): method _episode (line 278) | def _episode(self, W, b, max_steps, render): method update (line 328) | def update(self): method _sample_thetas (line 350) | def _sample_thetas(self): method greedy_policy (line 360) | def greedy_policy(self, max_steps, render=True): class MonteCarloAgent (line 391) | class MonteCarloAgent(AgentBase): method __init__ (line 392) | def __init__(self, env, off_policy=False, temporal_discount=0.9, epsil... method _init_params (line 422) | def _init_params(self): method _epsilon_soft_policy (line 458) | def _epsilon_soft_policy(self, s, a=None): method _greedy (line 529) | def _greedy(self, s, a=None): method _on_policy_update (line 562) | def _on_policy_update(self): method _off_policy_update (line 599) | def _off_policy_update(self): method act (line 642) | def act(self, obs): method run_episode (line 661) | def run_episode(self, max_steps, render=False): method _episode (line 685) | def _episode(self, max_steps, render): method update (line 732) | def update(self): method greedy_policy (line 745) | def greedy_policy(self, max_steps, render=True): class TemporalDifferenceAgent (line 793) | class TemporalDifferenceAgent(AgentBase): method __init__ (line 794) | def __init__( method _init_params (line 901) | def _init_params(self): method run_episode (line 945) | def run_episode(self, max_steps, render=False): method train_episode (line 967) | def train_episode(self, max_steps, render=False): method _episode (line 992) | def _episode(self, max_steps, render, update=True): method _epsilon_soft_policy (line 1054) | def _epsilon_soft_policy(self, s, a=None): method _greedy (line 1119) | def _greedy(self, s, a=None): method _on_policy_update (line 1155) | def _on_policy_update(self, s, a, r, s_, a_): method _off_policy_update (line 1198) | def _off_policy_update(self, s, a, r, s_): method update (line 1224) | def update(self): method act (line 1235) | def act(self, obs): method greedy_policy (line 1254) | def greedy_policy(self, max_steps, render=True): class DynaAgent (line 1304) | class DynaAgent(AgentBase): method __init__ (line 1305) | def __init__( method _init_params (line 1428) | def _init_params(self): method act (line 1480) | def act(self, obs): method _epsilon_soft_policy (line 1499) | def _epsilon_soft_policy(self, s, a=None): method _greedy (line 1564) | def _greedy(self, s, a=None): method update (line 1600) | def update(self): method _update_queue (line 1620) | def _update_queue(self, s, a): method _calc_priority (line 1642) | def _calc_priority(self, s, a): method _simulate_behavior (line 1678) | def _simulate_behavior(self): method _update (line 1717) | def _update(self, s, a): method run_episode (line 1752) | def run_episode(self, max_steps, render=False): method train_episode (line 1773) | def train_episode(self, max_steps, render=False): method _episode (line 1796) | def _episode(self, max_steps, render, update=True): method greedy_policy (line 1868) | def greedy_policy(self, max_steps, render=True): FILE: numpy_ml/rl_models/rl_utils.py class EnvModel (line 28) | class EnvModel(object): method __init__ (line 44) | def __init__(self): method __setitem__ (line 48) | def __setitem__(self, key, value): method __getitem__ (line 53) | def __getitem__(self, key): method __contains__ (line 58) | def __contains__(self, key): method state_action_pairs (line 65) | def state_action_pairs(self): method reward_outcome_pairs (line 69) | def reward_outcome_pairs(self, s, a): method outcome_probs (line 76) | def outcome_probs(self, s, a): method state_action_pairs_leading_to_outcome (line 100) | def state_action_pairs_leading_to_outcome(self, outcome): function tile_state_space (line 124) | def tile_state_space( function get_gym_environs (line 200) | def get_gym_environs(): function get_gym_stats (line 205) | def get_gym_stats(): function is_tuple (line 231) | def is_tuple(env): function is_multidimensional (line 257) | def is_multidimensional(env): function is_continuous (line 297) | def is_continuous(env, tuple_action, tuple_obs): function action_stats (line 334) | def action_stats(env, md_action, cont_action): function obs_stats (line 382) | def obs_stats(env, md_obs, cont_obs): function env_stats (line 430) | def env_stats(env): FILE: numpy_ml/rl_models/tiles/tiles3.py class IHT (line 36) | class IHT: method __init__ (line 39) | def __init__(self, sizeval): method __str__ (line 44) | def __str__(self): method count (line 57) | def count(self): method fullp (line 60) | def fullp(self): method getindex (line 63) | def getindex(self, obj, readonly=False): function hashcoords (line 81) | def hashcoords(coordinates, m, readonly=False): function tiles (line 90) | def tiles(ihtORsize, numtilings, floats, ints=[], readonly=False): function tileswrap (line 106) | def tileswrap(ihtORsize, numtilings, floats, wrapwidths, ints=[], readon... FILE: numpy_ml/rl_models/trainer.py class Trainer (line 5) | class Trainer(object): method __init__ (line 6) | def __init__(self, agent, env): method _train_episode (line 21) | def _train_episode(self, max_steps, render_every=None): method train (line 33) | def train( method plot_rewards (line 103) | def plot_rewards(self, rwd_greedy): FILE: numpy_ml/tests/nn_torch_models.py function torchify (line 17) | def torchify(var, requires_grad=True): function torch_gradient_generator (line 21) | def torch_gradient_generator(fn, **kwargs): function torch_xe_grad (line 32) | def torch_xe_grad(y, z): function torch_mse_grad (line 41) | def torch_mse_grad(y, z, act_fn): class TorchVAELoss (line 51) | class TorchVAELoss(nn.Module): method __init__ (line 52) | def __init__(self): method extract_grads (line 55) | def extract_grads(self, X, X_recon, t_mean, t_log_var): class TorchWGANGPLoss (line 82) | class TorchWGANGPLoss(nn.Module): method __init__ (line 83) | def __init__(self, lambda_=10): method forward (line 87) | def forward(self, Y_real, Y_fake, gradInterp): method extract_grads (line 103) | def extract_grads(self, Y_real, Y_fake, gradInterp): class TorchLinearActivation (line 124) | class TorchLinearActivation(nn.Module): method __init__ (line 125) | def __init__(self): method forward (line 130) | def forward(input): method backward (line 134) | def backward(grad_output): class TorchBatchNormLayer (line 138) | class TorchBatchNormLayer(nn.Module): method __init__ (line 139) | def __init__(self, n_in, params, mode, momentum=0.9, epsilon=1e-5): method forward (line 157) | def forward(self, X): method extract_grads (line 169) | def extract_grads(self, X, Y_true=None): class TorchLayerNormLayer (line 216) | class TorchLayerNormLayer(nn.Module): method __init__ (line 217) | def __init__(self, feat_dims, params, mode, epsilon=1e-5): method forward (line 236) | def forward(self, X): method extract_grads (line 248) | def extract_grads(self, X, Y_true=None): class TorchAddLayer (line 301) | class TorchAddLayer(nn.Module): method __init__ (line 302) | def __init__(self, act_fn, **kwargs): method forward (line 306) | def forward(self, Xs): method extract_grads (line 330) | def extract_grads(self, X): class TorchMultiplyLayer (line 347) | class TorchMultiplyLayer(nn.Module): method __init__ (line 348) | def __init__(self, act_fn, **kwargs): method forward (line 352) | def forward(self, Xs): method extract_grads (line 376) | def extract_grads(self, X): class TorchSkipConnectionIdentity (line 393) | class TorchSkipConnectionIdentity(nn.Module): method __init__ (line 394) | def __init__(self, act_fn, pad1, pad2, params, hparams, momentum=0.9, ... method forward (line 460) | def forward(self, X): method extract_grads (line 490) | def extract_grads(self, X): class TorchCausalConv1d (line 541) | class TorchCausalConv1d(torch.nn.Conv1d): method __init__ (line 548) | def __init__( method forward (line 571) | def forward(self, input): class TorchWavenetModule (line 578) | class TorchWavenetModule(nn.Module): method __init__ (line 579) | def __init__(self, params, hparams, conv_1x1_pad): method forward (line 618) | def forward(self, X_main, X_skip): method extract_grads (line 650) | def extract_grads(self, X_main, X_skip): class TorchSkipConnectionConv (line 715) | class TorchSkipConnectionConv(nn.Module): method __init__ (line 716) | def __init__( method forward (line 813) | def forward(self, X): method extract_grads (line 849) | def extract_grads(self, X): class TorchBidirectionalLSTM (line 920) | class TorchBidirectionalLSTM(nn.Module): method __init__ (line 921) | def __init__(self, n_in, n_out, params, **kwargs): method forward (line 1000) | def forward(self, X): method extract_grads (line 1018) | def extract_grads(self, X): class TorchPool2DLayer (line 1103) | class TorchPool2DLayer(nn.Module): method __init__ (line 1104) | def __init__(self, in_channels, hparams, **kwargs): method forward (line 1120) | def forward(self, X): method extract_grads (line 1131) | def extract_grads(self, X): class TorchConv2DLayer (line 1149) | class TorchConv2DLayer(nn.Module): method __init__ (line 1150) | def __init__(self, in_channels, out_channels, act_fn, params, hparams,... method forward (line 1175) | def forward(self, X): method extract_grads (line 1190) | def extract_grads(self, X): class TorchConv1DLayer (line 1213) | class TorchConv1DLayer(nn.Module): method __init__ (line 1214) | def __init__(self, in_channels, out_channels, act_fn, params, hparams,... method forward (line 1239) | def forward(self, X): method extract_grads (line 1254) | def extract_grads(self, X): class TorchDeconv2DLayer (line 1277) | class TorchDeconv2DLayer(nn.Module): method __init__ (line 1278) | def __init__(self, in_channels, out_channels, act_fn, params, hparams,... method forward (line 1303) | def forward(self, X): method extract_grads (line 1318) | def extract_grads(self, X): class TorchLSTMCell (line 1341) | class TorchLSTMCell(nn.Module): method __init__ (line 1342) | def __init__(self, n_in, n_out, params, **kwargs): method forward (line 1371) | def forward(self, X): method extract_grads (line 1411) | def extract_grads(self, X): class TorchRNNCell (line 1462) | class TorchRNNCell(nn.Module): method __init__ (line 1463) | def __init__(self, n_in, n_hid, params, **kwargs): method forward (line 1477) | def forward(self, X): method extract_grads (line 1508) | def extract_grads(self, X): class TorchFCLayer (line 1529) | class TorchFCLayer(nn.Module): method __init__ (line 1530) | def __init__(self, n_in, n_hid, act_fn, params, **kwargs): method forward (line 1544) | def forward(self, X): method extract_grads (line 1555) | def extract_grads(self, X): class TorchEmbeddingLayer (line 1573) | class TorchEmbeddingLayer(nn.Module): method __init__ (line 1574) | def __init__(self, vocab_size, n_out, params, **kwargs): method forward (line 1582) | def forward(self, X): method extract_grads (line 1590) | def extract_grads(self, X): class TorchSDPAttentionLayer (line 1604) | class TorchSDPAttentionLayer(nn.Module): method __init__ (line 1605) | def __init__(self): method forward (line 1608) | def forward(self, Q, K, V, mask=None): method extract_grads (line 1636) | def extract_grads(self, Q, K, V, mask=None): class TorchMultiHeadedAttentionModule (line 1657) | class TorchMultiHeadedAttentionModule(nn.Module): method __init__ (line 1658) | def __init__(self, params, hparams): method forward (line 1699) | def forward(self, Q, K, V, mask=None): method extract_grads (line 1761) | def extract_grads(self, Q, K, V, mask=None): function param (line 1816) | def param(name, *args, **kwargs): function params_with_name (line 1842) | def params_with_name(name): function ReLULayer (line 1846) | def ReLULayer(name, n_in, n_out, inputs, w_initialization): function LinearLayer (line 1859) | def LinearLayer(name, n_in, n_out, inputs, w_initialization): function Generator (line 1871) | def Generator(n_samples, X_real, params=None): function Discriminator (line 1901) | def Discriminator(inputs, params=None): function WGAN_GP_tf (line 1944) | def WGAN_GP_tf(X, lambda_, params, batch_size): function TFNCELoss (line 2192) | def TFNCELoss(X, target_word, L): FILE: numpy_ml/tests/test_glm.py function test_glm (line 10) | def test_glm(N=20): FILE: numpy_ml/tests/test_linear_regression.py function test_linear_regression (line 10) | def test_linear_regression(N=10): FILE: numpy_ml/tests/test_naive_bayes.py function test_GaussianNB (line 12) | def test_GaussianNB(N=10): FILE: numpy_ml/tests/test_ngram.py class MLEGold (line 12) | class MLEGold: method __init__ (line 13) | def __init__( method train (line 30) | def train(self, corpus_fp, vocab=None, encoding=None): method log_prob (line 90) | def log_prob(self, words, N): method _log_ngram_prob (line 102) | def _log_ngram_prob(self, ngram): class AdditiveGold (line 107) | class AdditiveGold: method __init__ (line 108) | def __init__( method train (line 125) | def train(self, corpus_fp, vocab=None, encoding=None): method log_prob (line 185) | def log_prob(self, words, N): method _log_ngram_prob (line 197) | def _log_ngram_prob(self, ngram): function test_mle (line 202) | def test_mle(): function test_additive (line 227) | def test_additive(): FILE: numpy_ml/tests/test_nn.py function err_fmt (line 64) | def err_fmt(params, golds, ix, warn_str=""): function test_squared_error (line 84) | def test_squared_error(N=15): function test_cross_entropy (line 117) | def test_cross_entropy(N=15): function test_VAE_loss (line 147) | def test_VAE_loss(N=15): function test_WGAN_GP_loss (line 189) | def test_WGAN_GP_loss(N=5): function test_NCELoss (line 241) | def test_NCELoss(N=1): function test_squared_error_grad (line 339) | def test_squared_error_grad(N=15): function test_cross_entropy_grad (line 368) | def test_cross_entropy_grad(N=15): function test_sigmoid_activation (line 401) | def test_sigmoid_activation(N=15): function test_elu_activation (line 420) | def test_elu_activation(N=15): function test_softmax_activation (line 442) | def test_softmax_activation(N=15): function test_relu_activation (line 461) | def test_relu_activation(N=15): function test_softplus_activation (line 480) | def test_softplus_activation(N=15): function test_sigmoid_grad (line 504) | def test_sigmoid_grad(N=15): function test_elu_grad (line 524) | def test_elu_grad(N=15): function test_tanh_grad (line 545) | def test_tanh_grad(N=15): function test_relu_grad (line 565) | def test_relu_grad(N=15): function test_softmax_grad (line 585) | def test_softmax_grad(N=15): function test_softplus_grad (line 615) | def test_softplus_grad(N=15): function test_FullyConnected (line 640) | def test_FullyConnected(N=15): function test_Embedding (line 699) | def test_Embedding(N=15): function test_BatchNorm1D (line 748) | def test_BatchNorm1D(N=15): function test_LayerNorm1D (line 800) | def test_LayerNorm1D(N=15): function test_LayerNorm2D (line 846) | def test_LayerNorm2D(N=15): function test_MultiplyLayer (line 899) | def test_MultiplyLayer(N=15): function test_AddLayer (line 955) | def test_AddLayer(N=15): function test_BatchNorm2D (line 1011) | def test_BatchNorm2D(N=15): function test_RNNCell (line 1067) | def test_RNNCell(N=15): function test_Conv2D (line 1130) | def test_Conv2D(N=15): function test_DPAttention (line 1216) | def test_DPAttention(N=15): function test_Conv1D (line 1267) | def test_Conv1D(N=15): function test_Deconv2D (line 1348) | def test_Deconv2D(N=15): function test_Pool2D (line 1430) | def test_Pool2D(N=15): function test_LSTMCell (line 1482) | def test_LSTMCell(N=15): function grad_check_RNN (line 1559) | def grad_check_RNN(model, loss_func, param_name, n_t, X, epsilon=1e-7): function test_MultiHeadedAttentionModule (line 1606) | def test_MultiHeadedAttentionModule(N=15): function test_SkipConnectionIdentityModule (line 1692) | def test_SkipConnectionIdentityModule(N=15): function test_SkipConnectionConvModule (line 1822) | def test_SkipConnectionConvModule(N=15): function test_BidirectionalLSTM (line 1990) | def test_BidirectionalLSTM(N=15): function test_WaveNetModule (line 2072) | def test_WaveNetModule(N=10): function test_pad1D (line 2174) | def test_pad1D(N=15): function test_conv (line 2273) | def test_conv(N=15): function fit_VAE (line 2307) | def fit_VAE(): function test_WGAN_GP (line 2326) | def test_WGAN_GP(N=1): FILE: numpy_ml/tests/test_nn_activations.py function torch_gradient_generator (line 14) | def torch_gradient_generator(fn, **kwargs): function err_fmt (line 30) | def err_fmt(params, golds, ix, warn_str=""): function test_sigmoid_activation (line 96) | def test_sigmoid_activation(N=50): function test_softplus_activation (line 113) | def test_softplus_activation(N=50): function test_elu_activation (line 130) | def test_elu_activation(N=50): function test_relu_activation (line 150) | def test_relu_activation(N=50): function test_selu_activation (line 167) | def test_selu_activation(N=50): function test_leakyrelu_activation (line 184) | def test_leakyrelu_activation(N=50): function test_gelu_activation (line 203) | def test_gelu_activation(N=50): function test_sigmoid_grad (line 229) | def test_sigmoid_grad(N=50): function test_elu_grad (line 247) | def test_elu_grad(N=50): function test_tanh_grad (line 266) | def test_tanh_grad(N=50): function test_relu_grad (line 284) | def test_relu_grad(N=50): function test_gelu_grad (line 302) | def test_gelu_grad(N=50): function test_selu_grad (line 322) | def test_selu_grad(N=50): function test_leakyrelu_grad (line 340) | def test_leakyrelu_grad(N=50): function test_softplus_grad (line 359) | def test_softplus_grad(N=50): FILE: numpy_ml/tests/test_nonparametric.py function test_knn_regression (line 12) | def test_knn_regression(N=15): function test_knn_clf (line 50) | def test_knn_clf(N=15): function test_gp_regression (line 87) | def test_gp_regression(N=15): FILE: numpy_ml/tests/test_preprocessing.py function test_huffman (line 36) | def test_huffman(N=15): function test_standardizer (line 56) | def test_standardizer(N=15): function test_tfidf (line 79) | def test_tfidf(N=15): function test_dct (line 119) | def test_dct(N=15): function test_dft (line 135) | def test_dft(N=15): function test_mfcc (line 150) | def test_mfcc(N=1): function test_framing (line 196) | def test_framing(N=15): function test_dft_bins (line 217) | def test_dft_bins(N=15): function test_mel_filterbank (line 232) | def test_mel_filterbank(N=15): FILE: numpy_ml/tests/test_trees.py function clone_tree (line 16) | def clone_tree(dtree): function compare_trees (line 39) | def compare_trees(mine, gold): function test_DecisionTree (line 70) | def test_DecisionTree(N=1): function test_RandomForest (line 154) | def test_RandomForest(N=1): function test_gbdt (line 255) | def test_gbdt(N=1): FILE: numpy_ml/tests/test_utils.py function test_linear_kernel (line 35) | def test_linear_kernel(N=1): function test_polynomial_kernel (line 54) | def test_polynomial_kernel(N=1): function test_radial_basis_kernel (line 76) | def test_radial_basis_kernel(N=1): function test_euclidean (line 105) | def test_euclidean(N=1): function test_hamming (line 119) | def test_hamming(N=1): function test_minkowski (line 133) | def test_minkowski(N=1): function test_chebyshev (line 148) | def test_chebyshev(N=1): function test_manhattan (line 162) | def test_manhattan(N=1): function test_ball_tree (line 181) | def test_ball_tree(N=1): function from_networkx (line 225) | def from_networkx(G_nx): function to_networkx (line 241) | def to_networkx(G): function test_all_paths (line 256) | def test_all_paths(N=1): function test_random_DAG (line 288) | def test_random_DAG(N=1): function test_topological_ordering (line 303) | def test_topological_ordering(N=1): function test_is_acyclic (line 326) | def test_is_acyclic(N=1): FILE: numpy_ml/trees/dt.py class Node (line 4) | class Node: method __init__ (line 5) | def __init__(self, left, right, rule): class Leaf (line 12) | class Leaf: method __init__ (line 13) | def __init__(self, value): class DecisionTree (line 21) | class DecisionTree: method __init__ (line 22) | def __init__( method fit (line 70) | def fit(self, X, Y): method predict (line 87) | def predict(self, X): method predict_class_probs (line 104) | def predict_class_probs(self, X): method _grow (line 122) | def _grow(self, X, Y, cur_depth=0): method _segment (line 153) | def _segment(self, X, Y, feat_idxs): method _impurity_gain (line 173) | def _impurity_gain(self, Y, split_thresh, feat_values): method _traverse (line 205) | def _traverse(self, X, node, prob=False): function mse (line 215) | def mse(y): function entropy (line 222) | def entropy(y): function gini (line 231) | def gini(y): FILE: numpy_ml/trees/gbdt.py function to_one_hot (line 7) | def to_one_hot(labels, n_classes=None): class GradientBoostedDecisionTree (line 18) | class GradientBoostedDecisionTree: method __init__ (line 19) | def __init__( method fit (line 94) | def fit(self, X, Y): method predict (line 158) | def predict(self, X): FILE: numpy_ml/trees/losses.py class ClassProbEstimator (line 8) | class ClassProbEstimator: method fit (line 9) | def fit(self, X, y): method predict (line 12) | def predict(self, X): class MeanBaseEstimator (line 18) | class MeanBaseEstimator: method fit (line 19) | def fit(self, X, y): method predict (line 22) | def predict(self, X): class MSELoss (line 33) | class MSELoss: method __call__ (line 34) | def __call__(self, y, y_pred): method base_estimator (line 37) | def base_estimator(self): method grad (line 40) | def grad(self, y, y_pred): method line_search (line 43) | def line_search(self, y, y_pred, h_pred): class CrossEntropyLoss (line 52) | class CrossEntropyLoss: method __call__ (line 53) | def __call__(self, y, y_pred): method base_estimator (line 57) | def base_estimator(self): method grad (line 60) | def grad(self, y, y_pred): method line_search (line 64) | def line_search(self, y, y_pred, h_pred): FILE: numpy_ml/trees/rf.py function bootstrap_sample (line 5) | def bootstrap_sample(X, Y): class RandomForest (line 11) | class RandomForest: method __init__ (line 12) | def __init__( method fit (line 44) | def fit(self, X, Y): method predict (line 61) | def predict(self, X): method _vote (line 78) | def _vote(self, predictions): FILE: numpy_ml/utils/data_structures.py class PQNode (line 14) | class PQNode(object): method __init__ (line 15) | def __init__(self, key, val, priority, entry_id, **kwargs): method __repr__ (line 22) | def __repr__(self): method to_dict (line 26) | def to_dict(self): method __gt__ (line 32) | def __gt__(self, other): method __ge__ (line 39) | def __ge__(self, other): method __lt__ (line 44) | def __lt__(self, other): method __le__ (line 51) | def __le__(self, other): class PriorityQueue (line 57) | class PriorityQueue: method __init__ (line 58) | def __init__(self, capacity, heap_order="max"): method __repr__ (line 86) | def __repr__(self): method __len__ (line 90) | def __len__(self): method __iter__ (line 93) | def __iter__(self): method push (line 96) | def push(self, key, priority, val=None): method pop (line 127) | def pop(self): method peek (line 148) | def peek(self): class BallTreeNode (line 176) | class BallTreeNode: method __init__ (line 177) | def __init__(self, centroid=None, X=None, y=None): method __repr__ (line 187) | def __repr__(self): method to_dict (line 191) | def to_dict(self): class BallTree (line 197) | class BallTree: method __init__ (line 198) | def __init__(self, leaf_size=40, metric=None): method fit (line 234) | def fit(self, X, y=None): method _build_tree (line 259) | def _build_tree(self, X, y): method _split (line 274) | def _split(self, X, y=None): method nearest_neighbors (line 292) | def nearest_neighbors(self, k, x): method _knn (line 319) | def _knn(self, k, x, PQ, root): class DiscreteSampler (line 346) | class DiscreteSampler: method __init__ (line 347) | def __init__(self, probs, log=False, with_replacement=True): method __call__ (line 423) | def __call__(self, n_samples=1): method sample (line 441) | def sample(self, n_samples=1): class Dict (line 478) | class Dict(dict): method __init__ (line 479) | def __init__(self, encoder=None): method __setitem__ (line 495) | def __setitem__(self, key, value): method _encode_key (line 502) | def _encode_key(self, key): method __getitem__ (line 513) | def __getitem__(self, key): method __missing__ (line 521) | def __missing__(self, key): FILE: numpy_ml/utils/distance_metrics.py function euclidean (line 4) | def euclidean(x, y): function manhattan (line 29) | def manhattan(x, y): function chebyshev (line 54) | def chebyshev(x, y): function minkowski (line 79) | def minkowski(x, y, p): function hamming (line 109) | def hamming(x, y): FILE: numpy_ml/utils/graphs.py class Edge (line 12) | class Edge(object): method __init__ (line 13) | def __init__(self, fr, to, w=None): method __repr__ (line 33) | def __repr__(self): method weight (line 37) | def weight(self): method reverse (line 40) | def reverse(self): class Graph (line 50) | class Graph(ABC): method __init__ (line 51) | def __init__(self, V, E): method __getitem__ (line 60) | def __getitem__(self, v_i): method get_index (line 63) | def get_index(self, v): method get_vertex (line 67) | def get_vertex(self, v_i): method vertices (line 72) | def vertices(self): method indices (line 76) | def indices(self): method edges (line 80) | def edges(self): method get_neighbors (line 83) | def get_neighbors(self, v_i): method to_matrix (line 90) | def to_matrix(self): method to_adj_dict (line 98) | def to_adj_dict(self): method path_exists (line 105) | def path_exists(self, s_i, e_i): method all_paths (line 132) | def all_paths(self, s_i, e_i): method _build_adjacency_list (line 169) | def _build_adjacency_list(self): class DiGraph (line 173) | class DiGraph(Graph): method __init__ (line 174) | def __init__(self, V, E): method _build_adjacency_list (line 189) | def _build_adjacency_list(self): method reverse (line 196) | def reverse(self): method topological_ordering (line 200) | def topological_ordering(self): method is_acyclic (line 261) | def is_acyclic(self): class UndirectedGraph (line 266) | class UndirectedGraph(Graph): method __init__ (line 267) | def __init__(self, V, E): method _build_adjacency_list (line 285) | def _build_adjacency_list(self): function random_unweighted_graph (line 302) | def random_unweighted_graph(n_vertices, edge_prob=0.5, directed=False): function random_DAG (line 336) | def random_DAG(n_vertices, edge_prob=0.5): FILE: numpy_ml/utils/kernels.py class KernelBase (line 7) | class KernelBase(ABC): method __init__ (line 8) | def __init__(self): method _kernel (line 14) | def _kernel(self, X, Y): method __call__ (line 17) | def __call__(self, X, Y=None): method __str__ (line 21) | def __str__(self): method summary (line 26) | def summary(self): method set_params (line 34) | def set_params(self, summary_dict): class LinearKernel (line 72) | class LinearKernel(KernelBase): method __init__ (line 73) | def __init__(self, c0=0): method _kernel (line 96) | def _kernel(self, X, Y=None): class PolynomialKernel (line 119) | class PolynomialKernel(KernelBase): method __init__ (line 120) | def __init__(self, d=3, gamma=None, c0=1): method _kernel (line 159) | def _kernel(self, X, Y=None): class RBFKernel (line 184) | class RBFKernel(KernelBase): method __init__ (line 185) | def __init__(self, sigma=None): method _kernel (line 217) | def _kernel(self, X, Y=None): class KernelInitializer (line 241) | class KernelInitializer(object): method __init__ (line 242) | def __init__(self, param=None): method __call__ (line 254) | def __call__(self): method init_from_str (line 266) | def init_from_str(self): method init_from_dict (line 281) | def init_from_dict(self): function kernel_checks (line 299) | def kernel_checks(X, Y): function pairwise_l2_distances (line 310) | def pairwise_l2_distances(X, Y): FILE: numpy_ml/utils/misc.py function logsumexp (line 5) | def logsumexp(log_probs, axis=None): function log_gaussian_pdf (line 16) | def log_gaussian_pdf(x_i, mu, sigma): FILE: numpy_ml/utils/testing.py function is_symmetric (line 11) | def is_symmetric(X): function is_symmetric_positive_definite (line 16) | def is_symmetric_positive_definite(X): function is_stochastic (line 30) | def is_stochastic(X): function is_number (line 38) | def is_number(a): function is_one_hot (line 43) | def is_one_hot(x): function is_binary (line 51) | def is_binary(x): function random_one_hot_matrix (line 63) | def random_one_hot_matrix(n_examples, n_classes): function random_stochastic_matrix (line 70) | def random_stochastic_matrix(n_examples, n_classes): function random_tensor (line 77) | def random_tensor(shape, standardize=False): function random_binary_tensor (line 91) | def random_binary_tensor(shape, sparsity=0.5): function random_paragraph (line 99) | def random_paragraph(n_words, vocab=None): class DependencyWarning (line 142) | class DependencyWarning(RuntimeWarning): FILE: numpy_ml/utils/windows.py function blackman_harris (line 4) | def blackman_harris(window_len, symmetric=False): function hamming (line 43) | def hamming(window_len, symmetric=False): function hann (line 76) | def hann(window_len, symmetric=False): function generalized_cosine (line 108) | def generalized_cosine(window_len, coefs, symmetric=False): class WindowInitializer (line 145) | class WindowInitializer: method __call__ (line 146) | def __call__(self, window):