added main method
This commit is contained in:
		
							parent
							
								
									68ba9e83cb
								
							
						
					
					
						commit
						6a8386e897
					
				@ -105,7 +105,8 @@ class DecisionTree:
 | 
				
			|||||||
                # sum(f1_scores_train)/float(len(f1_scores_train))))
 | 
					                # sum(f1_scores_train)/float(len(f1_scores_train))))
 | 
				
			||||||
        # print()
 | 
					        # print()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #################################
 | 
					    if __name__ == '__main__':
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        print('# starting decision tree')
 | 
					        print('# starting decision tree')
 | 
				
			||||||
        print('# ...')
 | 
					        print('# ...')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -159,7 +159,8 @@ class NaiveBayes:
 | 
				
			|||||||
        #print metrics
 | 
					        #print metrics
 | 
				
			||||||
        print('F1 score: ', format(f1_score(y_train_test, predictions)))
 | 
					        print('F1 score: ', format(f1_score(y_train_test, predictions)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #################################
 | 
					    if __name__ == '__main__':
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        print('# starting naive bayes')
 | 
					        print('# starting naive bayes')
 | 
				
			||||||
        print('# ...')
 | 
					        print('# ...')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,10 @@ graphviz==0.9
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
scikit_learn==0.19.2
 | 
					scikit_learn==0.19.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Installation under (UBUNTU?)
 | 
					## Installation under Windows
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pip install XY
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Installation under UBUNTU
 | 
				
			||||||
 | 
					
 | 
				
			||||||
apt-get install XX
 | 
					apt-get install XX
 | 
				
			||||||
 | 
				
			|||||||
@ -94,6 +94,8 @@ class Requester:
 | 
				
			|||||||
        # save csv
 | 
					        # save csv
 | 
				
			||||||
        CsvHandler.write_csv(df, filestring)
 | 
					        CsvHandler.write_csv(df, filestring)
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					     if __name__ == '__main__':
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        print('# starting requester')
 | 
					        print('# starting requester')
 | 
				
			||||||
        print('# ...')
 | 
					        print('# ...')
 | 
				
			||||||
        save_articles_from_webhoseio()
 | 
					        save_articles_from_webhoseio()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user