Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

suggestion for two bugfixes: adding two needed std libs and fixing gauss function in GNB. #6

Open
DvanHartevelt opened this issue May 27, 2021 · 5 comments

Comments

@DvanHartevelt
Copy link

Hello, I'm sorry if this isn't the way to do this, I am a bit new to Github.

I found a few bugs, and I fixed them in my own copy of microMLgen. I am still debugging a few others.
it's usefull to include and in the _skeleton.jinja, because e.g. the GNB uses math functions.

second of all, the gauss function is implemented wrong.
image

This worked, but the gauss is now a negative value, and needs to be added to the priors in votes.jinja

Hopefully I've been of some help. Thank you for this library, it helped a lot so far.

@eloquentarduino
Copy link
Owner

I'm in the process of working on a better implementation of the whole library. I don't actually get what's wrong on the gauss function since it's just a matter of sign and it will work if it is used consistently.

Nevertheless, I welcome your contributions.

@DvanHartevelt
Copy link
Author

The sign can go either way. The two other changes are more important tho. The square needs to be taken of the difference between the datapoint and the mean, not (just) the absolute value. And half of the log of varience needs to be aded/subtracted, because in this context varience is the square of standard deviation.

@DvanHartevelt
Copy link
Author

also, adding "#inlcude " and "#include " is needed, because the two of them are needed.

Oh, also the template for SVM is a bit off. The implementation for variable arguments isn't valid. you need to give the number of variable arguments as an argument. When I get home I can show how I fixed it :P

Also, thank you for the answers

@DvanHartevelt
Copy link
Author

fricc. the two standard libraries somehow wont display. they are cmath and cstdint.

@eloquentarduino
Copy link
Owner

Oh, also the template for SVM is a bit off. The implementation for variable arguments isn't valid. you need to give the number of variable arguments as an argument. When I get home I can show how I fixed it :P

I know of this, and I've fixed it in the new version I'm working on.
The includes and this "error" don't actually prevent the code to work correctly (I tested all of them), it probably isn't 100% portable.

The square needs to be taken of the difference between the datapoint and the mean, not (just) the absolute value. And half of the log of varience needs to be aded/subtracted, because in this context varience is the square of standard deviation.

This needs to be fixed if that's the case.

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

No branches or pull requests

2 participants