Read Aloud the Text Content
This audio was created by Woord's Text to Speech service by content creators from all around the world.
Text Content or SSML code:
<speak> We stored all columns except the chance of admit in x variable.<break strength="strong"/> The Chance of admit is the output column.<break strength="strong"/> We are dropping this column <break strength="weak"/>and taking the remaining variables as the input. <break strength="x-strong"/> There are seven columns in x. <break strength="strong"/>So x has seven variables.<break strength="strong"/> Hence x has seven columns,<break strength="strong"/> and Y is the only output variable<break strength="weak"/> that is only one column.<break strength="strong"/> Y has only one column.<break strength="strong"/> If you see the shape of x, <break strength="weak"/>you can see the number of rows is 497.<break strength="strong"/> x contains seven input variables belongs to 497 students.<break strength="strong"/> It has seven input variables, <break strength="weak"/>and the output is only a single variable.<break strength="strong"/> The variable x is called the independent variable,<break strength="weak"/> and the output variable y is called the dependent variable.<break strength="strong"/> That means the dependent variable is dependent on the independent variables.<break strength="x-strong"/> For building the model, t<break strength="weak"/>here are two steps. <break strength="x-strong"/> The first step is the training model, <break strength="weak"/>and the second step is the testing model. <break strength="x-strong"/> We have to separate data for model training <break strength="weak"/>and testing.<break strength="x-strong"/> So the data will be divided into the training set <break strength="weak"/>and testing set.<break strength="x-strong"/> The algorithm gives more accuracy on the training set <break strength="weak"/>since we use the training data set in model training. <break strength="strong"/>To get better results, <break strength="weak"/>we have to check the model performance on the testing data set.<break strength="strong"/> Using the training data,<break strength="weak"/> you will train the model. <break strength="strong"/>You will test the model on the testing data set. <break strength="strong"/>So the data of students has to be separated into training data<break strength="weak"/> and the testing. <break strength="x-strong"/> The model_selection class of the sci-kit-learn module has train_test_split method. <break strength="strong"/>We use the train_test_split method for separating data.<break strength="x-strong"/> You need to import train_test_split method. <break strength="strong"/>You need to use this method on x and y. <break strength="x-strong"/> Here x is the first variable, <break strength="weak"/>and y is the second variable. <break strength="x-strong"/> </speak>