added main method

This commit is contained in:
Anne Lorenz 2018-09-20 10:37:18 +02:00
parent 68ba9e83cb
commit 6a8386e897
5 changed files with 45 additions and 36 deletions

View File

@ -105,7 +105,8 @@ class DecisionTree:
# sum(f1_scores_train)/float(len(f1_scores_train))))
# print()
#################################
if __name__ == '__main__':
print('# starting decision tree')
print('# ...')

View File

@ -159,7 +159,8 @@ class NaiveBayes:
#print metrics
print('F1 score: ', format(f1_score(y_train_test, predictions)))
#################################
if __name__ == '__main__':
print('# starting naive bayes')
print('# ...')

View File

@ -16,6 +16,10 @@ graphviz==0.9
scikit_learn==0.19.2
## Installation under (UBUNTU?)
## Installation under Windows
pip install XY
## Installation under UBUNTU
apt-get install XX

View File

@ -94,6 +94,8 @@ class Requester:
# save csv
CsvHandler.write_csv(df, filestring)
if __name__ == '__main__':
print('# starting requester')
print('# ...')
save_articles_from_webhoseio()

3
SVM.py
View File

@ -84,7 +84,8 @@ class SVM:
print(grid.best_params_)
print()
########################
if __name__ == '__main__':
print('# starting svm')
print('# ...')