-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Add quantum/breast_cancer.py #2983
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
Add quantum/breast_cancer.py #2983
Conversation
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: e9652fb0-08a9-11eb-9b15-83942378e0dd |
@cclauss Can you also add |
quantum/breast_cancer.py
Outdated
from sklearn.preprocessing import MinMaxScaler, StandardScaler | ||
|
||
|
||
def breast_cancer(training_size, test_size, n, plot_data=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs type hints and doctests as discussed in CONTRIBUTING.md.
for k, key in enumerate(class_labels) | ||
} | ||
|
||
if plot_data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Algorithmic functions should not print() or plot as discussed in CONTRIBUTING.md. So this function should return values an allow the caller to catch the exception, print(), and/or plot.
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: 0c6c6190-08be-11eb-9b15-83942378e0dd |
quantum/breast_cancer.py
Outdated
Wikipedia reference: https://en.m.wikipedia.org/wiki/Breast_cancer | ||
|
||
>>> breast_cancer(10, 4, 7) | ||
24.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function return four values: return sample_train, training_input, test_input, class_labels
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: caaf8100-08be-11eb-9b15-83942378e0dd |
Please run |
Ok. I will do it. |
@cclauss I have accepted your suggestions. Is there anything more to change ? |
Closed for plagiarism. https://en.wikipedia.org/wiki/Plagiarism |
Describe your change:
Checklist:
Fixes: #2923
.