Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs13-23sp
project02
Commits
6eebe685
Commit
6eebe685
authored
1 year ago
by
Nicholas Stone Adamo
Browse files
Options
Download
Email Patches
Plain Diff
Add more docstring info
parent
d4e1a604
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NaiveBayes.py
+3
-2
NaiveBayes.py
with
3 additions
and
2 deletions
+3
-2
NaiveBayes.py
View file @
6eebe685
import
os
import
math
from
typing
import
List
a
=
1
k
=
1
k
=
1
# Laplace smoothing constant
class
NaiveBayes
:
def
__init__
(
self
,
data_folder
,
train_subfolder
,
validate_subfolder
,
c1_folder
,
c2_folder
):
...
...
@@ -17,6 +16,8 @@ class NaiveBayes:
pass
# TODO: Implement Naive Bayes classification
# Should write output to classification.txt in the form "file.txt classification"
# where classification is one of c1_folder or c2_folder
def
classify
(
self
,
files
:
List
[
str
],
folder
:
str
):
pass
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help