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

Naive Bayes #108

Open
StevenSopilidis opened this issue Mar 24, 2024 · 2 comments
Open

Naive Bayes #108

StevenSopilidis opened this issue Mar 24, 2024 · 2 comments

Comments

@StevenSopilidis
Copy link

Shouldn't the coefficient be
coeff = 1.0 / math.pi * math.sqrt(2.0 * math.pi) + eps
In equation of normal equation the pi is outside of sqrt

@MohdRasmil7
Copy link

The coefficient in the normal equation for the Gaussian distribution (also known as the probability density function) should indeed be:

[ \text{coeff} = \frac{1}{\sqrt{2\pi}} + \epsilon ]

where:

(\pi) represents the mathematical constant pi (approximately 3.14159).
(\epsilon) is a small value (usually added for numerical stability).
The square root of (2\pi) should be inside the square root, not outside. Here’s the corrected expression:

[ \text{coeff} = \frac{1}{\sqrt{2\pi}} + \epsilon ]

@StevenSopilidis
Copy link
Author

Nice

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

No branches or pull requests

2 participants