05_AIHC_Exp04
05_AIHC_Exp04
05_AIHC_Exp04
Theory:
The objective of using AI for the prognosis of diseases is to improve the accuracy and
effectiveness of disease prediction, allowing for earlier and more precise diagnoses and
treatment. AI can be a valuable tool in healthcare for a variety of purposes related to disease
prognosis:
4. Predictive Analytics: Use historical patient data to predict disease outcomes and
recommend appropriate interventions or treatments.
6. Patient Engagement: Engage patients in their own healthcare by providing them with
personalized health insights and recommendations.
9. Public Health Planning: Help public health officials and organizations plan for disease
outbreaks, resource allocation, and prevention strategies.
12. Quality of Life Improvement: Enhance the quality of life for patients by enabling
proactive and preventive healthcare rather than just reactive treatment.
In summary, the primary objective of using AI for disease prognosis is to improve healthcare
outcomes, reduce costs, and enhance the overall quality of care by providing more accurate,
personalized, and timely information to healthcare providers, researchers, and patients. AI
has the potential to transform the healthcare industry by making disease prognosis and
management more data-driven and patient-centric.
Code:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix,accuracy_score
%matplotlib inline
#histogram
df.hist(bins=10,figsize=(10,10))
plt.show()
#correlation
sns.heatmap(df.corr())
sns.countplot(y=df['Outcome'],palette='Set1')
sns.set(style="whitegrid")
df.boxplot(figsize=(15,6))
#box plot
sns.set(style="whitegrid")
sns.set(rc={'figure.figsize':(4,2)})
sns.boxplot(x=df['Insulin'])
plt.show()
sns.boxplot(x=df['BloodPressure'])
plt.show()
sns.boxplot(x=df['DiabetesPedigreeFunction'])
plt.show()
#outlier remove
Q1=df.quantile(0.25)
Q3=df.quantile(0.75)
IQR=Q3-Q1
print("---Q1--- \n",Q1)
print("\n---Q3--- \n",Q3)
print("\n---IQR---\n",IQR)
#print((df < (Q1 - 1.5 * IQR))|(df > (Q3 + 1.5 * IQR)))
X=df_out.drop(columns=['Outcome'])
y=df_out['Outcome']
from sklearn.model_selection import train_test_split
train_X,test_X,train_y,test_y=train_test_split(X,y,test_size=0.2)
train_X.shape,test_X.shape,train_y.shape,test_y.shape
Conclusion:
Comment on how useful it is to use AI for prognosis of a disease.
AI may be used to find patterns in enormous volumes of medical data, aiding in disease
prediction and prevention before symptoms appear. Diagnoses may reduce treatment costs by
up to 50% and improve health outcomes by 40% and also reduce human errors.