-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Hello,
When using CCA, we (@trappmartin and I) tried to reproduce the results from sklearn.cross_decomposition.CCA
>>> from sklearn.cross_decomposition import CCA
>>> X = [[0., 0., 1.], [1.,0.,0.], [2.,2.,2.], [3.,5.,4.]]
>>> Y = [[0.1, -0.2], [0.9, 1.1], [6.2, 5.9], [11.9, 12.3]]
>>> cca = CCA(n_components=1)
>>> cca.fit(X, Y)
CCA(n_components=1)
>>> X_c, Y_c = cca.transform(X, Y)
>>> X_c
array([[-1.3373174 ],
[-1.10847164],
[ 0.40763151],
[ 2.03815753]])
with the following
julia> Y = reduce(hcat, [[0.1, -0.2], [0.9, 1.1], [6.2, 5.9], [11.9, 12.3]])
julia> X = reduce(hcat, [[0., 0., 1.], [1.,0.,0.], [2.,2.,2.], [3.,5.,4.]])
julia> m = fit(CCA, X, Y; outdim=1)
CCA (xindim = 3, yindim = 2, outdim = 1)
julia> xtransform(m, X)
1×4 Matrix{Float64}:
0.867677 0.678174 -0.228687 -1.31716
but found out that the results do not match.
We could not figure out if it is due to our code or the package.
Is there a way to reproduce the results from sklearn?
trappmartin
Metadata
Metadata
Assignees
Labels
No labels