MCPcopy Create free account

hub / github.com/ddbourgin/numpy-ml / functions

Functions1,202 in github.com/ddbourgin/numpy-ml

↓ 1 callersMethod_init_params
(self)
numpy_ml/rl_models/agents.py:164
↓ 1 callersMethod_init_params
(self)
numpy_ml/rl_models/agents.py:422
↓ 1 callersMethod_init_params
(self)
numpy_ml/rl_models/agents.py:901
↓ 1 callersMethod_init_params
(self)
numpy_ml/rl_models/agents.py:1428
↓ 1 callersMethod_init_params
(self, texts, tokens)
numpy_ml/lda/lda_smoothed.py:42
↓ 1 callersMethod_init_wrapper_params
(self)
numpy_ml/neural_nets/wrappers/wrappers.py:177
↓ 1 callersMethod_initialize_parameters
(self)
numpy_ml/hmm/hmm.py:429
↓ 1 callersMethod_initialize_params
Initialize any policy-specific parameters that depend on information from the bandit environment.
numpy_ml/bandits/policies.py:85
↓ 1 callersMethod_initialize_params
Randomly initialize the starting GMM parameters.
numpy_ml/gmm/gmm.py:48
↓ 1 callersMethod_keep_top_n_tokens
(self)
numpy_ml/preprocessing/nlp.py:821
↓ 1 callersMethod_keep_top_n_tokens
(self)
numpy_ml/preprocessing/nlp.py:1264
↓ 1 callersMethod_kernel
(self, X, Y)
numpy_ml/utils/kernels.py:14
↓ 1 callersMethod_knn
(self, k, x, PQ, root)
numpy_ml/utils/data_structures.py:319
↓ 1 callersMethod_log_class_posterior
r""" Compute the (unnormalized) log posterior for the label at index `class_idx` in :py:attr:`labels <numpy_ml.linear_models.GaussianN
numpy_ml/linear_models/naive_bayes.py:166
↓ 1 callersMethod_log_ngram_prob
(self, ngram)
numpy_ml/tests/test_ngram.py:102
↓ 1 callersMethod_log_ngram_prob
(self, ngram)
numpy_ml/tests/test_ngram.py:197
↓ 1 callersMethod_loss
Actual computation of NCE loss
numpy_ml/neural_nets/losses/losses.py:760
↓ 1 callersMethod_loss
Regularized Frobenius loss
numpy_ml/factorization/factors.py:89
↓ 1 callersMethod_loss
Return the least-squares reconstruction loss between X and Xhat
numpy_ml/factorization/factors.py:247
↓ 1 callersMethod_maximize_alpha
Optimize alpha using Blei's O(n) Newton-Raphson modification for a Hessian with special structure
numpy_ml/lda/lda.py:99
↓ 1 callersMethod_maximize_beta
Optimize model parameter beta β_{t, n} ∝ \sum_{d=1}^D \sum_{i=1}^{N_d} ϕ_{d, t, n} [ i = n]
numpy_ml/lda/lda.py:74
↓ 1 callersMethod_maximize_gamma
Optimize variational parameter gamma γ_t = α_t + \sum_{n=1}^{N_d} ϕ_{t, n}
numpy_ml/lda/lda.py:60
↓ 1 callersMethod_maximize_phi
Optimize variational parameter phi ϕ_{t, n} ∝ β_{t, w_n} e^( Ψ(γ_t) )
numpy_ml/lda/lda.py:36
↓ 1 callersMethod_merge
Replace `bigram` with a single token and update vocab accordingly
numpy_ml/preprocessing/nlp.py:273
↓ 1 callersMethod_off_policy_update
Update `Q` using weighted importance sampling. Notes ----- In importance sampling updates, we account for the fact t
numpy_ml/rl_models/agents.py:599
↓ 1 callersMethod_off_policy_update
Update the `Q` function using the TD(0) Q-learning update: Q[s, a] <- Q[s, a] + lr * ( r + temporal_discount * m
numpy_ml/rl_models/agents.py:1198
↓ 1 callersMethod_on_policy_update
r""" Update the `Q` function using an on-policy first-visit Monte Carlo update. Notes ----- The on-policy fir
numpy_ml/rl_models/agents.py:562
↓ 1 callersMethod_on_policy_update
Update the Q function using the expected SARSA on-policy TD(0) update: Q[s, a] <- Q[s, a] + lr * [ r + temporal_
numpy_ml/rl_models/agents.py:1155
↓ 1 callersMethod_plot_reward
(self, optimal_rwd, policy, smooth_weight, axes=None, out_dir=None)
numpy_ml/bandits/trainer.py:323
↓ 1 callersMethod_print_run_summary
(self, bandit, policy, regret)
numpy_ml/bandits/trainer.py:309
↓ 1 callersMethod_pull
(self, arm_id)
numpy_ml/bandits/bandits.py:74
↓ 1 callersMethod_pull_arm
Execute a bandit action and return the received reward.
numpy_ml/bandits/policies.py:69
↓ 1 callersMethod_reset_params
Reset any model-specific parameters. This gets called within the public `self.reset()` method.
numpy_ml/bandits/policies.py:93
↓ 1 callersMethod_sample
Returns a sample from the distribution q(t | x) = N(t_mean, diag(exp(t_log_var))) using the reparameterization trick.
numpy_ml/neural_nets/models/vae.py:283
↓ 1 callersMethod_sample_thetas
Sample `n_samples_per_episode` thetas from a multivariate Gaussian with mean `theta_mean` and covariance `diag(theta_var)`
numpy_ml/rl_models/agents.py:350
↓ 1 callersMethod_segment
Find the optimal split rule (feature index and split threshold) for the data according to `self.criterion`.
numpy_ml/trees/dt.py:153
↓ 1 callersMethod_select_arm
Select an arm based on the current context
numpy_ml/bandits/policies.py:75
↓ 1 callersMethod_set_wrapper_params
(self, pdict)
numpy_ml/neural_nets/wrappers/wrappers.py:117
↓ 1 callersMethod_simulate_behavior
Perform random-sample one-step tabular Q-planning with prioritized sweeping. Notes ----- This approach uses
numpy_ml/rl_models/agents.py:1678
↓ 1 callersMethod_smoothed_metrics
(self, policy, optimal_rwd, smooth_weight)
numpy_ml/bandits/trainer.py:367
↓ 1 callersMethod_sort_tokens
(self)
numpy_ml/preprocessing/nlp.py:904
↓ 1 callersMethod_train_batch
(self, X, target)
numpy_ml/neural_nets/models/w2v.py:308
↓ 1 callersMethod_train_episode
(self, max_steps, render_every=None)
numpy_ml/rl_models/trainer.py:21
↓ 1 callersMethod_train_epoch
(self, corpus_fps, encoding)
numpy_ml/neural_nets/models/w2v.py:296
↓ 1 callersMethod_train_step
(self, bandit, policy)
numpy_ml/bandits/trainer.py:268
↓ 1 callersMethod_transform
Transform a single text string to a list of byte-pair IDs
numpy_ml/preprocessing/nlp.py:310
↓ 1 callersMethod_update
Update Q using a full-backup version of the TD(0) Q-learning update: Q(s, a) = Q(s, a) + lr * sum_{r, s'} [
numpy_ml/rl_models/agents.py:1717
↓ 1 callersMethod_update1D
Sherman-Morrison update for a single example
numpy_ml/linear_models/linear_regression.py:142
↓ 1 callersMethod_update2D
Woodbury update for multiple examples
numpy_ml/linear_models/linear_regression.py:156
↓ 1 callersMethod_update_H
Perform the fast HALS update for H
numpy_ml/factorization/factors.py:251
↓ 1 callersMethod_update_W
Perform the fast HALS update for W
numpy_ml/factorization/factors.py:262
↓ 1 callersMethod_update_params
Update the policy parameters after an interaction
numpy_ml/bandits/policies.py:80
↓ 1 callersMethod_vote
Return the aggregated prediction across all trees in the RF for each problem. Parameters ---------- predictions : :p
numpy_ml/trees/rf.py:78
↓ 1 callersMethodact
r""" Generate actions according to a softmax policy. Notes ----- The softmax policy assumes that the pmf over actions
numpy_ml/rl_models/agents.py:195
↓ 1 callersMethodact
r""" Execute the behavior policy--an :math:`\epsilon`-soft policy used to generate actions during training. Parameters
numpy_ml/rl_models/agents.py:642
↓ 1 callersMethodact
Select an arm and sample from its payoff distribution. Parameters ---------- bandit : :class:`Bandit <numpy_ml.bandi
numpy_ml/bandits/policies.py:35
↓ 1 callersFunctionaction_stats
Get information on `env`'s action space. Parameters ---------- md_action : bool Whether the `env`'s action space is multidim
numpy_ml/rl_models/rl_utils.py:334
↓ 1 callersMethodbackward
(self, dY_skip, dY_main=None)
numpy_ml/neural_nets/modules/modules.py:330
↓ 1 callersMethodbackward
Compute the gradient of the loss with respect to the layer parameters. Parameters ---------- dLdy : :py:class:`ndarr
numpy_ml/neural_nets/modules/modules.py:583
↓ 1 callersMethodbackward
Compute the gradient of the loss with respect to the module parameters. Parameters ---------- dLdy : :py:class:`ndar
numpy_ml/neural_nets/modules/modules.py:948
↓ 1 callersMethodbackward
Run a backward pass across all timesteps in the input. Parameters ---------- dLdA : :py:class:`ndarray <numpy.ndarra
numpy_ml/neural_nets/modules/modules.py:1092
↓ 1 callersMethodbackward
(self, dLdy)
numpy_ml/neural_nets/modules/modules.py:1343
↓ 1 callersMethodbackward
r""" Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape
numpy_ml/neural_nets/layers/layers.py:313
↓ 1 callersMethodbackward
r""" Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape
numpy_ml/neural_nets/layers/layers.py:713
↓ 1 callersMethodbackward
r""" Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape
numpy_ml/neural_nets/layers/layers.py:825
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape `(n
numpy_ml/neural_nets/layers/layers.py:1158
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape `(n
numpy_ml/neural_nets/layers/layers.py:1390
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape `(n
numpy_ml/neural_nets/layers/layers.py:1572
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape `(n
numpy_ml/neural_nets/layers/layers.py:1750
↓ 1 callersMethodbackward
Backprop from layer outputs to embedding weights. Notes ----- Because the items in `X` are interpreted as indices, w
numpy_ml/neural_nets/layers/layers.py:1965
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs. Parameters ---------- dLdy : :py:class:`ndarray <numpy.ndarray>` of shape `(n
numpy_ml/neural_nets/layers/layers.py:2131
↓ 1 callersMethodbackward
Compute the gradient of the loss with respect to the layer parameters. Notes ----- Relies on :meth:`~numpy_ml.neural
numpy_ml/neural_nets/layers/layers.py:2756
↓ 1 callersMethodbackward
Compute the gradient of the loss with respect to the layer parameters. Notes ----- Relies on :meth:`~numpy_ml.neural
numpy_ml/neural_nets/layers/layers.py:3048
↓ 1 callersMethodbackward
Backprop from layer outputs to inputs Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape `(n_
numpy_ml/neural_nets/layers/layers.py:3290
↓ 1 callersMethodbackward
Compute the gradient of the loss with respect to the layer parameters. Notes ----- Relies on :meth:`~numpy_ml.neural
numpy_ml/neural_nets/layers/layers.py:3480
↓ 1 callersMethodbackward
Backprop for a single timestep. Parameters ---------- dLdAt : :py:class:`ndarray <numpy.ndarray>` of shape `(n_ex, n
numpy_ml/neural_nets/layers/layers.py:3717
↓ 1 callersMethodbackward
Backprop for a single timestep. Parameters ---------- dLdAt : :py:class:`ndarray <numpy.ndarray>` of shape `(n_ex, n
numpy_ml/neural_nets/layers/layers.py:3994
↓ 1 callersMethodbackward
VAE backward pass
numpy_ml/neural_nets/models/vae.py:341
↓ 1 callersMethodbackward
Compute the gradient of the loss wrt the current network parameters.
numpy_ml/neural_nets/models/w2v.py:235
↓ 1 callersMethodbase_estimator
(self)
numpy_ml/trees/losses.py:57
↓ 1 callersFunctionbootstrap_sample
(X, Y)
numpy_ml/trees/rf.py:5
↓ 1 callersFunctionbytes_to_chars
Decode bytes (represented as an integer between 0 and 255) to characters in the specified encoding.
numpy_ml/preprocessing/nlp.py:141
↓ 1 callersFunctioncalc_pad_dims_1D
Compute the padding necessary to ensure that convolving `X` with a 1D kernel of shape `kernel_shape` and stride `stride` produces outputs wit
numpy_ml/neural_nets/utils/utils.py:123
↓ 1 callersFunctioncepstral_lifter
A simple sinusoidal filter applied in the Mel-frequency domain. Notes ----- Cepstral lifting helps to smooth the spectral envelope a
numpy_ml/preprocessing/dsp.py:489
↓ 1 callersFunctionchebyshev
Compute the Chebyshev (:math:`L_\infty`) distance between two real vectors Notes ----- The Chebyshev distance between two vectors **
numpy_ml/utils/distance_metrics.py:54
↓ 1 callersFunctionclone_tree
(dtree)
numpy_ml/tests/test_trees.py:16
↓ 1 callersMethodcodebook
A list of the learned byte pair codewords, decoded into human-readable format
numpy_ml/preprocessing/nlp.py:377
↓ 1 callersMethodcompare
Compare the performance of multiple policies on the same bandit environment, generating a plot for each. Parameters
numpy_ml/bandits/trainer.py:87
↓ 1 callersMethodcompletions
Return the distribution over proposed next words under the `N`-gram language model. Parameters ---------- wo
numpy_ml/ngram/ngram.py:105
↓ 1 callersFunctionconv1D
A faster (but more memory intensive) implementation of a 1D "convolution" (technically, cross-correlation) of input `X` with a collection of
numpy_ml/neural_nets/utils/utils.py:668
↓ 1 callersFunctionconv2D_naive
A slow but more straightforward implementation of a 2D "convolution" (technically, cross-correlation) of input `X` with a collection of kerne
numpy_ml/neural_nets/utils/utils.py:797
↓ 1 callersMethodcount
(self)
numpy_ml/rl_models/tiles/tiles3.py:57
↓ 1 callersMethoddecode
r""" Given the HMM parameterized by :math:`(A, B, \pi)` and an observation sequence :math:`O = o_1, \ldots, o_T`, compute the most pro
numpy_ml/hmm/hmm.py:180
↓ 1 callersFunctiondeconv2D_naive
Perform a "deconvolution" (more accurately, a transposed convolution) of an input volume `X` with a weight kernel `W`, incorporating stride,
numpy_ml/neural_nets/utils/utils.py:720
↓ 1 callersFunctiondefault_hmm
()
numpy_ml/plots/hmm_plots.py:32
↓ 1 callersFunctioneuclidean
Compute the Euclidean (`L2`) distance between two real vectors Notes ----- The Euclidean distance between two vectors **x** and **y*
numpy_ml/utils/distance_metrics.py:4
↓ 1 callersMethodextract_grads
(self, X)
numpy_ml/tests/nn_torch_models.py:330
↓ 1 callersMethodextract_grads
(self, X)
numpy_ml/tests/nn_torch_models.py:376
↓ 1 callersMethodextract_grads
(self, X)
numpy_ml/tests/nn_torch_models.py:490
↓ 1 callersMethodextract_grads
(self, X_main, X_skip)
numpy_ml/tests/nn_torch_models.py:650
← previousnext →301–400 of 1,202, ranked by callers