Created
September 19, 2020 13:23
-
-
Save PhilipPurwoko/01efa5c74a6bff2ecef12214dcd25853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
with open('AI_DrugClassifier.pkl','rb') as file: | |
model = pickle.load(file) | |
def self_prediction(): | |
age = input('Age : ') | |
sex = input('Sex : ') | |
bp = input('BP : ') | |
chol = input('Cholesterol : ') | |
NatoK = input('Na_to_K : ') | |
# data harus berbentuk (1,5) yaitu [[age,sex,bp,chol,NatoK]] | |
print('\nPrediction') | |
print('Patient consumed : ',encoder.inverse_transform(model.predict([[age,sex,bp,chol,NatoK]]))[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment