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

Start-neural-networks-forwardpropagation #7

Closed

Conversation

sam-the-programmer
Copy link
Member

@sam-the-programmer sam-the-programmer commented Feb 20, 2022

What I have changed πŸ“

I have added basic tests for forwardprop of the easyneuon.neuron API.


Possible issues β›”

No backprop yet.

Additional notes ⭐

None

@sam-the-programmer sam-the-programmer marked this pull request as ready for review February 20, 2022 17:33
@sam-the-programmer sam-the-programmer marked this pull request as draft February 25, 2022 18:26
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 10, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.43%.

Quality metrics Before After Change
Complexity 1.87 ⭐ 1.82 ⭐ -0.05 πŸ‘
Method Length 29.30 ⭐ 30.13 ⭐ 0.83 πŸ‘Ž
Working memory 6.94 πŸ™‚ 7.28 πŸ™‚ 0.34 πŸ‘Ž
Quality 80.51% ⭐ 80.08% ⭐ -0.43% πŸ‘Ž
Other metrics Before After Change
Lines 1353 1500 147
Changed files Quality Before Quality After Quality Change
setup.py 69.72% πŸ™‚ 72.06% πŸ™‚ 2.34% πŸ‘
admin/scripts/clear_logs.py 83.71% ⭐ 83.71% ⭐ 0.00%
admin/scripts/coverage.py 69.60% πŸ™‚ 69.60% πŸ™‚ 0.00%
admin/scripts/new_here.py 95.36% ⭐ 95.36% ⭐ 0.00%
admin/scripts/update_todo.py 69.81% πŸ™‚ 69.81% πŸ™‚ 0.00%
easyneuron/init.py % % %
easyneuron/_classes/init.py % % %
easyneuron/_classes/models.py 94.38% ⭐ 94.38% ⭐ 0.00%
easyneuron/_testutils/init.py % % %
easyneuron/_testutils/gh_actions.py 99.17% ⭐ 99.17% ⭐ 0.00%
easyneuron/_testutils/logger.py 58.21% πŸ™‚ 69.14% πŸ™‚ 10.93% πŸ‘
easyneuron/agents/init.py % % %
easyneuron/agents/envs/init.py % % %
easyneuron/agents/envs/_classes.py 97.09% ⭐ 97.09% ⭐ 0.00%
easyneuron/agents/envs/examples.py 95.49% ⭐ 95.46% ⭐ -0.03% πŸ‘Ž
easyneuron/data/init.py % % %
easyneuron/data/gen.py 75.96% ⭐ 75.96% ⭐ 0.00%
easyneuron/data/load.py 93.30% ⭐ 93.30% ⭐ 0.00%
easyneuron/exceptions/init.py % % %
easyneuron/exceptions/exceptions.py 99.83% ⭐ 99.83% ⭐ 0.00%
easyneuron/genetic/init.py % % %
easyneuron/genetic/genomes/init.py % % %
easyneuron/genetic/optimisers/optimisers.py 64.78% πŸ™‚ 64.78% πŸ™‚ 0.00%
easyneuron/logging/init.py % % %
easyneuron/logging/logging.py 90.72% ⭐ 90.72% ⭐ 0.00%
easyneuron/math/init.py % % %
easyneuron/math/distance/init.py % % %
easyneuron/math/distance/distance.py 78.07% ⭐ 78.07% ⭐ 0.00%
easyneuron/math/random/init.py % % %
easyneuron/math/random/random.py 97.42% ⭐ 97.42% ⭐ 0.00%
easyneuron/metrics/init.py % % %
easyneuron/metrics/accuracy/init.py % % %
easyneuron/metrics/accuracy/accuracy.py 85.05% ⭐ 85.05% ⭐ 0.00%
easyneuron/metrics/loss/init.py 86.03% ⭐ 86.03% ⭐ 0.00%
easyneuron/metrics/loss/meanerrors.py 83.41% ⭐ 83.41% ⭐ 0.00%
easyneuron/neighbours/init.py % % %
easyneuron/neighbours/_classes.py 94.51% ⭐ 94.51% ⭐ 0.00%
easyneuron/neighbours/knearest.py 69.52% πŸ™‚ 69.52% πŸ™‚ 0.00%
easyneuron/types/init.py % % %
easyneuron/types/types.py 57.16% πŸ™‚ 50.07% πŸ™‚ -7.09% πŸ‘Ž
examples/kNN.py 81.83% ⭐ 67.53% πŸ™‚ -14.30% πŸ‘Ž
tests/test_agents_envs.py 94.23% ⭐ 94.23% ⭐ 0.00%
tests/test_data.py 91.02% ⭐ 91.02% ⭐ 0.00%
tests/test_genetic.py 80.08% ⭐ 80.08% ⭐ 0.00%
tests/test_logging.py 88.82% ⭐ 85.34% ⭐ -3.48% πŸ‘Ž
tests/test_maths.py 91.37% ⭐ 91.37% ⭐ 0.00%
tests/test_metrics.py 88.87% ⭐ 88.87% ⭐ 0.00%
tests/test_neighbours.py 87.63% ⭐ 87.60% ⭐ -0.03% πŸ‘Ž

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
easyneuron/genetic/optimisers/optimisers.py BasicOptimiser.optimise 8 ⭐ 140 😞 14 😞 49.55% 😞 Try splitting into smaller methods. Extract out complex expressions
easyneuron/neighbours/knearest.py KNNClassifier._choose_label 10 πŸ™‚ 121 😞 10 😞 56.55% πŸ™‚ Try splitting into smaller methods. Extract out complex expressions
easyneuron/_testutils/logger.py log_errors 6 ⭐ 97 πŸ™‚ 14 😞 56.87% πŸ™‚ Extract out complex expressions
easyneuron/_testutils/logger.py log_errors.wrapper 4 ⭐ 92 πŸ™‚ 14 😞 59.52% πŸ™‚ Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • πŸ™‚ good
  • 😞 poor
  • β›” very poor

The πŸ‘ and πŸ‘Ž indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@sam-the-programmer sam-the-programmer marked this pull request as ready for review June 10, 2022 19:39
Copy link
Member Author

@sam-the-programmer sam-the-programmer left a comment

Choose a reason for hiding this comment

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

Starting pull request

@sam-the-programmer sam-the-programmer deleted the start-neural-networks-forwardpropagation branch June 10, 2022 19:40
@sam-the-programmer sam-the-programmer restored the start-neural-networks-forwardpropagation branch June 10, 2022 19:42
@sam-the-programmer
Copy link
Member Author

Reopening

@sam-the-programmer sam-the-programmer deleted the start-neural-networks-forwardpropagation branch June 10, 2022 19:43
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.

None yet

1 participant