Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ddbourgin/numpy-ml
/ functions
Functions
1,202 in github.com/ddbourgin/numpy-ml
⨍
Functions
1,202
◇
Types & classes
166
Method
_initialize_params
Initialize any policy-specific parameters that depend on information from the bandit environment.
numpy_ml/bandits/policies.py:451
Method
_kernel
Compute the linear kernel (i.e., dot-product) between all pairs of rows in `X` and `Y`. Parameters ----------
numpy_ml/utils/kernels.py:96
Method
_kernel
Compute the degree-`d` polynomial kernel between all pairs of rows in `X` and `Y`. Parameters ---------- X :
numpy_ml/utils/kernels.py:159
Method
_kernel
Computes the radial basis function (RBF) kernel between all pairs of rows in `X` and `Y`. Parameters ----------
numpy_ml/utils/kernels.py:217
Method
_log_ngram_prob
Return the unsmoothed log probability of the ngram
numpy_ml/ngram/ngram.py:356
Method
_log_ngram_prob
Return the smoothed log probability of the ngram
numpy_ml/ngram/ngram.py:446
Method
_log_ngram_prob
Return the smoothed log probability of the ngram
numpy_ml/ngram/ngram.py:629
Method
_n_completions
Return the number of unique word tokens that could follow the sequence `words` under the *unsmoothed* `N`-gram language model.
numpy_ml/ngram/ngram.py:271
Method
_num_grams_with_count
Return the number of unique `N`-gram tokens that occur exactly `C` times
numpy_ml/ngram/ngram.py:285
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:136
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:193
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:237
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:336
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:414
Method
_pull
(self, arm_id, context)
numpy_ml/bandits/bandits.py:523
Method
_reset_params
Reset any model-specific parameters. This gets called within the public `self.reset()` method.
numpy_ml/bandits/policies.py:178
Method
_reset_params
Reset any model-specific parameters. This gets called within the public :method:`reset` method.
numpy_ml/bandits/policies.py:267
Method
_reset_params
Reset any model-specific parameters. This gets called within the public `self.reset()` method.
numpy_ml/bandits/policies.py:401
Method
_reset_params
Reset any model-specific parameters. This gets called within the public `self.reset()` method.
numpy_ml/bandits/policies.py:483
Method
_select_arm
(self, bandit, context=None)
numpy_ml/bandits/policies.py:165
Method
_select_arm
(self, bandit, context=None)
numpy_ml/bandits/policies.py:254
Method
_select_arm
(self, bandit, context)
numpy_ml/bandits/policies.py:367
Method
_select_arm
(self, bandit, context)
numpy_ml/bandits/policies.py:467
Method
_update_params
(self, arm_id, reward, context=None)
numpy_ml/bandits/policies.py:173
Method
_update_params
(self, arm_id, reward, context=None)
numpy_ml/bandits/policies.py:262
Method
_update_params
Compute the parameters of the Beta posterior, P(payoff prob | rwd), for arm `arm_id`.
numpy_ml/bandits/policies.py:377
Method
_update_params
Compute the parameters for A and b.
numpy_ml/bandits/policies.py:478
Method
act
Generate an action given the current observation
numpy_ml/rl_models/agents.py:46
Function
autocorrelate1D
Autocorrelate a 1D signal `x` with itself. Notes ----- The `k` th term in the 1 dimensional autocorrelation is .. math::
numpy_ml/preprocessing/dsp.py:416
Method
backward
Overwritten by inherited class
numpy_ml/neural_nets/wrappers/wrappers.py:29
Method
backward
Backprop from the base layer's outputs to inputs. Parameters ---------- dLdy : :py:class:`ndarray <numpy.ndarray>` o
numpy_ml/neural_nets/wrappers/wrappers.py:212
Method
backward
Perform a backward pass through the layer
numpy_ml/neural_nets/layers/layers.py:51
Method
backward
r""" Backprop from layer outputs to inputs. Parameters ---------- dLdY : :py:class:`ndarray <numpy.ndarray>` of shape
numpy_ml/neural_nets/layers/layers.py:939
Method
backward
Backprop from layer outputs to inputs Parameters ---------- dLdy : :py:class:`ndarray <numpy.ndarray>` of shape `(n_
numpy_ml/neural_nets/layers/layers.py:2496
Method
backward
Run a backward pass across all timesteps in the input. Parameters ---------- dLdA : :py:class:`ndarray <numpy.ndarra
numpy_ml/neural_nets/layers/layers.py:4167
Method
backward
Run a backward pass across all timesteps in the input. Parameters ---------- dLdA : :py:class:`ndarray <numpy.ndarra
numpy_ml/neural_nets/layers/layers.py:4346
Method
base_estimator
(self)
numpy_ml/trees/losses.py:37
Function
batch_resample
Resample each image (or similar grid-based 2D signal) in a batch to `new_dim` using the specified resampling strategy. Parameters --
numpy_ml/preprocessing/dsp.py:11
Function
bilinear_interpolate
Estimates of the pixel values at the coordinates (x, y) in `X` via bilinear interpolation. Notes ----- Assumes the current entri
numpy_ml/preprocessing/dsp.py:106
Function
blackman_harris
The Blackman-Harris window. Notes ----- The Blackman-Harris window is an instance of the more general class of cosine-sum window
numpy_ml/utils/windows.py:4
Function
calc_conv_out_dims
Compute the dimension of the output volume for the specified convolution. Parameters ---------- X_shape : 3-tuple or 4-tuple
numpy_ml/neural_nets/utils/utils.py:380
Method
codes
A list with the Huffman code for each unique token in `text`
numpy_ml/preprocessing/nlp.py:511
Function
compare_probs
(fp, N)
numpy_ml/plots/ngram_plots.py:31
Function
compare_trees
(mine, gold)
numpy_ml/tests/test_trees.py:39
Method
components
(self)
numpy_ml/neural_nets/modules/modules.py:41
Method
copy
Return a copy of the optimizer object
numpy_ml/neural_nets/optimizers/optimizers.py:33
Method
derived_variables
A dictionary of intermediate values computed during the forward/backward passes.
numpy_ml/neural_nets/modules/modules.py:256
Method
derived_variables
A dictionary of intermediate values computed during the forward/backward passes.
numpy_ml/neural_nets/modules/modules.py:514
Method
derived_variables
A dictionary of intermediate values computed during the forward/backward passes.
numpy_ml/neural_nets/modules/modules.py:863
Method
derived_variables
A dictionary of intermediate values computed during the forward/backward passes.
numpy_ml/neural_nets/modules/modules.py:1143
Method
derived_variables
A dictionary of intermediate values computed during the forward/backward passes.
numpy_ml/neural_nets/modules/modules.py:1365
Method
derived_variables
A dictionary of the intermediate values computed during layer training.
numpy_ml/neural_nets/wrappers/wrappers.py:55
Method
derived_variables
Return a dictionary containing any intermediate variables computed during the forward / backward passes.
numpy_ml/neural_nets/layers/layers.py:4193
Method
derived_variables
Return a dictionary containing any intermediate variables computed during the forward / backward passes.
numpy_ml/neural_nets/layers/layers.py:4372
Method
derived_variables
(self)
numpy_ml/neural_nets/models/wgan_gp.py:179
Method
derived_variables
(self)
numpy_ml/neural_nets/models/vae.py:250
Method
derived_variables
Variables computed during model operation
numpy_ml/neural_nets/models/w2v.py:183
Method
dfs
A simple DFS helper routine
numpy_ml/utils/graphs.py:233
Method
edges
(self)
numpy_ml/utils/graphs.py:80
Function
encode_obs_as_tile
(obs)
numpy_ml/rl_models/rl_utils.py:193
Function
entropy
Entropy of a label sequence
numpy_ml/trees/dt.py:222
Function
err_fmt
(params, golds, ix, warn_str="")
numpy_ml/tests/test_nn_activations.py:30
Method
extract_grads
(self, Y_real, Y_fake, gradInterp)
numpy_ml/tests/nn_torch_models.py:103
Method
fit
Learn word2vec embeddings for the examples in `X_train`. Parameters ---------- corpus_fps : str or list of strs
numpy_ml/neural_nets/models/w2v.py:399
Method
fit
Train a byte pair codebook on a set of documents. Parameters ---------- corpus_fps : str or list of strs
numpy_ml/preprocessing/nlp.py:220
Method
fit
r""" Factor a data matrix into two nonnegative low rank factor matrices via fast HALS. Notes ----- This metho
numpy_ml/factorization/factors.py:277
Method
fit
(self, X, y)
numpy_ml/trees/losses.py:9
Method
fit
(self, X, y)
numpy_ml/trees/losses.py:19
Function
fit_VAE
()
numpy_ml/tests/test_nn.py:2307
Method
flush_gradients
Erase all the layer's derived variables and gradients.
numpy_ml/neural_nets/layers/layers.py:3766
Method
flush_gradients
Erase all the layer's derived variables and gradients.
numpy_ml/neural_nets/layers/layers.py:4072
Method
fn
r""" Evaluate the Affine activation on the elements of input `z`. .. math:: \text{Affine}(z_i) = \text{slope} \times z
numpy_ml/neural_nets/activations/activations.py:362
Method
fn
r""" Evaluate the activation function .. math:: \text{Exponential}(z_i) = e^{z_i}
numpy_ml/neural_nets/activations/activations.py:500
Method
fn
r""" Evaluate the hard sigmoid activation on the elements of input `z`. .. math:: \text{HardSigmoid}(z_i)
numpy_ml/neural_nets/activations/activations.py:631
Method
forward
Overwritten by inherited class
numpy_ml/neural_nets/wrappers/wrappers.py:24
Method
forward
Compute the layer output with dropout for a single minibatch. Parameters ---------- X : :py:class:`ndarray <numpy.nd
numpy_ml/neural_nets/wrappers/wrappers.py:181
Method
forward
Perform a forward pass through the layer
numpy_ml/neural_nets/layers/layers.py:46
Method
forward
r""" Compute the layer output on a single minibatch. Parameters ---------- X : :py:class:`ndarray <numpy.ndarray>`
numpy_ml/neural_nets/layers/layers.py:912
Method
forward
Compute the layer output on a single minibatch. Parameters ---------- X : :py:class:`ndarray <numpy.ndarray>` of sha
numpy_ml/neural_nets/layers/layers.py:2454
Method
forward
Run a forward pass across all timesteps in the input. Parameters ---------- X : :py:class:`ndarray <numpy.ndarray>`
numpy_ml/neural_nets/layers/layers.py:4140
Method
forward
Run a forward pass across all timesteps in the input. Parameters ---------- X : :py:class:`ndarray <numpy.ndarray>`
numpy_ml/neural_nets/layers/layers.py:4319
Method
forward
(input)
numpy_ml/tests/nn_torch_models.py:130
Method
forward
(self, input)
numpy_ml/tests/nn_torch_models.py:571
Method
freeze
(self)
numpy_ml/neural_nets/modules/modules.py:48
Method
freeze
Freeze the layer parameters at their current values so they can no longer be updated.
numpy_ml/neural_nets/layers/layers.py:55
Method
freeze
Freeze the layer parameters at their current values so they can no longer be updated.
numpy_ml/neural_nets/layers/layers.py:219
Method
freeze
Freeze the layer parameters at their current values so they can no longer be updated.
numpy_ml/neural_nets/layers/layers.py:4392
Method
freeze
Freeze the loss parameters at their current values so they can no longer be updated.
numpy_ml/neural_nets/losses/losses.py:674
Function
from_networkx
Convert a networkx graph to my graph representation
numpy_ml/tests/test_utils.py:225
Method
fullp
(self)
numpy_ml/rl_models/tiles/tiles3.py:60
Method
generate
Use the `N`-gram language model to generate sentences. Parameters ---------- N : int The gram-size of th
numpy_ml/ngram/ngram.py:135
Method
get_context
Sample a random one-hot context vector. This vector will be the same for all arms. Returns ------- context :
numpy_ml/bandits/bandits.py:379
Method
get_embedding
Retrieve the embeddings for a collection of word IDs. Parameters ---------- word_ids : :py:class:`ndarray <numpy.nda
numpy_ml/neural_nets/models/w2v.py:253
Function
get_grad
(z)
numpy_ml/tests/nn_torch_models.py:22
Function
get_grad
(z)
numpy_ml/tests/test_nn_activations.py:15
Function
get_gym_environs
List all valid OpenAI ``gym`` environment ids
numpy_ml/rl_models/rl_utils.py:200
Function
get_gym_stats
Return a pandas DataFrame of the environment IDs.
numpy_ml/rl_models/rl_utils.py:205
Method
get_index
Get the internal index for a given vetex
numpy_ml/utils/graphs.py:63
Function
get_scriptdir
Return the directory containing the `trainer.py` script
numpy_ml/bandits/trainer.py:21
Method
get_vertex
Get the original vertex from a given internal index
numpy_ml/utils/graphs.py:67
← previous
next →
801–900 of 1,202, ranked by callers