Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Conversation

@maxwell-aladago
Copy link

Given two activations z_i \in \mathbb{R}^{n_i, T} and z_j \in \mathbb{R}^{n_j, T} where n_j > n_i, pwcca(z_i, z_j) raises an IndexError whereas pwcca(z_j, z_i) works fine.

This pull request fixes that bug.

@google-cla
Copy link

google-cla bot commented Mar 6, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@brando90
Copy link

brando90 commented Oct 20, 2021

@arimorcos @rubai5 @yosinski can this be merged?

@brando90
Copy link

brando90 commented Oct 20, 2021

Given two activations z_i \in \mathbb{R}^{n_i, T} and z_j \in \mathbb{R}^{n_j, T} where n_j > n_i, pwcca(z_i, z_j) raises an IndexError whereas pwcca(z_j, z_i) works fine.

This pull request fixes that bug.

@maxwell-aladago Does this affect the code or what it just a notational bug?

@maxwell-aladago
Copy link
Author

Given two activations z_i \in \mathbb{R}^{n_i, T} and z_j \in \mathbb{R}^{n_j, T} where n_j > n_i, pwcca(z_i, z_j) raises an IndexError whereas pwcca(z_j, z_i) works fine.
This pull request fixes that bug.

@maxwell-aladago Does this affect the code or what it just a notational bug?

It affected the code.

@brando90
Copy link

@maxwell-aladago I am confused, if the if statement that you left unchanged, why does it matter which of the two layers we choose if they remove the small values anyway in their cca code?

i.e.

    # - choose layer that had less small values removed (since the sum of true indices would be less)
    # to me this is puzzling because since we removed them when computing the
    # sigma_xxs, sigma_yys etc. why does it matter which one we choose? perhaps becuase at the end it uses
    # the actual acts1 value bellow which makes a difference
    if np.sum(sresults["x_idxs"]) <= np.sum(sresults["y_idxs"]):

@brando90
Copy link

discussion of this here: moskomule/anatome#27

@brando90
Copy link

@maxwell-aladago I also noticed you didn't center the acts1, acts2 (nor did the original code)...isn't that a bug? the cca_core.get_cca_similarity does center but the compute_pwcca does not...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants