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

Updated simple_neural_network.py #9569

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ved-et9
Copy link

@ved-et9 ved-et9 commented Oct 3, 2023

->Created simple_neural_network.py from scratch

->It now contains Forward propagation as well as backward propagation
with training of the simple 2 layer neural network.

->Article Referred is a free resource avialable for evryone

Fixes #8785

  • 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 include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes Source for simple_neural_network.py is member-only #8785 ".

@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Oct 3, 2023
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Oct 3, 2023
Copy link
Contributor

@tianyizheng02 tianyizheng02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation is definitely a far improvement over our current implementation (and it runs much faster!), but you really shouldn't just copy the implementation from your source. However, I think it's fine if you significantly refactor it to make it more of your own work. @cclauss, thoughts?

One example of how you could rewrite and improve your replacement implementation is to write a class for the neural network: then initialize_network would just be the __init__ function and training would all fall under a NN object's methods. This would allow the user to create a NN and not have to pass the object into the training function.

@cclauss
Copy link
Member

cclauss commented Oct 8, 2023

There is no software license associated with:

I think we should keep the current neural_network/simple_neural_network.py implementation in place. If we add this, it should be under a different filename.

I am not a fan of replacing other people's work with a copy of yet another person's work without some work to create value. If serious work is done to add type hints, doctests, etc. to the functions then this could considered a derivative work. However, given there is no license, I think we would need approval from @jbrownlee or @Jason2Brownlee before we land this in an MIT-licensed repo. https://github.com/TheAlgorithms/Python/blob/master/LICENSE.md

@Jason2Brownlee
Copy link

Sorry, I no longer own or operate machine Learning mastery - I cannot comment on licenses for the code. I recommend that you reach out to the company directly.

That being said, I wrote it as a port of my 2011 ruby version which is under creative commons here:
https://github.com/clever-algorithms/CleverAlgorithms

There are tons of algorithms there that may interest you for this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source for simple_neural_network.py is member-only
4 participants