Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmshane committed Nov 28, 2024
2 parents deb9c54 + 8a7059d commit 21d6c66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions theProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def evaluate(self, data : Data, classifier : Classifier, featureList = None):
correct+= 1
accuracy = (correct / len(data.features)) #divide correct by total instances to get accuracy
accuracy = round(accuracy, 4)
return accuracy
logging.info(f"{featureList} accuracy = {accuracy}")


class FeatureSearch:
featureList = []
Expand Down Expand Up @@ -235,4 +236,4 @@ def printFeatureChange(featureChanged,currentFeatures,accuracy,add=True):

dadi.loadFeatureList(featureList)
classi.train(dadi)
print(vally.evaluate(dadi, classi, [2, 4, 6]))
vally.evaluate(dadi, classi, [3, 5, 7])

0 comments on commit 21d6c66

Please sign in to comment.