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

Create neuron.md #215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Create neuron.md #215

wants to merge 1 commit into from

Conversation

jimmydin7
Copy link

Description

Type of Change

  • ✨ New snippet
  • πŸ›  Improvement to an existing snippet
  • 🐞 Bug fix
  • πŸ“– Documentation update
  • πŸ”§ Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Closes #

Additional Context

Screenshots (Optional)

Click to view screenshots

---
title: Basic Neuron Class
description: A Python class representing a single artificial neuron that computes the weighted sum of inputs and applies an optional activation function.
tags: python, machine-learning, neural-networks
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please read the guidelines in CONTRIBUTING.md before submitting any snippets, Tags shouldn't contain the name of the language they are coded in

Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding typing to function could be great too !

weighted_sum = np.dot(self.inputs, self.weights) + self.bias
return weighted_sum

# Example usage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please follow proper formatting of snippets, using # Usage: for the usage section.
Could you also improve the example a bit ? There is some text that's not in a comment, and you could add a comment showing what the result of a calculation is/looks like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants