add separator
This commit is contained in:
parent
440a80f08d
commit
de3109cf95
9
task2.py
9
task2.py
@ -5,6 +5,9 @@ from math import sqrt
|
||||
from math import exp
|
||||
from math import pi
|
||||
|
||||
def separator():
|
||||
print("\n* --------------------------------")
|
||||
|
||||
def read_csv(filename):
|
||||
dataset = list()
|
||||
with open(filename, 'r') as file:
|
||||
@ -148,6 +151,12 @@ def naive_bayes(train, test):
|
||||
predictions.append(output)
|
||||
return(predictions)
|
||||
|
||||
|
||||
|
||||
|
||||
separator()
|
||||
print('-- Naive Bayes on iris dataset\n')
|
||||
|
||||
# run naive bayes on the example dataset
|
||||
seed(1)
|
||||
filename = 'iris.txt'
|
||||
|
Reference in New Issue
Block a user