Uh oh!
There was an error while loading. Please reload this page.
Add quantum/breast_cancer.py - #2983
Conversation
TravisBuddy
commented
Oct 7, 2020
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: e9652fb0-08a9-11eb-9b15-83942378e0dd |
FirePing32
commented
Oct 7, 2020
@cclauss Can you also add |
| from sklearn.preprocessing import MinMaxScaler, StandardScaler | ||
| def breast_cancer(training_size, test_size, n, plot_data=False): |
There was a problem hiding this comment.
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.
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.
TravisBuddy
commented
Oct 7, 2020
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: 0c6c6190-08be-11eb-9b15-83942378e0dd |
| Wikipedia reference: https://en.m.wikipedia.org/wiki/Breast_cancer | ||
| >>> breast_cancer(10, 4, 7) | ||
| 24.9 |
There was a problem hiding this comment.
The function return four values: return sample_train, training_input, test_input, class_labels
TravisBuddy
commented
Oct 7, 2020
Travis tests have failedHey @prakhargurunani, TravisBuddy Request Identifier: caaf8100-08be-11eb-9b15-83942378e0dd |
Please run |
FirePing32
commented
Oct 7, 2020
Ok. I will do it. |
FirePing32
commented
Oct 7, 2020
@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.