Skip to content

Commit

Permalink
Removing the slow constrained option for Elastic CCA. Now uses maxvar…
Browse files Browse the repository at this point in the history
… by default and sumcor for lasso where valid
  • Loading branch information
jameschapman19 committed Nov 17, 2021
1 parent 4eb6461 commit 7826a4b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions examples/plot_kernel_cca.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ def my_kernel(X, Y, param=0):
return np.random.normal(0, param)


kernel_custom = KCCA(latent_dims=latent_dims, kernel=[my_kernel, my_kernel],
kernel_params=[{'param': 1}, {'param': 1}]).fit((X, Y))
kernel_custom = KCCA(
latent_dims=latent_dims,
kernel=[my_kernel, my_kernel],
kernel_params=[{"param": 1}, {"param": 1}],
).fit((X, Y))

# %%
# Linear
Expand Down Expand Up @@ -90,5 +93,8 @@ def my_kernel(X, Y, param=0):
return X @ M @ M.T @ Y.T


kernel_custom = KCCA(latent_dims=latent_dims, kernel=[my_kernel, my_kernel],
kernel_params=[{'param': 1}, {'param': 1}]).fit((X, Y))
kernel_custom = KCCA(
latent_dims=latent_dims,
kernel=[my_kernel, my_kernel],
kernel_params=[{"param": 1}, {"param": 1}],
).fit((X, Y))

0 comments on commit 7826a4b

Please sign in to comment.