-
Notifications
You must be signed in to change notification settings - Fork 15
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
Categorical naive bayes #103
base: main
Are you sure you want to change the base?
Categorical naive bayes #103
Conversation
tried to resolve PEC-CSS#53 code for categorical nb using map and following gaussian nb convention
|
||
## Example | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```cpp |
#include "categorical_nb.hpp" | ||
|
||
template<class T> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra line. Don't forget to run formatter after changing this.
src/slowmokit/methods/neighbors/categorical_nb/categorical_nb.cpp
Outdated
Show resolved
Hide resolved
// priors calculated | ||
|
||
std::map<std::string, std::map<T, double>> likelihoods; | ||
// for any ith label -> n instances -> for each differ probability |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reframe comment in normal english. No shorthand notations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reframed , but i have made some changes in code
src/slowmokit/methods/neighbors/categorical_nb/categorical_nb.cpp
Outdated
Show resolved
Hide resolved
src/slowmokit/methods/neighbors/categorical_nb/categorical_nb.cpp
Outdated
Show resolved
Hide resolved
src/slowmokit/methods/neighbors/categorical_nb/categorical_nb.cpp
Outdated
Show resolved
Hide resolved
src/slowmokit/methods/neighbors/categorical_nb/categorical_nb.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Ishwarendra Jha <[email protected]>
Co-authored-by: Ishwarendra Jha <[email protected]>
Co-authored-by: Ishwarendra Jha <[email protected]>
Co-authored-by: Ishwarendra Jha <[email protected]>
Co-authored-by: Ishwarendra Jha <[email protected]>
…alhotra01/slowmokit into categorical_naive_bayes
|
||
#include "../../../core.hpp" | ||
|
||
template<class T> class categoricalNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to pascal case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed sir
``` | ||
cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
cpp | |
```cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed sir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the required changes
tried to resolve #53
code for categorical nb using map and following gaussian nb convention