text_plain_output_1.png
from sklearn.ensemble import RandomForestClassifier

from sklearn.svm import LinearSVC

import numpy as np

svc_model = LinearSVC(max_iter=10000)
svc_model.fit(X_train, y_train)

svc_score = svc_model.score(X_test, y_test)
if svc_score < 0.6:
    print(f'SVC Model Score is Less : {svc_score}'.format())
else:
    random_clf = RandomForestClassifier(n_estimators=100)
    random_clf.fit(X_train, y_train)
    patient_sample = np.array([[0, 137, 40, 35, 168, 43.1, 2.244, 30]])
    prediction = random_clf.predict(patient_sample)
    if prediction == 0:
        print('You are not expected to be diabetic')
    elif prediction == 1:
        print('You are expected to be diabetic')