PREDICTING THE NUMBER OF PATIENTS SUFFER WITH LIVER DISEASE IN STATE OF AP.
The data is related with the survey which was taken in the state of AP.It is to determine number of people who are suffering with liver complications in respective to their age and gender
You can download dataset with this link
First, We need to import some modules
Read the liver.csv file in pandas to create data frame.
The output for the above code looks like ,
In the next step we are going to group in taking the age into consideration
Now lets see how many of them are affected with the liver complication
The graph for the above code looks like,
Now let’s get into the core part of this blog by label encoding, and I will be doing label encoding for the columns
The output,
Now lets convert categorical to Dummies,
Dividing Testing and Training Dataset from the dataset,
Then we scale the numeric features,
Logistic Regression,
The Naive Bayes,
The KNN Classifier,
Decision tree,(first train and fit)
The prediction for Train and test ,accuracy for for both of them
Random forest,
Support Vector Machine,
we are creating an SVC object and then we will be fitting the model, training and testing
These are the effective ways to find the maximum no.of people suffering with liver disease in the state of Andhra Pradesh