Git Product home page Git Product logo

rimtouny / predictive-analysis-for-patient-appointment-attendance-in-a-medical-center-using-r Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.55 MB

Predicting patient attendance at Bay Clinic using 'medicalcentre.csv'. Employing SVM, Decision Trees, and DNN models for accuracy, sensitivity, specificity evaluation, and ROC analysis. Part of a Data Science course in my master's program at the University of Ottawa 2023.

License: MIT License

Jupyter Notebook 100.00%
activation-function classification data-science deep-neural-network gridsearchcv keras machine-learning model-development model-evaluation normalization outliers downstream-processes r-language r-programming r-programming-language

predictive-analysis-for-patient-appointment-attendance-in-a-medical-center-using-r's Introduction

Predictive Analysis for Patient Appointment Attendance in a Medical Center using R programming language

This project predicts patient attendance for medical appointments at Bay Clinic using 'medicalcentre.csv'. It employs SVM, Decision Trees, and DNN models, assessing accuracy, sensitivity, specificity, and conducting ROC analysis. The goal is to optimize resource utilization and financial stability in the MedicalCentre.csv er. This analysis was conducted as part of a Data Science course in my master's program at the University of Ottawa 2023.

  • Required libraries: scikit-learn, pandas, matplotlib.
  • Execute cells in a Jupyter Notebook environment.
  • The uploaded code has been executed and tested successfully within the Google Colab environment.

Binary-class classification problem

Task is to classify if a patient will show up for an appointment: Yes/ No

Independent Variables:

  • 'PatientId': Identification of the patient.
  • 'AppointmentID': Identification of the appointment.
  • 'Gender': Gender of the patient.
  • 'ScheduledDay': Date when the appointment is scheduled.
  • 'AppointmentDay': Actual date of the appointment.
  • 'Age': Age of the patient.
  • 'Neighbourhood': Location of the medical center.
  • 'Scholarship': Indicates whether the patient is enrolled in a scholarship program.
  • 'Hipertension': Presence of hypertension in the patient.
  • 'Diabetes': Presence of diabetes in the patient.
  • 'Alcoholism': Indicates whether the patient is affected by alcoholism.
  • 'Handcap': Level of handicap of the patient.
  • 'SMS_received': Indicates if the patient received an SMS reminder.

Target variable:

  • 'No show': Predicting patient attendance (Yes/No) for scheduled medical appointments.

Key Tasks Undertaken

  1. Data Preparation:

    • Handled missing values and initialized a function for outlier visualization.
    • Counted and removed observations with negative values in the 'Age' feature.
    • Transformed negative values in 'AwaitingTime' to positive values.
    • Encoded string categorical values into integer codes.
    • Separated date features into date components.
    • Rescaled the 'Age' feature using min_max normalization or z_score standardization.
    • Conducted a variability comparison between features using a correlation matrix and dropped correlated features.
  2. Model Development I:

    • Developed SVM and Decision Tree classifiers for predicting appointment status.
    • Evaluated classifier performance using a 70-30 train-test split.
  3. Model Development II:

    • Trained a Deep Neural Network using Keras, experimenting with configurations for optimal accuracy.
    • Explored the effects of changing activation functions or dropout rates on model performance.
  4. Model Evaluation & Comparison:

    • Implemented a function to detect model accuracy and identify potential overfitting.
    • Tuned the models using GridSearchCV for optimization.
    • Evaluated SVM, Decision Tree, and Deep Neural Network classifiers based on Accuracy, Sensitivity, and Specificity.
    • Conducted a ROC analysis to compare SVM and Decision Tree models and plotted the ROC graph for performance assessment.

predictive-analysis-for-patient-appointment-attendance-in-a-medical-center-using-r's People

Contributors

rimtouny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.