VishSinh commited on
Commit
67e43ff
Β·
verified Β·
1 Parent(s): 562ccbf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -95
README.md CHANGED
@@ -1,16 +1,39 @@
1
- ## 🩸 **Cycle Sync: Menstrual Cycle Prediction using LSTM**
2
-
3
- ### πŸš€ **Model Overview**
4
- 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.
5
-
6
- ### πŸ”₯ **Model Highlights**
7
- - 🧠 **Architecture:** LSTM (Long Short-Term Memory) with time-series inputs.
8
- - πŸ“Š **Purpose:** Predict the next period start date and duration based on previous cycle data.
9
- - 🎯 **Task Type:** `time-series-forecasting`
10
- - πŸ“š **Framework:** Keras with TensorFlow backend.
11
- - πŸ“ˆ **Scalers:** `MinMaxScaler` used for feature and label scaling.
12
-
13
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  ## πŸ“‘ **Usage**
16
 
@@ -32,86 +55,4 @@ with open("feature_scaler.pkl", "rb") as f:
32
 
33
  with open("label_scaler.pkl", "rb") as f:
34
  label_scaler = pickle.load(f)
35
- ```
36
-
37
- ---
38
-
39
- ## πŸ“Š **Input & Output Schema**
40
-
41
- ### πŸ“₯ **Input Format**
42
- The model expects a 3D input of shape:
43
- ```
44
- (1, 3, 2)
45
- ```
46
- - **3**: Number of previous cycles used for prediction.
47
- - **2**: Features - cycle length and period duration.
48
-
49
- ### πŸ“€ **Output Format**
50
- The model outputs a 1D array:
51
- ```
52
- [cycle_length, period_duration]
53
- ```
54
- - `cycle_length`: Predicted length of the next cycle.
55
- - `period_duration`: Predicted duration of the next period.
56
-
57
- ---
58
-
59
- ## 🎯 **Prediction Example**
60
-
61
- ```python
62
- # Example input: 3 cycles with lengths and durations
63
- last_three_cycles = np.array([[[28, 5], [29, 5], [30, 6]]])
64
-
65
- # Scale the input
66
- input_flat = last_three_cycles.reshape(-1, 2)
67
- input_scaled_flat = feature_scaler.transform(input_flat)
68
- input_scaled = input_scaled_flat.reshape(1, 3, 2)
69
-
70
- # Make prediction
71
- prediction_scaled = model.predict(input_scaled)
72
- prediction = label_scaler.inverse_transform(prediction_scaled)[0]
73
-
74
- # Extract predicted values
75
- next_cycle_length = round(prediction[0])
76
- next_period_duration = round(prediction[1])
77
-
78
- print(f"Predicted Next Cycle Length: {next_cycle_length} days")
79
- print(f"Predicted Period Duration: {next_period_duration} days")
80
- ```
81
-
82
- ---
83
-
84
- ## πŸ“š **Training Details**
85
- - **Data Sources:** Synthetic and real menstrual cycle data.
86
- - **Model Architecture:** 2-layer LSTM with dropout and dense output.
87
- - **Loss Function:** Mean Squared Error (MSE)
88
- - **Optimizer:** Adam
89
-
90
- ---
91
-
92
- ## πŸ“Š **Evaluation Metrics**
93
- - πŸ“ **MAE:** ~1.2
94
- - πŸ“ **MSE:** ~2.5
95
-
96
- ---
97
-
98
- ## πŸ”’ **License**
99
- This model is licensed under the Apache 2.0 License.
100
-
101
- ---
102
-
103
- ## 🀝 **Contributing**
104
- We welcome contributions! Please open an issue or submit a pull request if you’d like to improve the model or documentation.
105
-
106
- ---
107
-
108
- ## ❀️ **Acknowledgements**
109
- Special thanks to the healthcare community and menstrual health advocates who contributed to building this predictive model.
110
-
111
- ---
112
-
113
- πŸŽ‰ **Ready to predict and empower users with data-driven cycle predictions!** πŸ’‘
114
-
115
- ---
116
-
117
- Let me know if you need help uploading or tweaking this! πŸš€πŸ˜Š
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - keras
6
+ - tensorflow
7
+ - time-series
8
+ - menstrual-cycle-prediction
9
+ - healthcare
10
+ pipeline_tag: time-series-forecasting
11
+ model-index:
12
+ - name: lstm_combined_model
13
+ results:
14
+ - task:
15
+ type: time-series-forecasting
16
+ name: Menstrual Cycle Prediction
17
+ metrics:
18
+ - type: mae
19
+ value: 1.2
20
+ name: Mean Absolute Error (MAE)
21
+ - type: mse
22
+ value: 2.5
23
+ name: Mean Squared Error (MSE)
24
+ ---
25
+
26
+ # 🩸 **Cycle Sync: Menstrual Cycle Prediction using LSTM**
27
+
28
+ ## πŸš€ **Model Overview**
29
+ 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.
30
+
31
+ ## πŸ”₯ **Model Highlights**
32
+ - 🧠 **Architecture:** LSTM (Long Short-Term Memory) with time-series inputs.
33
+ - πŸ“Š **Purpose:** Predict the next period start date and duration based on previous cycle data.
34
+ - 🎯 **Task Type:** `time-series-forecasting`
35
+ - πŸ“š **Framework:** Keras with TensorFlow backend.
36
+ - πŸ“ˆ **Scalers:** `MinMaxScaler` used for feature and label scaling.
37
 
38
  ## πŸ“‘ **Usage**
39
 
 
55
 
56
  with open("label_scaler.pkl", "rb") as f:
57
  label_scaler = pickle.load(f)
58
+ ```