Implement machine learning models to predict diabetes using the Diabetes dataset. Evaluate each model's performance using metrics like F1 score, Precision, Recall, and Accuracy.
- Dataset: Utilize the Diabetes dataset containing medical information with the
Outcome
label (0 or 1). - Splitting: Divide the dataset into training and testing sets (
train_test_split
function withtest_size=0.2
).
-
SVM (Support Vector Machine):
- Use
SVC
fromsklearn.svm
withkernel='linear'
for improved accuracy. - Evaluate using F1 score, Precision, Recall, and Accuracy.
- Use
-
KNN (K-Nearest Neighbors):
- Use
KNeighborsClassifier
fromsklearn.neighbors
. - Experiment with different values of
n_neighbors
for optimal results.
- Use
-
Logistic Regression:
- Employ
LogisticRegression
fromsklearn.linear_model
. - Adjust parameters and evaluate model performance.
- Employ
-
Decision Tree:
- Implement
DecisionTreeClassifier
fromsklearn.tree
. - Tune hyperparameters for better training efficiency.
- Implement
- Python Programming
- Machine Learning (SVM, KNN, Logistic Regression, Decision Tree)
- Evaluation Metrics (F1 score, Precision, Recall, Accuracy)