File size: 1,658 Bytes
417dab8
67e43ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417dab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67e43ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
language: en
license: apache-2.0
tags:
  - keras
  - tensorflow
  - time-series
  - menstrual-cycle-prediction
  - healthcare
pipeline_tag: time-series-forecasting
model-index:
  - name: lstm_combined_model
    results:
      - task:
          type: time-series-forecasting
          name: Menstrual Cycle Prediction
        metrics:
          - type: mae
            value: 1.2
            name: Mean Absolute Error (MAE)
          - type: mse
            value: 2.5
            name: Mean Squared Error (MSE)
---

# 🩸 **Cycle Sync: Menstrual Cycle Prediction using LSTM**

## πŸš€ **Model Overview**
The `cycle-sync` model is built using a Long Short-Term Memory (LSTM) architecture trained to predict menstrual cycle lengths and period durations based on a user’s past period history.

## πŸ”₯ **Model Highlights**
- 🧠 **Architecture:** LSTM (Long Short-Term Memory) with time-series inputs.
- πŸ“Š **Purpose:** Predict the next period start date and duration based on previous cycle data.
- 🎯 **Task Type:** `time-series-forecasting`
- πŸ“š **Framework:** Keras with TensorFlow backend.
- πŸ“ˆ **Scalers:** `MinMaxScaler` used for feature and label scaling.

## πŸ“‘ **Usage**

### 🎨 **Load Model**
To load the model from Hugging Face, use the following code:

```python
import keras
from datetime import timedelta
import numpy as np
import pickle

# Load the model from Hugging Face
model = keras.saving.load_model("hf://VishSinh/cycle-sync")

# Load the scalers (if needed)
with open("feature_scaler.pkl", "rb") as f:
    feature_scaler = pickle.load(f)

with open("label_scaler.pkl", "rb") as f:
    label_scaler = pickle.load(f)
```