Downloads · 30 days
13
17% of all-time downloads
SamProkop777/hospital-lstm-forecast
hospital-lstm-forecast is a time series forecasting model from SamProkop777. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
A model for predicting demand for medical services/products based on historical data.
Downloads · 30 days
13
17% of all-time downloads
All-time downloads
76
Public
Repo size
492 KB
Likes
0
Public
Click a slice to open those files.
.keras389 KB · 79%
From the Hugging Face model README
A model for predicting demand for medical services/products based on historical data.
That LSTM-model (Long Short-Term Memory), trained on a dataset Monash Time Series (Hospital). The dataset contains 767 monthly time series for the period 2000-2006yy.
Task: Predict the value of the next Установка зависимостейmonth based on the previous 12 months.
This version usr a Global Normalization.
pip install tensorflow keras huggingface_hub
### 2. Download and forecast
from tensorflow.keras.models import load_model
import numpy as np
# to load model
model = load_model("hospital_lstm_model.keras")
# Example of input data (12 normalized values [0..1])
# IMPORTANT: To get the result, you need to apply the same normalization as during training
input_data = np.random.rand(1, 12, 1).astype(np.float32)
prediction = model.predict(input_data)
print(f"Forecast (normalized): {prediction[0][0]:.4f}")
The forecast_visualization.png file shows an example of the model's operation
(Red line is the forecast, Green line is the reality)
### Author
Created for educational purposes.