Classification Algorithm

Clasification is one of the Machine Learning Task that identitfies the class to which an Instance Belongs.

Here, the observed health and medical records of horses. By applying Classifier Algorithm the data was studied and compared with different two algorithms. Predict the survival of horse based on the data and accuracy was observed and found Randomforset algorithm is more accurate than Decision Tree algorithm.

Import Libraries

Import Data

In this .csv, they have a Outcome column showing the target of study.

Let us Drop the 'outcome' from the excel.

Categorize the variables into the list.

Seggregate animals and target seperately. Now, lets split the data

Check the data status and shape

Data has been completely preprocessed and let us apply classifier alorithms. At first Decision Tree Classifier algorithm.

Over the training data & testing data Predict

Lets Check accuracy of Algorithm

Lets Perform another algorithm..

From the above Random Forest Classifer is more accurate than Desicion Tree Classifier for the above model.