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

Add quantum/breast_cancer.py #2983

Closed

Conversation

FirePing32
Copy link
Contributor

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #2923 .

@TravisBuddy
Copy link

Travis tests have failed

Hey @prakhargurunani,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: e9652fb0-08a9-11eb-9b15-83942378e0dd

@FirePing32
Copy link
Contributor Author

@cclauss Can you also add hacktoberfest-accepted label to this PR 😊.

from sklearn.preprocessing import MinMaxScaler, StandardScaler


def breast_cancer(training_size, test_size, n, plot_data=False):
Copy link
Member

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:
Copy link
Member

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.

@TravisBuddy
Copy link

Travis tests have failed

Hey @prakhargurunani,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

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
Copy link
Member

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

@TravisBuddy
Copy link

Travis tests have failed

Hey @prakhargurunani,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: caaf8100-08be-11eb-9b15-83942378e0dd

@cclauss
Copy link
Member

cclauss commented Oct 7, 2020

Please run python3 -m doctest -v breast_cancer.py on your local machine until the tests pass. This is discussed in CONTRIBUTING.md.

@FirePing32
Copy link
Contributor Author

Please run python3 -m doctest -v breast_cancer.py on your local machine until the tests pass. This is discussed in CONTRIBUTING.md.

Ok. I will do it.

@FirePing32
Copy link
Contributor Author

@cclauss I have accepted your suggestions. Is there anything more to change ?

@cclauss cclauss added the Plagiarism!! This PR was found to be plagiarized label Oct 7, 2020
@cclauss
Copy link
Member

cclauss commented Oct 7, 2020

Closed for plagiarism. https://en.wikipedia.org/wiki/Plagiarism
This code is copied from https://qiskit.org/documentation/_modules/qiskit/ml/datasets/breast_cancer.html

@cclauss cclauss closed this Oct 7, 2020
@FirePing32 FirePing32 deleted the add-quantum/breast-cancer branch October 7, 2020 17:32
@cclauss cclauss added the invalid label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Plagiarism!! This PR was found to be plagiarized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants