Python icon indicating copy to clipboard operation
Python copied to clipboard

Update perceptron.py

Open AnirbanMukherjeeXD opened this issue 4 years ago • 4 comments

Changes made:

  • Function arguments in init() and sort() of Perceptron class
  • Sending copy of samples (instead of reference) to sample argument of Perceptron constructor
  • Option added for quitting from nested loop
  • Added exceptions for errors

Describe your change:

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

Checklist:

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

AnirbanMukherjeeXD avatar Oct 01 '21 09:10 AnirbanMukherjeeXD

Can someone guide me with this? I tried running the file perceptron.py but it wasn't running. This pull request ensures that the code can run. I want to know how I can improve this pull request so that it gets merged.

AnirbanMukherjeeXD avatar Oct 06 '21 07:10 AnirbanMukherjeeXD

I made a new change in neural_network/perceptron.py where I have added exception cases to pass all the doctests. However, while merging I can see commits made by other users are also included in them. So I just wanted to clarify that my contributions to the project upto today this point (6th October 2021) are only on neural_network/perceptron.py.

AnirbanMukherjeeXD avatar Oct 06 '21 07:10 AnirbanMukherjeeXD

Seems like there're some unnecessary commits. Feel free to open a new PR for this. For running the code, it's documented in https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md

poyea avatar Oct 18 '21 04:10 poyea

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 02 '22 15:05 stale[bot]

In preparation for that denial-of-service attack that is Hacktoberfest, I am closing all pull requests that have failing tests.

cclauss avatar Oct 01 '22 10:10 cclauss