Posts

Showing posts from March 13, 2019

Tœufles

Image
Tœufles Region Hauts-de-France Département Somme Arrondissement Abbeville Kanton Abbeville-2 Gemeindeverband Vimeu Koordinaten 50° 4′  N , 1° 43′  O 50.066944444444 1.7152777777778 Koordinaten: 50° 4′  N , 1° 43′  O Höhe 30–114 m Fläche 8,88 km 2 Einwohner 303 (1. Januar 2016) Bevölkerungsdichte 34 Einw./km 2 Postleitzahl 80870 INSEE-Code 80764 Website http://www.cc-moyenneville.fr/la_ccvv.php?page=communes Kirche Saint-Valery Tœufles (picardisch: Teufe ) ist eine nordfranzösische Gemeinde mit 303 Einwohnern (Stand 1. Januar 2016) im Département Somme in der Region Hauts-de-France. Die Gemeinde liegt im Arrondissement Abbeville und ist Teil der Communauté de communes du Vimeu und des Kantons Abbeville-2. Inhaltsverzeichnis 1 Geographie 2 Einwohner 3 Verwaltung 4 Sehenswürdigkeiten 5 Einzelnachweise 6 Weblinks Geographie |...

How can i improve this? [closed]

Image
-4 I am currently self teaching myself Python , and this is my first program. I am doing some simple projects so i can improve. Would like to hear feedback on this one. import random print("There is a number between 1 and 100 guess it and you will win a price : ") def guess(): # A simple guess game. random_number = random.randint(1, 5) flag = True user_guess = while flag: user_number = input("Enter the number : ") user_guess.append(user_number) if int(user_number) < random_number: print("You have to go higher") elif int(user_number) > random_number: print("You have to go lower ") else: flag = False print("Congrats you win !!! nThe numbers of guesses before you won : ") print(len(user_guess)) guess() while True: play_again = input("Do you like to play again ? : (y/n): ") if play_again == 'y': guess() else: print("Thank you for playing have a nice day!!! ") break pyt...

Getting different accuracy on each run of Random Forest, Non-Linear SVC and Multinomial NB in python for text classification

Image
1 I am working on a binary text classification problem in python, and have developed models in Random Forest, Non-Linear SVC & Multinomial NB. But on each run, of these respective models, am getting different accuracy & confusion matrix parameters on the test set. I have used random_state parameter in train_test_split and while initializing each of these models. Random.Seed is also added in the code. Is there anything else I am missing? Thanks. Code Sample: X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.15, stratify= Y, random_state = 42) tfidf_vectorizer = TfidfVectorizer(analyzer='word', stop_words = 'english', max_df = 0.8, min_df = 0.05, ngram_range=(1,3)) tfidf_train = tfidf_vectorizer.fit_transform(X_train) tfidf_test = tfidf_vectorizer.transform(X_test) #Default Hyperparameters rfc = RandomForestClassifier(random_state = 42) rfc.fit(tfidf_train,Y_train) predictions = rfc.predict(tfidf_test) score = metrics.accuracy_s...