├── dfs.py ├── bfs.py ├── N_Queen.py ├── hangman_art.py ├── hangman.py ├── waterjug.py ├── waterjugbfs.py ├── MLPClassifier.py ├── hangman_words.py └── MLPClassifier.ipynb /dfs.py: -------------------------------------------------------------------------------- 1 | graph= { 2 | 'A' : ['B', 'C'], 3 | 'B' : ['D', 'E'], 4 | 'C' : ['F'], 5 | 'D' : [], 6 | 'E' : ['F'], 7 | 'F' : [], 8 | } 9 | visited = set() 10 | def dfs(visited, graph, node): 11 | if node not in visited: 12 | print(node) 13 | visited.add(node) 14 | for neighbour in graph[node]: 15 | dfs(visited, graph, neighbour) 16 | print("Following is the Depth-First Search") 17 | dfs(visited, graph, 'A') 18 | 19 | -------------------------------------------------------------------------------- /bfs.py: -------------------------------------------------------------------------------- 1 | graph={ 2 | 'P':['Q','R','S'], 3 | 'Q':['P','R'], 4 | 'R':['P','Q','T'], 5 | 'T':['R'], 6 | 'S':['P'] 7 | } 8 | visited=[] 9 | queue=[] 10 | def bfs(visited,graph,node): 11 | visited.append(node) 12 | queue.append(node) 13 | while queue: 14 | m=queue.pop(0) 15 | print(m,end=" ") 16 | for neighbour in graph[m]: 17 | if neighbour not in visited: 18 | visited.append(neighbour) 19 | queue.append(neighbour) 20 | print("following is the breadth first search") 21 | bfs(visited,graph,'P') 22 | -------------------------------------------------------------------------------- /N_Queen.py: -------------------------------------------------------------------------------- 1 | class solution: 2 | def __init__(self): 3 | self.MAX = 20 4 | self.A = [0]*self.MAX 5 | def placement(self,i,j): 6 | for k in range(1,i): 7 | if(self.A[k] == j) or abs(self.A[k] -j) == abs(k-i): 8 | return False 9 | print(self.A) 10 | return True 11 | def printplacedqueen(self,N): 12 | print('Arrangement-->') 13 | print() 14 | 15 | for i in range(1,N+1): 16 | for j in range(1,N+1): 17 | if self.A[i] !=j: 18 | print('\t_',end =' ') 19 | else: 20 | print('\tQ',end = ' ') 21 | print() 22 | print() 23 | 24 | def N_Queens(self,i,j): 25 | for k in range(1,N+1): 26 | if self.placement(i,k): 27 | self.A[i] = k 28 | if i == N: 29 | self.printplacedqueen(N) 30 | else: 31 | self.N_Queens(i+1,N) 32 | N= int(input("enter the queens value")) 33 | obj = solution() 34 | obj.N_Queens(1,N) 35 | -------------------------------------------------------------------------------- /hangman_art.py: -------------------------------------------------------------------------------- 1 | stages = [''' 2 | +---+ 3 | | | 4 | O | 5 | /|\ | 6 | / \ | 7 | | 8 | ========= 9 | ''', ''' 10 | +---+ 11 | | | 12 | O | 13 | /|\ | 14 | / | 15 | | 16 | ========= 17 | ''', ''' 18 | +---+ 19 | | | 20 | O | 21 | /|\ | 22 | | 23 | | 24 | ========= 25 | ''', ''' 26 | +---+ 27 | | | 28 | O | 29 | /| | 30 | | 31 | | 32 | =========''', ''' 33 | +---+ 34 | | | 35 | O | 36 | | | 37 | | 38 | | 39 | ========= 40 | ''', ''' 41 | +---+ 42 | | | 43 | O | 44 | | 45 | | 46 | | 47 | ========= 48 | ''', ''' 49 | +---+ 50 | | | 51 | | 52 | | 53 | | 54 | | 55 | ========= 56 | '''] 57 | 58 | logo = ''' 59 | _ 60 | | | 61 | | |__ __ _ _ __ __ _ _ __ ___ __ _ _ __ 62 | | '_ \ / _` | '_ \ / _` | '_ ` _ \ / _` | '_ \ 63 | | | | | (_| | | | | (_| | | | | | | (_| | | | | 64 | |_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_| 65 | __/ | 66 | |___/ ''' 67 | 68 | 69 | -------------------------------------------------------------------------------- /hangman.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | from hangman_words import word_list 4 | from hangman_art import stages, logo 5 | chosen_word=random.choice(word_list) 6 | lives=6 7 | print(f'Psst, the solution is {chosen_word}.') 8 | print(logo) 9 | print(len(stages)) 10 | display=[] 11 | guesses=[] 12 | for i in range(len(chosen_word)): 13 | display.append("_") 14 | while "_" in display and lives >0: 15 | guess=input("Guess a letter:").lower() 16 | if len(guess)==1 and guess.isalpha(): 17 | if guess in guessed: 18 | print("letter already printed") 19 | continue 20 | guessed.append(guess) 21 | for i in range(len(chosen_word)): 22 | letter = chosen_word[i] 23 | if letter==guess: 24 | display[i]=letter 25 | if guess not in chosen_word: 26 | if lives>0: 27 | lives = lives-1 28 | if lives==0: 29 | print(stages[lives]) 30 | print(f'the solution is {chosen_word}.') 31 | print("You loose") 32 | exit(1) 33 | print(f"{' '.join(display)}") 34 | print(lives) 35 | print(stages[lives]) 36 | else: 37 | print("guess should be a character rather than a word") 38 | else: 39 | print("you have won") 40 | -------------------------------------------------------------------------------- /waterjug.py: -------------------------------------------------------------------------------- 1 | import math 2 | a = int(input("Enter Jug A capacity: ")) 3 | b = int(input("Enter jug B capacity: ")) 4 | ai = int(input("Initially water in jug A: ")) 5 | bi = int(input("Initially water in Jug B: ")) 6 | af = int(input("Final state of Jug A: ")) 7 | bf = int(input("Final state of Jug B: ")) 8 | if a<=0 or b<=0: 9 | print("Jug capacities must be positive") 10 | exit(1) 11 | if ai < 0 or bi < 0 or af < 0 or bf < 0: 12 | print("Negative values are not allowed") 13 | exit(1) 14 | def wjug(a,b,ai,bi,af,bf): 15 | print("List of operations you can do:\n") 16 | print("1.Fill Jug A completely") 17 | print("2.Fill Jug B completely") 18 | print("3.Empty Jug A completely") 19 | print("4.Empty Jug B completely") 20 | print("5.Pour from Jug A till Jug B is full or A becomes empty") 21 | print("6.Pour from Jug B till Jug A is full or B becomes empty") 22 | print("7.Pour all from Jug B to Jug A") 23 | print("8.Pour all from Jug A to Jug B") 24 | 25 | while ai!=af or bi!=bf: 26 | op=int(input("Enter type operatiuon(1-8):")) 27 | if op==1: 28 | ai=a 29 | elif op==2: 30 | bi=b 31 | elif op==3: 32 | ai=0 33 | elif op==4: 34 | bi=o 35 | elif op==5: 36 | pour_amount= min(ai,b-bi) 37 | ai-=pour_amount 38 | bi+=pour_amount 39 | elif op==6: 40 | pour_amount= min(bi,a-ai) 41 | bi-=pour_amount 42 | ai+=pour_amount 43 | elif op==7: 44 | pour_amount=min(bi,a-ai) 45 | ai+=pour_amount 46 | bi-=pour_amount 47 | elif op==8: 48 | pour_amount= min(ai,b-bi) 49 | bi+=pour_amount 50 | ai-=pour_amount 51 | else: 52 | print("Invalid opertaion please choose a number between 1 and 8") 53 | continue 54 | print(f"Jug A:{ai}, Jug B{bi}") 55 | if ai==af and bi==bf: 56 | print("Final state reached: Jug A =", ai, ", Jug B =",bi) 57 | return 58 | print("Final state reached: Jug A =", ai, ",Jug B =", bi) 59 | 60 | gcd= math.gcd(a,b) 61 | if(af<=a and bf<=b) and (af%gcd==bf%gcd==0): 62 | wjug(a,b,ai,bi,af,bf) 63 | else: 64 | print("The final state is not achievable with given capabilities ") 65 | exit(1) 66 | 67 | -------------------------------------------------------------------------------- /waterjugbfs.py: -------------------------------------------------------------------------------- 1 | import math 2 | from collections import deque 3 | 4 | ''' Input capacities and initial/final states for jugs''' 5 | a = int(input("Enter Jug A Capacity: ")) 6 | b = int(input("Enter Jug B Capacity: ")) 7 | ai = int(input("Initially Water in Jug A: ")) 8 | bi = int(input("Initially Water in Jug B: ")) 9 | af = int(input("Final State of Jug A: ")) 10 | bf = int(input("Final State of Jug B: ")) 11 | 12 | # Check for negative values and whether initial state is equal to final state 13 | if a <= 0 or b <= 0: 14 | print("Jug capacities must be positive.") 15 | exit(1) 16 | if ai < 0 or bi < 0 or af < 0 or bf < 0: 17 | print("Negative values are not allowed.") 18 | exit(1) 19 | if ai==af and bi==bf: 20 | print(f"initial state is already the final state: juga{ai} and jugb={bi}") 21 | exit() 22 | # Define the water jug solver function using BFS 23 | def bfs_wjug(a, b, ai, bi, af, bf): 24 | visited = set() 25 | queue = deque([(ai, bi, [])]) # (Jug A state, Jug B state, List of operations) 26 | 27 | while queue: 28 | curr_ai, curr_bi, operations = queue.popleft() 29 | 30 | if (curr_ai, curr_bi) in visited: 31 | continue 32 | visited.add((curr_ai, curr_bi)) 33 | 34 | # Check if the final state is reached 35 | if curr_ai == af and curr_bi == bf: 36 | for i, op in enumerate(operations): 37 | print(f"Step {i + 1}: {op}") 38 | print(f"Final State Reached: Jug A = {curr_ai}, Jug B = {curr_bi}") 39 | return 40 | 41 | # List of possible operations 42 | possible_operations = [ 43 | (a, curr_bi, "Fill Jug A"), # Fill Jug A 44 | (curr_ai, b, "Fill Jug B"), # Fill Jug B 45 | (0, curr_bi, "Empty Jug A"), # Empty Jug A 46 | (curr_ai, 0, "Empty Jug B"), # Empty Jug B 47 | (curr_ai - min(curr_ai, b - curr_bi), curr_bi + min(curr_ai, b - curr_bi), "Pour from A to B"), # Pour A to B 48 | (curr_ai + min(curr_bi, a - curr_ai), curr_bi - min(curr_bi, a - curr_ai), "Pour from B to A"), # Pour B to A 49 | ] 50 | 51 | # Add each possible operation to the queue 52 | for next_ai, next_bi, op in possible_operations: 53 | if (next_ai, next_bi) not in visited: 54 | queue.append((next_ai, next_bi, operations + [op])) 55 | 56 | print("No solution found.") 57 | return 58 | 59 | # Check if the final state can be achievable using GCD 60 | gcd = math.gcd(a, b) 61 | 62 | if (af <= a and bf <= b) and (af % gcd == bf % gcd == 0): 63 | bfs_wjug(a, b, ai, bi, af, bf) 64 | else: 65 | print("The final state is not achievable with the given capacities.") 66 | exit() 67 | -------------------------------------------------------------------------------- /MLPClassifier.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | import numpy as np 8 | import pandas as pd 9 | data = pd.read_csv('HR_comma_sep.csv') 10 | data.head() 11 | 12 | 13 | # In[2]: 14 | 15 | 16 | data.info() 17 | 18 | 19 | # In[3]: 20 | 21 | 22 | data['Departments'].value_counts() 23 | 24 | 25 | # In[4]: 26 | 27 | 28 | data['Departments'].unique() 29 | 30 | 31 | # In[5]: 32 | 33 | 34 | data['salary'].unique() 35 | 36 | 37 | # In[6]: 38 | 39 | 40 | from sklearn import preprocessing 41 | le = preprocessing.LabelEncoder() 42 | print(le) 43 | data['salary']=le.fit_transform(data['salary']) 44 | data['Departments']=le.fit_transform(data['Departments']) 45 | 46 | 47 | # In[7]: 48 | 49 | 50 | data['salary'].unique() 51 | 52 | 53 | # In[8]: 54 | 55 | 56 | X=data.iloc[:,:-1] 57 | X 58 | 59 | 60 | # In[9]: 61 | 62 | 63 | X=data[['satisfaction_level','last_evaluation','number_project','average_montly_hours','time_spend_company','Work_accident','promotion_last_5years','Departments','salary']] 64 | y=data['left'] 65 | 66 | 67 | from sklearn.model_selection import train_test_split 68 | X_train, X_test, y_train, y_test=train_test_split(X,y,test_size=0.3, random_state=42) 69 | 70 | 71 | # In[10]: 72 | 73 | 74 | X_train 75 | 76 | 77 | # In[11]: 78 | 79 | 80 | y_train 81 | 82 | 83 | # In[16]: 84 | 85 | 86 | from sklearn.neural_network import MLPClassifier 87 | clf = MLPClassifier( 88 | hidden_layer_sizes=(6,5), 89 | random_state=5, 90 | verbose=True, 91 | learning_rate_init=0.01, 92 | ) 93 | clf.fit(X_train,y_train) 94 | 95 | 96 | # In[17]: 97 | 98 | 99 | ypred=clf.predict(X_test) 100 | from sklearn.metrics import accuracy_score 101 | accuracy_score(y_test,ypred) 102 | 103 | 104 | # In[18]: 105 | 106 | 107 | X_test.shape 108 | 109 | 110 | # In[19]: 111 | 112 | 113 | n=pd.DataFrame({ 114 | 'satisfaction_level':[0.78], 115 | 'last_evaluation':[0.53], 116 | 'number_project':[2], 117 | 'average_montly_hours':[157], 118 | 'time_spend_company':[3], 119 | 'Work_accident':[0], 120 | 'promotion_last_5years':[0], 121 | 'Departments':[1], 122 | 'salary':[1] 123 | 124 | 125 | }) 126 | 127 | 128 | # In[20]: 129 | 130 | 131 | new_data=clf.predict(n) 132 | print(new_data) 133 | 134 | 135 | # In[22]: 136 | 137 | 138 | from sklearn.metrics import classification_report 139 | print(classification_report(y_test, ypred)) 140 | 141 | 142 | # In[23]: 143 | 144 | 145 | from sklearn.metrics import confusion_matrix 146 | ypred = clf.predict(X_test) 147 | print(confusion_matrix(y_test, ypred)) 148 | 149 | 150 | # In[24]: 151 | 152 | 153 | print(y_train.value_counts()) 154 | print(y_test.value_counts()) 155 | 156 | 157 | # In[ ]: 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /hangman_words.py: -------------------------------------------------------------------------------- 1 | word_list = [ 2 | 'abruptly', 3 | 'absurd', 4 | 'abyss', 5 | 'affix', 6 | 'askew', 7 | 'avenue', 8 | 'awkward', 9 | 'axiom', 10 | 'azure', 11 | 'bagpipes', 12 | 'bandwagon', 13 | 'banjo', 14 | 'bayou', 15 | 'beekeeper', 16 | 'blitz', 17 | 'blizzard', 18 | 'boggle', 19 | 'bookworm', 20 | 'boxcar', 21 | 'boxful', 22 | 'buckaroo', 23 | 'buffalo', 24 | 'buffoon', 25 | 'buxom', 26 | 'buzzard', 27 | 'buzzing', 28 | 'buzzwords', 29 | 'caliph', 30 | 'cobweb', 31 | 'cockiness', 32 | 'croquet', 33 | 'crypt', 34 | 'curacao', 35 | 'cycle', 36 | 'daiquiri', 37 | 'dirndl', 38 | 'disavow', 39 | 'dizzying', 40 | 'duplex', 41 | 'dwarves', 42 | 'embezzle', 43 | 'equip', 44 | 'espionage', 45 | 'euouae', 46 | 'exodus', 47 | 'faking', 48 | 'fishhook', 49 | 'fixable', 50 | 'fjord', 51 | 'flapjack', 52 | 'flopping', 53 | 'fluffiness', 54 | 'flyby', 55 | 'foxglove', 56 | 'frazzled', 57 | 'frizzled', 58 | 'fuchsia', 59 | 'funny', 60 | 'gabby', 61 | 'galaxy', 62 | 'galvanize', 63 | 'gazebo', 64 | 'giaour', 65 | 'gizmo', 66 | 'glowworm', 67 | 'glyph', 68 | 'gnarly', 69 | 'gnostic', 70 | 'gossip', 71 | 'grogginess', 72 | 'haiku', 73 | 'haphazard', 74 | 'hyphen', 75 | 'iatrogenic', 76 | 'icebox', 77 | 'injury', 78 | 'ivory', 79 | 'ivy', 80 | 'jackpot', 81 | 'jaundice', 82 | 'jawbreaker', 83 | 'jaywalk', 84 | 'jazziest', 85 | 'jazzy', 86 | 'jelly', 87 | 'jigsaw', 88 | 'jinx', 89 | 'jiujitsu', 90 | 'jockey', 91 | 'jogging', 92 | 'joking', 93 | 'jovial', 94 | 'joyful', 95 | 'juicy', 96 | 'jukebox', 97 | 'jumbo', 98 | 'kayak', 99 | 'kazoo', 100 | 'keyhole', 101 | 'khaki', 102 | 'kilobyte', 103 | 'kiosk', 104 | 'kitsch', 105 | 'kiwifruit', 106 | 'klutz', 107 | 'knapsack', 108 | 'larynx', 109 | 'lengths', 110 | 'lucky', 111 | 'luxury', 112 | 'lymph', 113 | 'marquis', 114 | 'matrix', 115 | 'megahertz', 116 | 'microwave', 117 | 'mnemonic', 118 | 'mystify', 119 | 'naphtha', 120 | 'nightclub', 121 | 'nowadays', 122 | 'numbskull', 123 | 'nymph', 124 | 'onyx', 125 | 'ovary', 126 | 'oxidize', 127 | 'oxygen', 128 | 'pajama', 129 | 'peekaboo', 130 | 'phlegm', 131 | 'pixel', 132 | 'pizazz', 133 | 'pneumonia', 134 | 'polka', 135 | 'pshaw', 136 | 'psyche', 137 | 'puppy', 138 | 'puzzling', 139 | 'quartz', 140 | 'queue', 141 | 'quips', 142 | 'quixotic', 143 | 'quiz', 144 | 'quizzes', 145 | 'quorum', 146 | 'razzmatazz', 147 | 'rhubarb', 148 | 'rhythm', 149 | 'rickshaw', 150 | 'schnapps', 151 | 'scratch', 152 | 'shiv', 153 | 'snazzy', 154 | 'sphinx', 155 | 'spritz', 156 | 'squawk', 157 | 'staff', 158 | 'strength', 159 | 'strengths', 160 | 'stretch', 161 | 'stronghold', 162 | 'stymied', 163 | 'subway', 164 | 'swivel', 165 | 'syndrome', 166 | 'thriftless', 167 | 'thumbscrew', 168 | 'topaz', 169 | 'transcript', 170 | 'transgress', 171 | 'transplant', 172 | 'triphthong', 173 | 'twelfth', 174 | 'twelfths', 175 | 'unknown', 176 | 'unworthy', 177 | 'unzip', 178 | 'uptown', 179 | 'vaporize', 180 | 'vixen', 181 | 'vodka', 182 | 'voodoo', 183 | 'vortex', 184 | 'voyeurism', 185 | 'walkway', 186 | 'waltz', 187 | 'wave', 188 | 'wavy', 189 | 'waxy', 190 | 'wellspring', 191 | 'wheezy', 192 | 'whiskey', 193 | 'whizzing', 194 | 'whomever', 195 | 'wimpy', 196 | 'witchcraft', 197 | 'wizard', 198 | 'woozy', 199 | 'wristwatch', 200 | 'wyvern', 201 | 'xylophone', 202 | 'yachtsman', 203 | 'yippee', 204 | 'yoked', 205 | 'youthful', 206 | 'yummy', 207 | 'zephyr', 208 | 'zigzag', 209 | 'zigzagging', 210 | 'zilch', 211 | 'zipper', 212 | 'zodiac', 213 | 'zombie', 214 | ] 215 | -------------------------------------------------------------------------------- /MLPClassifier.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "6bbb6e0d", 7 | "metadata": {}, 8 | "outputs": [ 9 | { 10 | "data": { 11 | "text/html": [ 12 | "
| \n", 30 | " | satisfaction_level | \n", 31 | "last_evaluation | \n", 32 | "number_project | \n", 33 | "average_montly_hours | \n", 34 | "time_spend_company | \n", 35 | "Work_accident | \n", 36 | "left | \n", 37 | "promotion_last_5years | \n", 38 | "Departments | \n", 39 | "salary | \n", 40 | "
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", 45 | "0.38 | \n", 46 | "0.53 | \n", 47 | "2 | \n", 48 | "157 | \n", 49 | "3 | \n", 50 | "0 | \n", 51 | "1 | \n", 52 | "0 | \n", 53 | "sales | \n", 54 | "low | \n", 55 | "
| 1 | \n", 58 | "0.80 | \n", 59 | "0.86 | \n", 60 | "5 | \n", 61 | "262 | \n", 62 | "6 | \n", 63 | "0 | \n", 64 | "1 | \n", 65 | "0 | \n", 66 | "sales | \n", 67 | "medium | \n", 68 | "
| 2 | \n", 71 | "0.11 | \n", 72 | "0.88 | \n", 73 | "7 | \n", 74 | "272 | \n", 75 | "4 | \n", 76 | "0 | \n", 77 | "1 | \n", 78 | "0 | \n", 79 | "sales | \n", 80 | "medium | \n", 81 | "
| 3 | \n", 84 | "0.72 | \n", 85 | "0.87 | \n", 86 | "5 | \n", 87 | "223 | \n", 88 | "5 | \n", 89 | "0 | \n", 90 | "1 | \n", 91 | "0 | \n", 92 | "sales | \n", 93 | "low | \n", 94 | "
| 4 | \n", 97 | "0.37 | \n", 98 | "0.52 | \n", 99 | "2 | \n", 100 | "159 | \n", 101 | "3 | \n", 102 | "0 | \n", 103 | "1 | \n", 104 | "0 | \n", 105 | "sales | \n", 106 | "low | \n", 107 | "
| \n", 325 | " | satisfaction_level | \n", 326 | "last_evaluation | \n", 327 | "number_project | \n", 328 | "average_montly_hours | \n", 329 | "time_spend_company | \n", 330 | "Work_accident | \n", 331 | "left | \n", 332 | "promotion_last_5years | \n", 333 | "Departments | \n", 334 | "
|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", 339 | "0.38 | \n", 340 | "0.53 | \n", 341 | "2 | \n", 342 | "157 | \n", 343 | "3 | \n", 344 | "0 | \n", 345 | "1 | \n", 346 | "0 | \n", 347 | "7 | \n", 348 | "
| 1 | \n", 351 | "0.80 | \n", 352 | "0.86 | \n", 353 | "5 | \n", 354 | "262 | \n", 355 | "6 | \n", 356 | "0 | \n", 357 | "1 | \n", 358 | "0 | \n", 359 | "7 | \n", 360 | "
| 2 | \n", 363 | "0.11 | \n", 364 | "0.88 | \n", 365 | "7 | \n", 366 | "272 | \n", 367 | "4 | \n", 368 | "0 | \n", 369 | "1 | \n", 370 | "0 | \n", 371 | "7 | \n", 372 | "
| 3 | \n", 375 | "0.72 | \n", 376 | "0.87 | \n", 377 | "5 | \n", 378 | "223 | \n", 379 | "5 | \n", 380 | "0 | \n", 381 | "1 | \n", 382 | "0 | \n", 383 | "7 | \n", 384 | "
| 4 | \n", 387 | "0.37 | \n", 388 | "0.52 | \n", 389 | "2 | \n", 390 | "159 | \n", 391 | "3 | \n", 392 | "0 | \n", 393 | "1 | \n", 394 | "0 | \n", 395 | "7 | \n", 396 | "
| ... | \n", 399 | "... | \n", 400 | "... | \n", 401 | "... | \n", 402 | "... | \n", 403 | "... | \n", 404 | "... | \n", 405 | "... | \n", 406 | "... | \n", 407 | "... | \n", 408 | "
| 14994 | \n", 411 | "0.40 | \n", 412 | "0.57 | \n", 413 | "2 | \n", 414 | "151 | \n", 415 | "3 | \n", 416 | "0 | \n", 417 | "1 | \n", 418 | "0 | \n", 419 | "8 | \n", 420 | "
| 14995 | \n", 423 | "0.37 | \n", 424 | "0.48 | \n", 425 | "2 | \n", 426 | "160 | \n", 427 | "3 | \n", 428 | "0 | \n", 429 | "1 | \n", 430 | "0 | \n", 431 | "8 | \n", 432 | "
| 14996 | \n", 435 | "0.37 | \n", 436 | "0.53 | \n", 437 | "2 | \n", 438 | "143 | \n", 439 | "3 | \n", 440 | "0 | \n", 441 | "1 | \n", 442 | "0 | \n", 443 | "8 | \n", 444 | "
| 14997 | \n", 447 | "0.11 | \n", 448 | "0.96 | \n", 449 | "6 | \n", 450 | "280 | \n", 451 | "4 | \n", 452 | "0 | \n", 453 | "1 | \n", 454 | "0 | \n", 455 | "8 | \n", 456 | "
| 14998 | \n", 459 | "0.37 | \n", 460 | "0.52 | \n", 461 | "2 | \n", 462 | "158 | \n", 463 | "3 | \n", 464 | "0 | \n", 465 | "1 | \n", 466 | "0 | \n", 467 | "8 | \n", 468 | "
14999 rows × 9 columns
\n", 472 | "| \n", 569 | " | satisfaction_level | \n", 570 | "last_evaluation | \n", 571 | "number_project | \n", 572 | "average_montly_hours | \n", 573 | "time_spend_company | \n", 574 | "Work_accident | \n", 575 | "promotion_last_5years | \n", 576 | "Departments | \n", 577 | "salary | \n", 578 | "
|---|---|---|---|---|---|---|---|---|---|
| 12602 | \n", 583 | "0.10 | \n", 584 | "0.84 | \n", 585 | "7 | \n", 586 | "250 | \n", 587 | "4 | \n", 588 | "0 | \n", 589 | "0 | \n", 590 | "6 | \n", 591 | "1 | \n", 592 | "
| 4889 | \n", 595 | "0.57 | \n", 596 | "0.68 | \n", 597 | "4 | \n", 598 | "154 | \n", 599 | "3 | \n", 600 | "1 | \n", 601 | "0 | \n", 602 | "4 | \n", 603 | "2 | \n", 604 | "
| 1572 | \n", 607 | "0.39 | \n", 608 | "0.48 | \n", 609 | "2 | \n", 610 | "154 | \n", 611 | "3 | \n", 612 | "0 | \n", 613 | "0 | \n", 614 | "9 | \n", 615 | "1 | \n", 616 | "
| 13375 | \n", 619 | "0.91 | \n", 620 | "0.68 | \n", 621 | "4 | \n", 622 | "132 | \n", 623 | "4 | \n", 624 | "0 | \n", 625 | "0 | \n", 626 | "0 | \n", 627 | "2 | \n", 628 | "
| 879 | \n", 631 | "0.82 | \n", 632 | "0.97 | \n", 633 | "5 | \n", 634 | "263 | \n", 635 | "5 | \n", 636 | "0 | \n", 637 | "0 | \n", 638 | "9 | \n", 639 | "2 | \n", 640 | "
| ... | \n", 643 | "... | \n", 644 | "... | \n", 645 | "... | \n", 646 | "... | \n", 647 | "... | \n", 648 | "... | \n", 649 | "... | \n", 650 | "... | \n", 651 | "... | \n", 652 | "
| 5191 | \n", 655 | "0.52 | \n", 656 | "0.96 | \n", 657 | "4 | \n", 658 | "246 | \n", 659 | "3 | \n", 660 | "0 | \n", 661 | "0 | \n", 662 | "8 | \n", 663 | "1 | \n", 664 | "
| 13418 | \n", 667 | "0.49 | \n", 668 | "0.65 | \n", 669 | "4 | \n", 670 | "233 | \n", 671 | "7 | \n", 672 | "0 | \n", 673 | "0 | \n", 674 | "7 | \n", 675 | "2 | \n", 676 | "
| 5390 | \n", 679 | "0.66 | \n", 680 | "0.73 | \n", 681 | "5 | \n", 682 | "249 | \n", 683 | "2 | \n", 684 | "0 | \n", 685 | "0 | \n", 686 | "8 | \n", 687 | "2 | \n", 688 | "
| 860 | \n", 691 | "0.79 | \n", 692 | "1.00 | \n", 693 | "4 | \n", 694 | "218 | \n", 695 | "5 | \n", 696 | "0 | \n", 697 | "0 | \n", 698 | "7 | \n", 699 | "1 | \n", 700 | "
| 7270 | \n", 703 | "0.98 | \n", 704 | "0.86 | \n", 705 | "2 | \n", 706 | "219 | \n", 707 | "4 | \n", 708 | "0 | \n", 709 | "0 | \n", 710 | "7 | \n", 711 | "1 | \n", 712 | "
10499 rows × 9 columns
\n", 716 | "MLPClassifier(hidden_layer_sizes=(6, 5), learning_rate_init=0.01,\n", 955 | " random_state=5, verbose=True)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
MLPClassifier(hidden_layer_sizes=(6, 5), learning_rate_init=0.01,\n", 956 | " random_state=5, verbose=True)