Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m1 and m2 calculation #2

Open
MateuszOtmianowski opened this issue Feb 13, 2019 · 0 comments
Open

m1 and m2 calculation #2

MateuszOtmianowski opened this issue Feb 13, 2019 · 0 comments

Comments

@MateuszOtmianowski
Copy link

I've got a quick question about the way in which you have calculated m1 and m2 metrics. You have written in your paper that those two metrics aim "to measure the consistency between the observed input and the change in the corresponding prediction". So if we are interested in how the input impacts the prediction, why when calculating coefficient, you use y (y_corr_batch and y_seq_batch, so target values) instead of corresponding x values?

I have in mind this part of your code:

coefficient = np.sum( (np.power(base, 1 - y_corr_batch[:, 1:, :])) * y_seq_batch[:, 1:, :], axis=2)

m1 = np.sum(
    coefficient * np.sign(np.sum(
        (pred_seqs[:, 1:, :] - pred_seqs[:, :-1, :]) * y_seq_batch[:, 1:, :], #y_t-y_{t-1}
        axis=2
        ))
    )
m2 = np.sum(
    coefficient * np.sum(
        (pred_seqs[:, 1:, :] - pred_seqs[:, :-1, :]) * y_seq_batch[:, 1:, :],
        axis=2
        )
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant