Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Dementia Prediction Model #212

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,714 changes: 2,714 additions & 0 deletions models/BitcoinPricePrediction/BTC-USD.csv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

816 changes: 816 additions & 0 deletions models/BitcoinPricePrediction/Bitcoin Price Prediction LSTM.ipynb

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions models/BitcoinPricePrediction/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Bitcoin Price Prediction using LSTM
This repository contains an implementation of a Long Short-Term Memory (LSTM) model for predicting Bitcoin prices using historical data. The model is built using Keras and TensorFlow. It predicts the closing price of Bitcoin by training on past data and evaluating its performance on a test set. The results are evaluated using common regression metrics such as R², RMSE, MAE, and others.

## **Dataset**
The dataset used in this project is historical Bitcoin price data downloaded from a public source. The file BTC-USD.csv contains columns such as Date, Open, High, Low, Close, Adj Close, and Volume. The prediction is based solely on the Close price of Bitcoin.

**Dataset Preprocessing:**
* Missing values are handled.
* The Date column is converted into datetime format and set as the index.
* The closing prices are normalized using MinMaxScaler for better model performance.

## Model Architecture
The implemented model is a multi-layer LSTM neural network that includes dropout layers to reduce overfitting. Here's an overview of the model:

**Input Layer:** Time series data reshaped to 3D for LSTM layers.
**LSTM Layers:** Two LSTM layers with 200 and 160 units, respectively, with return_sequences enabled in the first layer.
**Dropout:** Added after each LSTM layer to prevent overfitting.
**Dense Layers:** Two Dense layers; the final layer has 1 neuron for regression output (predicted closing price).

## Model Hyperparameters
**Batch Size:** 32
**Epochs:** 50
**Loss Function:** Mean Squared Error (MSE)
**Optimizer:** Adam
**Metrics:** Mean Absolute Percentage Error (MAPE)

## Evaluation Metrics
The model is evaluated using several regression metrics, including:

* **R² Score:** Measures the proportion of variance in the dependent variable that is predictable.
* **RMSE:** Root Mean Squared Error, used to measure the differences between predicted and observed values.
* **MSE:** Mean Squared Error, similar to RMSE but without square rooting.
* **MAE:** Mean Absolute Error, the average of the absolute errors between actual and predicted values.
* **MATE:** Median Absolute Error, a robust measure of error.
* **SMATE:** Scaled Mean Absolute Error, normalized version of MAE.

A detailed comparison of the training and testing set metrics is included in the project.

44 changes: 44 additions & 0 deletions models/Dementia Prediction Model/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Dementia Prediction Model

This repository contains a machine learning model that predicts dementia in patients based on medical and demographic data. The model utilizes various supervised learning techniques to analyze historical patient data and provides a probability score indicating the likelihood of dementia diagnosis.

## Table of Contents
- [Introduction](#introduction)
- [Problem Statement](#problem-statement)
- [Solution Overview](#solution-overview)
- [Data](#data)


## Introduction

Dementia is a chronic condition that affects cognitive function, leading to memory loss and impaired reasoning. Early prediction of dementia can facilitate timely intervention and improve patient care. This project uses machine learning models to predict dementia based on patient data, such as age, cognitive test results, and medical history.

## Problem Statement

Dementia is challenging to predict due to its complex and progressive nature. Several factors contribute to the risk of dementia, including:
- **Demographic Information**: Age, gender, education level.
- **Medical History**: Family history of dementia, comorbid conditions.
- **Cognitive Test Scores**: Results from standardized assessments.

The primary challenge is to develop a model that accurately predicts dementia by identifying patterns in patient data.

## Solution Overview

The model is trained using various machine learning algorithms to determine the most effective approach for dementia prediction. Algorithms include:
- **Logistic Regression**
- **Decision Trees**
- **Random Forests**
- **Support Vector Machines (SVM)**

The model uses supervised learning and is trained on a dataset of patient records containing features such as age, cognitive test scores, and medical history.

## Data

The dataset includes:
- **Patient Demographics**: Age, gender, education level.
- **Cognitive Scores**: Scores from memory and cognitive assessments.
- **Medical History**: Previous diagnoses, family history, and comorbid conditions.

Data should be placed in the `data/` folder in CSV format for model training and evaluation.


Loading
Loading