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

Categorical naive bayes #103

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

abhinavmalhotra01
Copy link
Contributor

tried to resolve #53
code for categorical nb using map and following gaussian nb convention

tried to resolve PEC-CSS#53

code for categorical nb using map and following gaussian nb convention

## Example

```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```
```cpp

#include "categorical_nb.hpp"

template<class T>

Copy link
Collaborator

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.

// priors calculated

std::map<std::string, std::map<T, double>> likelihoods;
// for any ith label -> n instances -> for each differ probability
Copy link
Collaborator

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.

Copy link
Contributor Author

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


#include "../../../core.hpp"

template<class T> class categoricalNB
Copy link
Collaborator

Choose a reason for hiding this comment

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

change to pascal case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed sir

Comment on lines 29 to 30
```
cpp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```
cpp
```cpp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed sir

Copy link
Collaborator

@uttammittal02 uttammittal02 left a 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

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

Successfully merging this pull request may close these issues.

Feature : Implement Categorical Naive Bayes
3 participants