Skip to content

Commit 4bfce85

Browse files
authored
Merge pull request #50 from JuliaAI/dev
For a 0.4 release
2 parents e5c9c33 + dc5de14 commit 4bfce85

File tree

8 files changed

+1328
-399
lines changed

8 files changed

+1328
-399
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJMultivariateStatsInterface"
22
uuid = "1b6a4a23-ba22-4f51-9698-8599985d3728"
33
authors = ["Anthony D. Blaom <[email protected]>", "Thibaut Lienart <[email protected]>", "Okon Samuel <[email protected]>"]
4-
version = "0.3.2"
4+
version = "0.4.0"
55

66
[deps]
77
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
@@ -11,8 +11,8 @@ MultivariateStats = "6f286f6a-111f-5878-ab1e-185364afe411"
1111
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1212

1313
[compat]
14-
Distances = "^0.9,^0.10"
15-
MLJModelInterface = "^0.3.5,^0.4, 1.0"
14+
Distances = "0.9,0.10"
15+
MLJModelInterface = "1.4"
1616
MultivariateStats = "0.9"
1717
StatsBase = "0.32, 0.33"
1818
julia = "1.6"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# MLJ <> MultivariateStats.jl
2-
Repository implementing MLJ interface for
1+
# MLJMultivariateStatsInterface.jl
2+
Repository implementing [MLJ](https://alan-turing-institute.github.io/MLJ.jl/dev/) interface for
33
[MultivariateStats](https://github.com/JuliaStats/MultivariateStats.jl) models.
44

55

src/MLJMultivariateStatsInterface.jl

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -33,84 +33,6 @@ const FactorAnalysisResultType = MS.FactorAnalysis
3333
const default_kernel = (x, y) -> x'y #default kernel used in KernelPCA
3434

3535
# Definitions of model descriptions for use in model doc-strings.
36-
const PCA_DESCR = """
37-
Principal component analysis. Learns a linear transformation to
38-
project the data on a lower dimensional space while preserving most of the initial
39-
variance.
40-
"""
41-
const KPCA_DESCR = "Kernel principal component analysis."
42-
const ICA_DESCR = "Independent component analysis."
43-
const PPCA_DESCR = "Probabilistic principal component analysis"
44-
const FactorAnalysis_DESCR = "Factor Analysis"
45-
const LDA_DESCR = """
46-
Multiclass linear discriminant analysis. The algorithm learns a
47-
projection matrix `P` that projects a feature matrix `Xtrain` onto a lower dimensional
48-
space of dimension `out_dim` such that the trace of the transformed between-class
49-
scatter matrix(`Pᵀ*Sb*P`) is maximized relative to the trace of the transformed
50-
within-class scatter matrix (`Pᵀ*Sw*P`).The projection matrix is scaled such that
51-
`Pᵀ*Sw*P=I` or `Pᵀ*Σw*P=I`(where `Σw` is the within-class covariance matrix) .
52-
Predicted class posterior probability for feature matrix `Xtest` are derived by
53-
applying a softmax transformationto a matrix `Pr`, such that rowᵢ of `Pr` contains
54-
computed distances(based on a distance metric) in the transformed space of rowᵢ in
55-
`Xtest` to the centroid of each class.
56-
"""
57-
const BayesianLDA_DESCR = """
58-
Bayesian Multiclass linear discriminant analysis. The algorithm
59-
learns a projection matrix `P` that projects a feature matrix `Xtrain` onto a lower
60-
dimensional space of dimension `out_dim` such that the trace of the transformed
61-
between-class scatter matrix(`Pᵀ*Sb*P`) is maximized relative to the trace of the
62-
transformed within-class scatter matrix (`Pᵀ*Sw*P`). The projection matrix is scaled
63-
such that `Pᵀ*Sw*P = n` or `Pᵀ*Σw*P=I` (Where `n` is the number of training samples
64-
and `Σw` is the within-class covariance matrix).
65-
Predicted class posterior probability distibution are derived by applying Bayes rule
66-
with a multivariate Gaussian class-conditional distribution.
67-
"""
68-
const SubspaceLDA_DESCR = """
69-
Multiclass linear discriminant analysis. Suitable for high
70-
dimensional data (Avoids computing scatter matrices `Sw` ,`Sb`). The algorithm learns a
71-
projection matrix `P = W*L` that projects a feature matrix `Xtrain` onto a lower
72-
dimensional space of dimension `nc - 1` such that the trace of the transformed
73-
between-class scatter matrix(`Pᵀ*Sb*P`) is maximized relative to the trace of the
74-
transformed within-class scatter matrix (`Pᵀ*Sw*P`). The projection matrix is scaled
75-
such that `Pᵀ*Sw*P = mult*I` or `Pᵀ*Σw*P=mult/(n-nc)*I` (where `n` is the number of
76-
training samples, mult` is one of `n` or `1` depending on whether `Sb` is normalized,
77-
`Σw` is the within-class covariance matrix, and `nc` is the number of unique classes
78-
in `y`) and also obeys `Wᵀ*Sb*p = λ*Wᵀ*Sw*p`, for every column `p` in `P`.
79-
Predicted class posterior probability for feature matrix `Xtest` are derived by
80-
applying a softmax transformation to a matrix `Pr`, such that rowᵢ of `Pr` contains
81-
computed distances(based on a distance metric) in the transformed space of rowᵢ in
82-
`Xtest` to the centroid of each class.
83-
"""
84-
const BayesianSubspaceLDA_DESCR = """
85-
Bayesian Multiclass linear discriminant analysis. Suitable for high dimensional data
86-
(Avoids computing scatter matrices `Sw` ,`Sb`). The algorithm learns a projection
87-
matrix `P = W*L` (`Sw`), that projects a feature matrix `Xtrain` onto a lower
88-
dimensional space of dimension `nc-1` such that the trace of the transformed
89-
between-class scatter matrix(`Pᵀ*Sb*P`) is maximized relative to the trace of the
90-
transformed within-class scatter matrix (`Pᵀ*Sw*P`). The projection matrix is scaled
91-
such that `Pᵀ*Sw*P = mult*I` or `Pᵀ*Σw*P=mult/(n-nc)*I` (where `n` is the number of
92-
training samples, `mult` is one of `n` or `1` depending on whether `Sb` is normalized,
93-
`Σw` is the within-class covariance matrix, and `nc` is the number of unique classes in
94-
`y`) and also obeys `Wᵀ*Sb*p = λ*Wᵀ*Sw*p`, for every column `p` in `P`.
95-
Posterior class probability distibution are derived by applying Bayes rule with a
96-
multivariate Gaussian class-conditional distribution
97-
"""
98-
const LinearRegressor_DESCR = """
99-
Linear Regression. Learns a linear combination of given
100-
variables to fit the response by minimizing the squared error between.
101-
"""
102-
const MultitargetLinearRegressor_DESCR = """
103-
Multitarget Linear Regression. Learns linear combinations of given
104-
variables to fit the responses by minimizing the squared error between.
105-
"""
106-
const RidgeRegressor_DESCR = """
107-
Ridge regressor with regularization parameter lambda. Learns a
108-
linear regression with a penalty on the l2 norm of the coefficients.
109-
"""
110-
const MultitargetRidgeRegressor_DESCR = """
111-
Multitarget Ridge regressor with regularization parameter lambda. Learns a
112-
Multitarget linear regression with a penalty on the l2 norm of the coefficients.
113-
"""
11436
const PKG = "MLJMultivariateStatsInterface"
11537

11638
# ===================================================================

0 commit comments

Comments
 (0)