05_AIHC_Exp04

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Vidyavardhini’s College of Engineering & Technology

Name: Durvesh Kajrekar


Class: BE/CSE-DS
Experiment No. 4

AIfor Disease Prognosis


Date of Performance: 23/8/24
Date of Submission: 30/8/24

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

Aim: To perform AI for prognosis of a diseases

Objective: The objective of this experiment is to develop an AI-powered disease prognosis


system that employs advanced machine learning algorithms, specifically convolutional neural
networks (CNNs) for medical imaging and recurrent neural networks (RNNs) for time series
data.

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:

1. Early Detection: Detects diseases or medical conditions at an earlier stage when


treatment is more effective, potentially saving lives and reducing the severity of the
disease's impact.

2. Risk Assessment: Assess an individual's risk of developing a particular disease based


on a range of factors, such as genetics, lifestyle, and medical history.

3. Personalized Medicine: Tailor treatment plans to individual patients based on their


unique characteristics and needs, improving the effectiveness of treatments and
reducing side effects.

4. Predictive Analytics: Use historical patient data to predict disease outcomes and
recommend appropriate interventions or treatments.

5. Resource Allocation: Optimize healthcare resource allocation by identifying patients


at higher risk and allocating resources accordingly. This can be especially important
in resource-constrained healthcare systems.

6. Patient Engagement: Engage patients in their own healthcare by providing them with
personalized health insights and recommendations.

7. Reducing Healthcare Costs: Improve the efficiency of healthcare systems by reducing


unnecessary tests and treatments through more accurate prognosis and diagnosis.

8. Research and Drug Development: Assist researchers in identifying potential drug


candidates or treatment strategies based on AI analysis of disease pathways and
patient data.

9. Public Health Planning: Help public health officials and organizations plan for disease
outbreaks, resource allocation, and prevention strategies.

10. Chronic Disease Management: Aid in the management of chronic diseases by


providing ongoing monitoring and early warnings of potential complications.

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

11. Telemedicine: Enable remote monitoring and diagnosis, particularly in underserved or


remote areas.

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

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

#histogram
df.hist(bins=10,figsize=(10,10))
plt.show()

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

#correlation
sns.heatmap(df.corr())

sns.countplot(y=df['Outcome'],palette='Set1')

#box plot for outlier visualization

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

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)

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

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

HAIMLSBL701 AI&ML in Healthcare Lab


Vidyavardhini’s College of Engineering & Technology

Google Collaboratory Link:


https://colab.research.google.com/drive/1cuVLZXp2-yyZS1mH4dv_qpo9hm5d9h7m?
usp=sharing

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.

HAIMLSBL701 AI&ML in Healthcare Lab

You might also like