Skip to content

Categorical naive bayes#103

Open
abhinavmalhotra01 wants to merge 24 commits intoPEC-CSS:mainfrom
abhinavmalhotra01:categorical_naive_bayes
Open

Categorical naive bayes#103
abhinavmalhotra01 wants to merge 24 commits intoPEC-CSS:mainfrom
abhinavmalhotra01:categorical_naive_bayes

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

abhinavmalhotra01 and others added 14 commits February 12, 2023 18:41
Co-authored-by: Ishwarendra Jha <75680424+Ishwarendra@users.noreply.github.com>
Co-authored-by: Ishwarendra Jha <75680424+Ishwarendra@users.noreply.github.com>
Co-authored-by: Ishwarendra Jha <75680424+Ishwarendra@users.noreply.github.com>
Co-authored-by: Ishwarendra Jha <75680424+Ishwarendra@users.noreply.github.com>
Co-authored-by: Ishwarendra Jha <75680424+Ishwarendra@users.noreply.github.com>

#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