Projection Matrix Factory¶
Module for the factory class for projection matrices
Beta distribution |
|
Cauchy distribution |
|
Dirichlet distribution |
|
Laplace distribution |
|
Multivariate normal distribution |
|
Normal distribution |
|
Uniform distribution |
-
class
ProjectionFactory
[source] Bases:
object
Factory class that spawns projection matrices.
- Example
>>> from athena import ProjectionFactory >>> import numpy as np >>> input_dim = 2 >>> n_features = 40 >>> params = [1.1, 2.9] >>> for pname in ProjectionFactory.projections: >>> y = ProjectionFactory(pname)(input_dim, n_features, params)
-
static
__new__
(cls, fname)[source] Create and return a new object. See help(type) for accurate signature.
-
static
beta
(input_dim, n_features, params)[source] Beta distribution
-
static
cauchy
(input_dim, n_features, params)[source] Cauchy distribution
-
static
dirichlet
(input_dim, n_features, params)[source] Dirichlet distribution
-
static
laplace
(input_dim, n_features, params)[source] Laplace distribution
-
static
multivariate_normal
(input_dim, n_features, params)[source] Multivariate normal distribution
- Parameters
diagonal of the covariance matrix of the distribution. The mean is set to the 0 vector. :return: n_features-by-input_dim projection matrix. :rtype: numpy.ndarray.
-
static
normal
(input_dim, n_features, params)[source] Normal distribution
-
projections
= ['beta', 'cauchy', 'dirichlet', 'laplace', 'multivariate_normal', 'normal', 'uniform']
-
static
uniform
(input_dim, n_features, params)[source] Uniform distribution