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

What is the alpha_matrix.csv? #7

Open
nottwy opened this issue Dec 6, 2019 · 1 comment
Open

What is the alpha_matrix.csv? #7

nottwy opened this issue Dec 6, 2019 · 1 comment

Comments

@nottwy
Copy link

nottwy commented Dec 6, 2019

Recently I'm learning your tool and find that I can't understand what the file alpha_matrix.csv is.
It's used as target data in keras fit.
It's in line 44 of the file evaluation.py
wdnn.fit(X_train, alpha_matrix[train], epochs=100, verbose=False, validation_data=[X_val,alpha_matrix[val]])

@mchen16
Copy link

mchen16 commented Dec 9, 2019

alpha_matrix is calculated based on the proportion of resistant isolates for each drug. In helpers.py, the function "masked_multi_weighted_bce()" takes in this alpha_matrix and reconstructs the labels used in the other machine learning models, so ultimately, the WDNN is trained on a similar label matrix as the other models. However, we adjusted our loss function to upweight the sparser class according to the proportion of resistant isolates in each drug, which is why we constructed the alpha_matrix in this way.

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

2 participants