MCPcopy Create free account

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

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

Method__init__
A factory for weight initializers. Parameters ---------- act_fn_str : str The string representation for
numpy_ml/neural_nets/initializers/initializers.py:243
Method__init__
A WaveNet-like residual block with causal dilated convolutions. .. code-block:: text *Skip path in* >------------------
numpy_ml/neural_nets/modules/modules.py:120
Method__init__
A ResNet-like "identity" shortcut module. Notes ----- The identity module enforces `same` padding during each convol
numpy_ml/neural_nets/modules/modules.py:361
Method__init__
A ResNet-like "convolution" shortcut module. Notes ----- In contrast to :class:`SkipConnectionIdentityModule`, the a
numpy_ml/neural_nets/modules/modules.py:616
Method__init__
A single bidirectional long short-term memory (LSTM) layer. Parameters ---------- n_out : int The dimens
numpy_ml/neural_nets/modules/modules.py:988
Method__init__
A mutli-headed attention module. Notes ----- Multi-head attention allows a model to jointly attend to information fr
numpy_ml/neural_nets/modules/modules.py:1193
Method__init__
An abstract base class for all Wrapper instances
numpy_ml/neural_nets/wrappers/wrappers.py:12
Method__init__
Initialize the ActivationBase object
numpy_ml/neural_nets/activations/activations.py:9
Method__init__
A logistic sigmoid activation function.
numpy_ml/neural_nets/activations/activations.py:31
Method__init__
(self)
numpy_ml/neural_nets/activations/activations.py:97
Method__init__
(self, alpha=0.3)
numpy_ml/neural_nets/activations/activations.py:161
Method__init__
r""" A Gaussian error linear unit (GELU). [*]_ Notes ----- A ReLU alternative. GELU weights inputs by their value, ra
numpy_ml/neural_nets/activations/activations.py:211
Method__init__
A hyperbolic tangent activation function.
numpy_ml/neural_nets/activations/activations.py:305
Method__init__
An affine activation function. Parameters ---------- slope: float Activation slope. Default is 1.
numpy_ml/neural_nets/activations/activations.py:343
Method__init__
Identity activation function. Notes ----- :class:`Identity` is syntactic sugar for :class:`Affine` with slop
numpy_ml/neural_nets/activations/activations.py:396
Method__init__
An exponential (base e) activation function
numpy_ml/neural_nets/activations/activations.py:492
Method__init__
(self)
numpy_ml/neural_nets/activations/activations.py:558
Method__init__
A "hard" sigmoid activation function. Notes ----- The hard sigmoid is a piecewise linear approximation of the logist
numpy_ml/neural_nets/activations/activations.py:616
Method__init__
A softplus activation function. Notes ----- In contrast to :class:`ReLU`, the softplus activation is differentiable
numpy_ml/neural_nets/activations/activations.py:670
Method__init__
An abstract base class inherited by all neural network layers
numpy_ml/neural_nets/layers/layers.py:28
Method__init__
r""" A single "attention head" layer using a dot-product for the scoring function. Notes ----- The equations for a do
numpy_ml/neural_nets/layers/layers.py:140
Method__init__
An "addition" layer that returns the sum of its inputs, passed through an optional nonlinearity. Parameters --------
numpy_ml/neural_nets/layers/layers.py:634
Method__init__
A multiplication layer that returns the *elementwise* product of its inputs, passed through an optional nonlinearity. Parame
numpy_ml/neural_nets/layers/layers.py:746
Method__init__
Flatten a multidimensional input into a 2D matrix. Parameters ---------- keep_dim : {'first', 'last', -1}
numpy_ml/neural_nets/layers/layers.py:860
Method__init__
A batch normalization layer for two-dimensional inputs with an additional channel dimension. Notes ----- Bat
numpy_ml/neural_nets/layers/layers.py:970
Method__init__
A batch normalization layer for 1D inputs. Notes ----- BatchNorm is an attempt address the problem of internal covar
numpy_ml/neural_nets/layers/layers.py:1219
Method__init__
A layer normalization layer for 2D inputs with an additional channel dimension. Notes ----- In contrast to :
numpy_ml/neural_nets/layers/layers.py:1445
Method__init__
A layer normalization layer for 1D inputs. Notes ----- In contrast to :class:`BatchNorm1D`, the LayerNorm layer calc
numpy_ml/neural_nets/layers/layers.py:1635
Method__init__
An embedding layer. Notes ----- Equations:: Y = W[x] NB. This layer must be the first in a neu
numpy_ml/neural_nets/layers/layers.py:1812
Method__init__
r""" A fully-connected (dense) layer. Notes ----- A fully connected layer computes the function .. math::
numpy_ml/neural_nets/layers/layers.py:2011
Method__init__
r""" A softmax nonlinearity layer. Notes ----- This is implemented as a layer rather than an activation primarily
numpy_ml/neural_nets/layers/layers.py:2193
Method__init__
r""" A sparse Erdos-Renyi layer with evolutionary rewiring via the sparse evolutionary training (SET) algorithm. Notes
numpy_ml/neural_nets/layers/layers.py:2353
Method__init__
Apply a one-dimensional convolution kernel over an input volume. Notes ----- Equations:: out = act_fn(p
numpy_ml/neural_nets/layers/layers.py:2604
Method__init__
Apply a two-dimensional convolution kernel over an input volume. Notes ----- Equations:: out = act_fn(p
numpy_ml/neural_nets/layers/layers.py:2896
Method__init__
A single two-dimensional pooling layer. Parameters ---------- kernel_shape : 2-tuple The dimension of a
numpy_ml/neural_nets/layers/layers.py:3182
Method__init__
Apply a two-dimensional "deconvolution" to an input volume. Notes ----- The term "deconvolution" in this context doe
numpy_ml/neural_nets/layers/layers.py:3354
Method__init__
r""" A single step of a vanilla (Elman) RNN. Notes ----- At timestep `t`, the vanilla RNN cell computes .. m
numpy_ml/neural_nets/layers/layers.py:3577
Method__init__
A single step of a long short-term memory (LSTM) RNN. Notes ----- Notation: - ``Z[t]`` is the input to eac
numpy_ml/neural_nets/layers/layers.py:3783
Method__init__
A single vanilla (Elman)-RNN layer. Parameters ---------- n_out : int The dimension of a single hidden s
numpy_ml/neural_nets/layers/layers.py:4089
Method__init__
A single long short-term memory (LSTM) RNN layer. Parameters ---------- n_out : int The dimension of a s
numpy_ml/neural_nets/layers/layers.py:4258
Method__init__
Returns a fixed learning rate, regardless of the current step. Parameters ---------- initial_lr : float
numpy_ml/neural_nets/schedulers/schedulers.py:44
Method__init__
An exponential learning rate scheduler. Notes ----- The exponential scheduler decays the learning rate by `decay` ev
numpy_ml/neural_nets/schedulers/schedulers.py:73
Method__init__
The Noam learning rate scheduler, originally used in conjunction with the Adam optimizer in [1]. Notes -----
numpy_ml/neural_nets/schedulers/schedulers.py:145
Method__init__
The Davis King / DLib learning rate scheduler. Notes ----- The KingScheduler computes the probability that the slope
numpy_ml/neural_nets/schedulers/schedulers.py:199
Method__init__
An abstract base class for all Optimizer objects. This should never be used directly.
numpy_ml/neural_nets/optimizers/optimizers.py:9
Method__init__
An AdaGrad optimizer. Notes ----- Weights that receive large gradients will have their effective learning ra
numpy_ml/neural_nets/optimizers/optimizers.py:157
Method__init__
RMSProp optimizer. Notes ----- RMSProp was proposed as a refinement of :class:`AdaGrad` to reduce its aggres
numpy_ml/neural_nets/optimizers/optimizers.py:263
Method__init__
Adam (adaptive moment estimation) optimization algorithm. Notes ----- Designed to combine the advantages of :class:`
numpy_ml/neural_nets/optimizers/optimizers.py:365
Method__init__
Wasserstein generative adversarial network with gradient penalty. Parameters ---------- g_hidden : int T
numpy_ml/neural_nets/models/wgan_gp.py:66
Method__init__
A variational autoencoder (VAE) with 2D convolutional encoder and Bernoulli input and output units. Notes -----
numpy_ml/neural_nets/models/vae.py:13
Method__init__
A word2vec model supporting both continuous bag of words (CBOW) and skip-gram architectures, with training via noise contrastive
numpy_ml/neural_nets/models/w2v.py:13
Method__init__
(self)
numpy_ml/neural_nets/losses/losses.py:14
Method__init__
A squared-error / `L2` loss. Notes ----- For real-valued target **y** and predictions :math:`\hat{\mathbf{y}}`, the
numpy_ml/neural_nets/losses/losses.py:27
Method__init__
A cross-entropy loss. Notes ----- For a one-hot target **y** and predicted class probabilities :math:`\hat{\
numpy_ml/neural_nets/losses/losses.py:111
Method__init__
The loss function for a Wasserstein GAN [*]_ [*]_ with gradient penalty. Notes ----- Assuming an optimal critic, min
numpy_ml/neural_nets/losses/losses.py:332
Method__init__
A noise contrastive estimation (NCE) loss function. Notes ----- Noise contrastive estimation is a candidate sampling
numpy_ml/neural_nets/losses/losses.py:518
Method__init__
r""" A cross-entropy method agent. Notes ----- The cross-entropy method [1]_ [2]_ agent only operates on ``envs`` wit
numpy_ml/rl_models/agents.py:102
Method__init__
A Monte-Carlo learning agent trained using either first-visit Monte Carlo updates (on-policy) or incremental weighted importance samp
numpy_ml/rl_models/agents.py:392
Method__init__
r""" A temporal difference learning agent with expected SARSA (on-policy) [3]_ or TD(0) `Q`-learning (off-policy) [4]_ updates.
numpy_ml/rl_models/agents.py:794
Method__init__
r""" A Dyna-`Q` / Dyna-`Q+` agent [5]_ with full TD(0) `Q`-learning updates via prioritized-sweeping [6]_ . Notes ---
numpy_ml/rl_models/agents.py:1305
Method__init__
(self)
numpy_ml/rl_models/rl_utils.py:44
Method__init__
An object to facilitate agent training and evaluation. Parameters ---------- agent : :class:`AgentBase` instance
numpy_ml/rl_models/trainer.py:6
Method__init__
(self, sizeval)
numpy_ml/rl_models/tiles/tiles3.py:39
Method__init__
A multi-armed bandit where each arm is associated with a different multinomial payoff distribution. Parameters -----
numpy_ml/bandits/bandits.py:79
Method__init__
A multi-armed bandit where each arm is associated with an independent Bernoulli payoff distribution. Parameters ----
numpy_ml/bandits/bandits.py:143
Method__init__
A multi-armed bandit that is similar to :class:`BernoulliBandit`, but instead of each arm having a fixed payout of 1, the pay
numpy_ml/bandits/bandits.py:198
Method__init__
A weighted graph shortest path problem formulated as a multi-armed bandit. Notes ----- Each arm corresponds
numpy_ml/bandits/bandits.py:266
Method__init__
A contextual version of :class:`BernoulliBandit` where each binary context feature is associated with an independent Bernoulli payoff
numpy_ml/bandits/bandits.py:347
Method__init__
r""" A contextual linear multi-armed bandit. Notes ----- In a contextual linear bandit the expected payoff of an arm
numpy_ml/bandits/bandits.py:422
Method__init__
A simple base class for multi-armed bandit policies
numpy_ml/bandits/policies.py:12
Method__init__
r""" An epsilon-greedy policy for multi-armed bandit problems. Notes ----- Epsilon-greedy policies greedily select th
numpy_ml/bandits/policies.py:102
Method__init__
r""" A conjugate Thompson sampling [1]_ [2]_ policy for multi-armed bandits with Bernoulli likelihoods. Notes -----
numpy_ml/bandits/policies.py:277
Method__init__
A disjoint linear UCB policy [*]_ for contextual linear bandits. Notes ----- LinUCB is only defined for :class:`Cont
numpy_ml/bandits/policies.py:411
Method__init__
An object to facilitate multi-armed bandit training, comparison, and evaluation.
numpy_ml/bandits/trainer.py:80
Method__init__
A generic node object for holding entries in :class:`PriorityQueue`
numpy_ml/utils/data_structures.py:15
Method__init__
A priority queue implementation using a binary heap. Notes ----- A priority queue is a data structure useful for sto
numpy_ml/utils/data_structures.py:58
Method__init__
(self, centroid=None, X=None, y=None)
numpy_ml/utils/data_structures.py:177
Method__init__
A ball tree data structure. Notes ----- A ball tree is a binary tree in which every node defines a `D`-dimen
numpy_ml/utils/data_structures.py:198
Method__init__
Sample from an arbitrary multinomial PMF over the first `N` nonnegative integers using Vose's algorithm for the alias method.
numpy_ml/utils/data_structures.py:347
Method__init__
A dictionary subclass which returns the key value if it is not in the dict. Parameters ---------- encoder :
numpy_ml/utils/data_structures.py:479
Method__init__
(self)
numpy_ml/utils/kernels.py:8
Method__init__
The linear (i.e., dot-product) kernel. Notes ----- For input vectors :math:`\mathbf{x}` and :math:`\mathbf{y}`, the
numpy_ml/utils/kernels.py:73
Method__init__
The degree-`d` polynomial kernel. Notes ----- For input vectors :math:`\mathbf{x}` and :math:`\mathbf{y}`, the polyn
numpy_ml/utils/kernels.py:120
Method__init__
A class for initializing learning rate schedulers. Valid inputs are: (a) __str__ representations of `KernelBase` instances
numpy_ml/utils/kernels.py:242
Method__init__
(self, V, E)
numpy_ml/utils/graphs.py:51
Method__init__
A generic directed graph object. Parameters ---------- V : list A list of vertex IDs. E : list o
numpy_ml/utils/graphs.py:174
Method__init__
A generic undirected graph object. Parameters ---------- V : list A list of vertex IDs. E : list
numpy_ml/utils/graphs.py:267
Method__init__
A Gaussian Process (GP) regression model. .. math:: y \mid X, f &\sim \mathcal{N}( [f(x_1), \ldots, f(x_n)], \\alpha
numpy_ml/nonparametric/gp.py:19
Method__init__
A Nadaraya-Watson kernel regression model. Notes ----- The Nadaraya-Watson regression model is .. math::
numpy_ml/nonparametric/kernel_regression.py:5
Method__init__
A `k`-nearest neighbors (kNN) model relying on a ball tree for efficient computation. Parameters ----------
numpy_ml/nonparametric/knn.py:10
Method__init__
r""" A simple hidden Markov model with multinomial emission distribution. Parameters ---------- A : :py:class:`ndarra
numpy_ml/hmm/hmm.py:8
Method__init__
Convert between category labels and their one-hot vector representations. Parameters ---------- categories :
numpy_ml/preprocessing/general.py:55
Method__init__
Feature-wise standardization for vector inputs. Notes ----- Due to the sensitivity of empirical mean and standard de
numpy_ml/preprocessing/general.py:142
Method__init__
Convert a collection of features to a fixed-dimensional matrix using the hashing trick. Notes ----- Uses the
numpy_ml/preprocessing/general.py:276
Method__init__
A byte-pair encoder for sub-word embeddings. Notes ----- Byte-pair encoding [1][2] is a compression algorithm that i
numpy_ml/preprocessing/nlp.py:178
Method__init__
(self, key, val)
numpy_ml/preprocessing/nlp.py:400
Method__init__
(self, word)
numpy_ml/preprocessing/nlp.py:574
Method__init__
r""" An object for compiling and encoding the term-frequency inverse-document-frequency (TF-IDF) representation of the tokens in a
numpy_ml/preprocessing/nlp.py:584
Method__init__
An object for compiling and encoding the unique tokens in a text corpus. Parameters ---------- lowercase : bool
numpy_ml/preprocessing/nlp.py:1009
Method__init__
r""" Approximately factor a real-valued matrix using regularized alternating least-squares (ALS). Notes -----
numpy_ml/factorization/factors.py:9
← previousnext →601–700 of 1,202, ranked by callers