- class composes.transformation.scaling.ppmi_weighting.PpmiWeighting¶
Positive Point-wise Mutual Information.
\(pmi(r,c) = log\frac{P(r,c)}{P(r)P(c)}\)
\(ppmi(r,c)= pmi(r,c) \text{ if } pmi(r,c)\geq 0 \text{ else } 0\)
- class composes.transformation.scaling.plmi_weighting.PlmiWeighting¶
Positive Local Mutual Information.
\(plmi(r,c)=ppmi(r,c)count(r,c)\)
- class composes.transformation.scaling.epmi_weighting.EpmiWeighting¶
Exponential Point-wise Mutual Information.
\(epmi(r,c) = \frac{P(r,c)}{P(r)P(c)}\)
- class composes.transformation.scaling.plog_weighting.PlogWeighting¶
Positive Log Weighting
\(plog(r,c)= log(r,c) \text{ if } log(r,c) \geq 0 \text{ else } 0\)
- class composes.transformation.scaling.normalization.Normalization(**kwargs)¶
Normalizes the a space according to a some criterion.
Available criteria:
sum: Default. The result matrix \(X\) will satisfy: \(\sum_{i,j} X_{ij}=1\)
length: The result matrix \(X\) will satisfy: \(\sqrt{\sum_{i,j} X_{ij}^2}=1\)
- class composes.transformation.scaling.row_normalization.RowNormalization(**kwargs)¶
Normalizes the rows of a space according to a some criterion.
Available criteria:
length: Default. Each row \(X_i\) of the result matrix will satisfy: \(\sqrt{\sum_j X_{ij}^2}=1\)
sum: Each row \(X_i\) of the result matrix will satisfy: \(\sum_j X_{ij}=1\)
- class composes.transformation.dim_reduction.svd.Svd(reduced_dimension)¶
Performs truncated Singular Value Decomposition to a reduced dimension \(k\).
Given an input matrix \(X\), it computes the decomposition:
\(X = U \Sigma V^{T}\)
It returns \(U \Sigma\) truncated to dimension \(min(k,rank(X))\)
- class composes.transformation.dim_reduction.nmf.Nmf(reduced_dimension)¶
Performs Non-negative Matrix Factorization to reduced dimension \(k\).
Given an input non-negative matrix \(X\), it computes the decomposition:
\(X \approx WH\) where W and H are non-negative matrices which minimize \(||X-WH||_{2}\)
It returns the matrix W.
- class composes.transformation.feature_selection.top_feature_selection.TopFeatureSelection(reduced_dimension, **kwargs)¶
Sorts the columns of a space according to some criterion and returns a space containing only the top \(k\) ones.
Available criteria:
sum: Default. Ranks columns according to the sum on their elements.
length: Ranks columns according to their vector length.