Member-only story
Classification Task with 6 Different Algorithms using Python
Here are 6 classification algorithms to predict mortality with Heart Failure; Random Forest, Logistic Regression, KNN, Decision Tree, SVM, and Naive Bayes to find the best Algorithm.

Introduction
In this blog post, I will use 6 different classification algorithms to predict mortality with heart failure.
To do so, we will use classification algorithms.

Here are the algorithms that I will use;
- Random Forest
- Logistic Regression
- KNN
- Decision Tree
- SVM
- Naive Bayes
And after that, I will compare the results according to the;
- Accuracy
- Precision
- Recall
- F1 score.
That will be longer than my other blog post, yet after reading this article, you will probably have a huge knowledge about Machine Learning Classification Algorithms and Evaluation metrics.
If you want to know more about Machine Learning terms, here is my blog post, Machine Learning A-Z Briefly Explained.
Now let’s start with the data.
Content Table
· Introduction
· Data Exploration
· Data Visualization
· Feature Selection
∘ PCA
∘ Correlation Graph
· Model Building
∘ Train- Test Split
· Model Evaluation Metrics
∘ Random Forest Classifier
∘ Logistic Regression
· KNN
∘ Decision Tree
∘ Support Vector Machine
∘ Naive Bayes
· Prediction Dictionary
∘ Most Accurate Model
∘ Model with Highest Precision
∘ Model with Highest Recall
∘ Model with Highest F1 Score
· Conclusion
Data Exploration
Here is the dataset from the UCI Machine Learning repository, which is an open-source website, you can reach many other datasets, which…