MCPcopy Create free account

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

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

↓ 1 callersMethodinverse_transform
Transform an encoded sequence of byte pair codeword IDs back into human-readable text. Parameters ----------
numpy_ml/preprocessing/nlp.py:339
↓ 1 callersMethodis_acyclic
Check whether the graph contains cycles
numpy_ml/utils/graphs.py:261
↓ 1 callersFunctionis_continuous
Check if an `env`'s observation and action spaces are continuous. Parameters ---------- env : ``gym.wrappers`` or ``gym.envs`` insta
numpy_ml/rl_models/rl_utils.py:297
↓ 1 callersFunctionis_multidimensional
Check if the action and observation spaces for `env` are multidimensional or ``Tuple`` spaces. Notes ----- A multidimensional sp
numpy_ml/rl_models/rl_utils.py:257
↓ 1 callersFunctionis_symmetric
Check that an array `X` is symmetric along its main diagonal
numpy_ml/utils/testing.py:11
↓ 1 callersFunctionis_tuple
Check if the action and observation spaces for `env` are instances of ``gym.spaces.Tuple`` or ``gym.spaces.Dict``. Notes ----- A
numpy_ml/rl_models/rl_utils.py:231
↓ 1 callersFunctionking_loss_fn
(x)
numpy_ml/plots/nn_schedulers_plots.py:21
↓ 1 callersMethodlearning_rate
(self, step=None)
numpy_ml/neural_nets/schedulers/schedulers.py:39
↓ 1 callersMethodlikelihood_lower_bound
Compute the LLB under the current GMM parameters.
numpy_ml/gmm/gmm.py:65
↓ 1 callersMethodline_search
(self, y, y_pred, h_pred)
numpy_ml/trees/losses.py:64
↓ 1 callersMethodlog_prob
(self, words, N)
numpy_ml/tests/test_ngram.py:90
↓ 1 callersMethodlog_prob
(self, words, N)
numpy_ml/tests/test_ngram.py:185
↓ 1 callersMethodlog_prob
Compute the log probability of a sequence of words under the unsmoothed, maximum-likelihood `N`-gram language model.
numpy_ml/ngram/ngram.py:300
↓ 1 callersMethodlookup
Return the embeddings associated with the IDs in `ids`. Parameters ---------- word_ids : :py:class:`ndarray <numpy.n
numpy_ml/neural_nets/layers/layers.py:1896
↓ 1 callersMethodloss
Computes the generator and critic loss using the WGAN-GP value function. Parameters ---------- Y_fake : :py:
numpy_ml/neural_nets/losses/losses.py:415
↓ 1 callersMethodloss
Compute the NCE loss for a collection of inputs and associated targets. Parameters ---------- X : :py:class:`ndarray
numpy_ml/neural_nets/losses/losses.py:707
↓ 1 callersFunctionmagnitude_spectrum
Compute the magnitude spectrum (i.e., absolute value of the DFT spectrum) for each frame in `frames`. Assumes each frame is real-valued only.
numpy_ml/preprocessing/dsp.py:304
↓ 1 callersFunctionmanhattan
Compute the Manhattan (`L1`) distance between two real vectors Notes ----- The Manhattan distance between two vectors **x** and **y*
numpy_ml/utils/distance_metrics.py:29
↓ 1 callersMethodmarginal_log_likelihood
Compute the log of the marginal likelihood (i.e., the log model evidence), :math:`p(y \mid X, \\text{kernel_params})`. Notes
numpy_ml/nonparametric/gp.py:156
↓ 1 callersFunctionmb_generator
()
numpy_ml/neural_nets/utils/utils.py:39
↓ 1 callersFunctionmb_generator
()
numpy_ml/preprocessing/general.py:47
↓ 1 callersFunctionmel2hz
Convert the mel-scale representation of a signal into Hz Parameters ---------- mel : :py:class:`ndarray <numpy.ndarray>` of shape `(
numpy_ml/preprocessing/dsp.py:719
↓ 1 callersFunctionmel_spectrogram
Apply the Mel-filterbank to the power spectrum for a signal `x`. Notes ----- The Mel spectrogram is the projection of the power spec
numpy_ml/preprocessing/dsp.py:523
↓ 1 callersFunctionmfcc
Compute the Mel-frequency cepstral coefficients (MFCC) for a signal. Notes ----- Computing MFCC features proceeds in the following s
numpy_ml/preprocessing/dsp.py:613
↓ 1 callersMethodminibatcher
A minibatch generator for skip-gram and CBOW models. Parameters ---------- corpus_fps : str or list of strs
numpy_ml/neural_nets/models/w2v.py:314
↓ 1 callersFunctionminkowski
Compute the Minkowski-`p` distance between two real vectors. Notes ----- The Minkowski-`p` distance between two vectors **x** and **
numpy_ml/utils/distance_metrics.py:79
↓ 1 callersMethodmost_common
Return the top `n` most common tokens in the corpus
numpy_ml/preprocessing/nlp.py:1097
↓ 1 callersFunctionmse
Computes the mean squared error between a policy's estimates of the expected arm payouts and the true expected payouts.
numpy_ml/bandits/trainer.py:26
↓ 1 callersFunctionobs_stats
Get information on the observation space for `env`. Parameters ---------- env : ``gym.wrappers`` or ``gym.envs`` instance Th
numpy_ml/rl_models/rl_utils.py:382
↓ 1 callersMethodoracle_payoff
Return the expected reward for an optimal agent. Parameters ---------- context : :py:class:`ndarray <numpy.ndarray>`
numpy_ml/bandits/bandits.py:30
↓ 1 callersFunctionpairwise_l2_distances
A fast, vectorized way to compute pairwise l2 distances between rows in `X` and `Y`. Notes ----- An entry of the pairwise Euclid
numpy_ml/utils/kernels.py:310
↓ 1 callersFunctionparams_with_name
(name)
numpy_ml/tests/nn_torch_models.py:1842
↓ 1 callersMethodpath_exists
Check whether a path exists from vertex index `s_i` to `e_i`. Parameters ---------- s_i: Int The interal
numpy_ml/utils/graphs.py:105
↓ 1 callersMethodpeek
Return the item with the largest/smallest (depending on ``self.heap_order``) priority *without* removing it from the queue.
numpy_ml/utils/data_structures.py:148
↓ 1 callersFunctionplot_activations
()
numpy_ml/plots/nn_activations_plots.py:25
↓ 1 callersFunctionplot_clusters
(model, X, ax)
numpy_ml/plots/gmm_plots.py:41
↓ 1 callersFunctionplot_countour
(X, x, y, z, ax, xlim, ylim)
numpy_ml/plots/gmm_plots.py:20
↓ 1 callersFunctionplot_matrices
(params, best, best_theirs)
numpy_ml/plots/hmm_plots.py:58
↓ 1 callersMethodplot_rewards
Plot the cumulative reward per episode as a function of episode number. Notes ----- Saves plot to the file ``./img/<
numpy_ml/rl_models/trainer.py:103
↓ 1 callersFunctionplot_schedulers
()
numpy_ml/plots/nn_schedulers_plots.py:32
↓ 1 callersFunctionpower_spectrum
Compute the power spectrum for a signal represented as a collection of frames. Assumes each frame is real-valued only. The power spectru
numpy_ml/preprocessing/dsp.py:323
↓ 1 callersMethodpredict
r""" Use the trained model to generate predictions for the distribution means, :math:`\mu`, associated with the collection of data poi
numpy_ml/linear_models/glm.py:187
↓ 1 callersMethodpredict
Use the trained classifier to predict the class label for each example in **X**. Parameters ---------- X: :p
numpy_ml/linear_models/naive_bayes.py:128
↓ 1 callersFunctionpreemphasis
Increase the amplitude of high frequency bands + decrease the amplitude of lower bands. Notes ----- Preemphasis filtering is (wa
numpy_ml/preprocessing/dsp.py:458
↓ 1 callersMethodpull
"Pull" (i.e., sample from) a given arm's payoff distribution. Parameters ---------- arm_id : int The int
numpy_ml/bandits/bandits.py:47
↓ 1 callersFunctionrandom_classification_problem
(n_ex, n_classes, n_in, seed=0)
numpy_ml/plots/lm_plots.py:54
↓ 1 callersMethodrun_episode
Run the agent on a single episode. Parameters ---------- max_steps : int The maximum number of steps to
numpy_ml/rl_models/agents.py:65
↓ 1 callersMethodset_params
(self, summary_dict)
numpy_ml/neural_nets/modules/modules.py:76
↓ 1 callersFunctionsmooth
r""" Compute a simple weighted average of the previous and current value. Notes ----- The smoothed value at timestep `t`, :math:`\til
numpy_ml/bandits/trainer.py:42
↓ 1 callersMethodstate_action_pairs_leading_to_outcome
Return all (state, action) pairs that have a nonzero probability of producing `outcome` under the current model. Parameters
numpy_ml/rl_models/rl_utils.py:100
↓ 1 callersFunctiontiles
returns num-tilings tile indices corresponding to the floats and ints
numpy_ml/rl_models/tiles/tiles3.py:90
↓ 1 callersMethodto_adj_dict
Return an adjacency dictionary representation of the graph
numpy_ml/utils/graphs.py:98
↓ 1 callersFunctionto_one_hot
(labels, n_classes=None)
numpy_ml/trees/gbdt.py:7
↓ 1 callersFunctiontokenize_bytes_raw
Convert the characters in `line` to a collection of bytes. Each byte is represented in decimal as an integer between 0 and 255. Paramete
numpy_ml/preprocessing/nlp.py:112
↓ 1 callersMethodtrain
Train a MAB policies on a multi-armed bandit problem, logging training statistics along the way. Parameters --------
numpy_ml/bandits/trainer.py:170
↓ 1 callersMethodtrain
(self, corpus_fp, vocab=None, encoding=None)
numpy_ml/tests/test_ngram.py:125
↓ 1 callersMethodtrain_episode
Train the agent on a single episode. Parameters ---------- max_steps : int The maximum number of steps t
numpy_ml/rl_models/agents.py:1773
↓ 1 callersMethodtransform
Convert a list of labels into a one-hot encoding. Parameters ---------- labels : list of length `N` A li
numpy_ml/preprocessing/general.py:86
↓ 1 callersMethodtransform
Generate the term-frequency inverse-document-frequency encoding of a text corpus. Parameters ---------- igno
numpy_ml/preprocessing/nlp.py:964
↓ 1 callersMethodupdate
(self, param, param_grad, param_name, cur_loss=None)
numpy_ml/neural_nets/optimizers/optimizers.py:54
↓ 1 callersMethodupdate
Update the loss parameters using the accrued gradients and optimizer. Flush all gradients once the update is complete.
numpy_ml/neural_nets/losses/losses.py:695
↓ 1 callersMethodupdate
Update the parameters of the model online after each new state-action.
numpy_ml/rl_models/agents.py:1224
↓ 1 callersMethodupdate
Update the priority queue with the most recent (state, action) pair and perform random-sample one-step tabular Q-planning. N
numpy_ml/rl_models/agents.py:1600
↓ 1 callersMethodupdate_critic
Compute parameter gradients for the critic on a single minibatch. Parameters ---------- X_real : :py:class:`ndarray
numpy_ml/neural_nets/models/wgan_gp.py:304
↓ 1 callersMethodupdate_generator
Compute parameter gradients for the generator on a single minibatch. Parameters ---------- X_shape : tuple of `(batc
numpy_ml/neural_nets/models/wgan_gp.py:395
↓ 1 callersMethodwords_to_indices
Convert the words in `words` to their token indices. If a word is not in the vocabulary, return the index for the ``<unk>`` token
numpy_ml/preprocessing/nlp.py:1128
MethodCD_update
Perform a single contrastive divergence-`k` training update using the visible inputs `X` as a starting point for the Gibbs sampler.
numpy_ml/neural_nets/layers/layers.py:452
MethodX
The collection of layer inputs.
numpy_ml/neural_nets/wrappers/wrappers.py:78
Function__DCT2
Currently broken
numpy_ml/preprocessing/dsp.py:212
Method__call__
Initialize activation function
numpy_ml/neural_nets/initializers/initializers.py:53
Method__call__
Initialize scheduler
numpy_ml/neural_nets/initializers/initializers.py:125
Method__call__
Initialize the optimizer
numpy_ml/neural_nets/initializers/initializers.py:189
Method__call__
Initialize weights according to the specified strategy
numpy_ml/neural_nets/initializers/initializers.py:282
Method__call__
Apply the activation function to an input
numpy_ml/neural_nets/activations/activations.py:13
Method__call__
(self, step=None, cur_loss=None)
numpy_ml/neural_nets/schedulers/schedulers.py:24
Method__call__
(self, param, param_grad, param_name, cur_loss=None)
numpy_ml/neural_nets/optimizers/optimizers.py:22
Method__call__
(self, y, y_pred)
numpy_ml/neural_nets/losses/losses.py:42
Method__call__
(self, y, y_pred)
numpy_ml/neural_nets/losses/losses.py:126
Method__call__
(self, y, y_pred, t_mean, t_log_var)
numpy_ml/neural_nets/losses/losses.py:254
Method__call__
Computes the generator and critic loss using the WGAN-GP value function. Parameters ---------- Y_fake : :py:
numpy_ml/neural_nets/losses/losses.py:385
Method__call__
(self, X, target, neg_samples=None, retain_derived=True)
numpy_ml/neural_nets/losses/losses.py:663
Method__call__
Generate random draws from the `probs` distribution over integers in [0, N). Parameters ---------- n_samples
numpy_ml/utils/data_structures.py:423
Method__call__
(self, window)
numpy_ml/utils/windows.py:146
Method__call__
Refer to documentation for the `_kernel` method
numpy_ml/utils/kernels.py:17
Method__call__
(self)
numpy_ml/utils/kernels.py:254
Method__call__
(self, labels)
numpy_ml/preprocessing/general.py:69
Method__call__
(self, X)
numpy_ml/preprocessing/general.py:184
Method__call__
(self, y, y_pred)
numpy_ml/trees/losses.py:34
Method__call__
(self, y, y_pred)
numpy_ml/trees/losses.py:53
Method__contains__
Assert whether `word` is a token in the vocabulary
numpy_ml/preprocessing/nlp.py:1068
Method__ge__
(self, other)
numpy_ml/utils/data_structures.py:39
Method__ge__
Greater than or equal to
numpy_ml/preprocessing/nlp.py:412
Method__getitem__
Return the value associated with key
numpy_ml/rl_models/rl_utils.py:53
Method__getitem__
(self, v_i)
numpy_ml/utils/graphs.py:60
Method__getitem__
Return the token (if key is an integer) or the index (if key is a string) for the key in the vocabulary, if it exists.
numpy_ml/preprocessing/nlp.py:1072
Method__gt__
(self, other)
numpy_ml/utils/data_structures.py:32
Method__gt__
Greater than
numpy_ml/preprocessing/nlp.py:406
Method__init__
A class for initializing activation functions. Valid `param` values are: (a) ``__str__`` representations of an `Activatio
numpy_ml/neural_nets/initializers/initializers.py:42
Method__init__
A class for initializing learning rate schedulers. Valid `param` values are: (a) __str__ representations of `SchedulerBas
numpy_ml/neural_nets/initializers/initializers.py:107
Method__init__
A class for initializing optimizers. Valid `param` values are: (a) __str__ representations of `OptimizerBase` instances
numpy_ml/neural_nets/initializers/initializers.py:177
← previousnext →501–600 of 1,202, ranked by callers