Update my_pages/multiverse.py
Browse files- my_pages/multiverse.py +15 -23
my_pages/multiverse.py
CHANGED
|
@@ -4,30 +4,22 @@ import plotly.graph_objects as go
|
|
| 4 |
from utils import go_to
|
| 5 |
|
| 6 |
choices_list = [
|
| 7 |
-
{"label": "Data
|
| 8 |
-
"
|
| 9 |
-
"
|
| 10 |
-
"Will you balance classes?"
|
| 11 |
]},
|
| 12 |
-
{"label": "
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
]},
|
| 17 |
-
{"label": "
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
]},
|
| 22 |
-
{"label": "
|
| 23 |
-
"
|
| 24 |
-
"How will you split train/validation?",
|
| 25 |
-
"Will you use early stopping?"
|
| 26 |
-
]},
|
| 27 |
-
{"label": "Evaluation", "icon": "📊", "questions": [
|
| 28 |
-
"What metrics will you use?",
|
| 29 |
-
"Will you test on unseen data?",
|
| 30 |
-
"Will you consider fairness metrics?"
|
| 31 |
]}
|
| 32 |
]
|
| 33 |
|
|
@@ -47,7 +39,7 @@ def build_tree_and_trace_path(selected_path):
|
|
| 47 |
|
| 48 |
# Build nodes and edges stage by stage
|
| 49 |
for stage_idx, stage in enumerate(choices_list, start=1):
|
| 50 |
-
options = stage["
|
| 51 |
next_nodes = []
|
| 52 |
|
| 53 |
# For layout niceness: compute a span for children under each parent
|
|
@@ -112,7 +104,7 @@ def render():
|
|
| 112 |
for stage in choices_list:
|
| 113 |
# use a stable key per stage to avoid conflicts
|
| 114 |
key = f"multiverse_choice_{stage['label']}"
|
| 115 |
-
choice = st.selectbox(f"{stage['
|
| 116 |
selected_path.append(choice)
|
| 117 |
|
| 118 |
# --- Build tree and compute which edges/nodes to highlight ---
|
|
|
|
| 4 |
from utils import go_to
|
| 5 |
|
| 6 |
choices_list = [
|
| 7 |
+
{"label": "Data Scaling", "options": [
|
| 8 |
+
"MinMax Scaler",
|
| 9 |
+
"Standard Scaler"
|
|
|
|
| 10 |
]},
|
| 11 |
+
{"label": "Model Architecture", "options": [
|
| 12 |
+
"Logistic Regression",
|
| 13 |
+
"Random Forest",
|
| 14 |
+
"Neural Network (Small)"
|
| 15 |
]},
|
| 16 |
+
{"label": "Training Iterations", "options": [
|
| 17 |
+
"200",
|
| 18 |
+
"500",
|
| 19 |
+
"1000"
|
| 20 |
]},
|
| 21 |
+
{"label": "Random Seed", "options": [
|
| 22 |
+
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
]}
|
| 24 |
]
|
| 25 |
|
|
|
|
| 39 |
|
| 40 |
# Build nodes and edges stage by stage
|
| 41 |
for stage_idx, stage in enumerate(choices_list, start=1):
|
| 42 |
+
options = stage["options"]
|
| 43 |
next_nodes = []
|
| 44 |
|
| 45 |
# For layout niceness: compute a span for children under each parent
|
|
|
|
| 104 |
for stage in choices_list:
|
| 105 |
# use a stable key per stage to avoid conflicts
|
| 106 |
key = f"multiverse_choice_{stage['label']}"
|
| 107 |
+
choice = st.selectbox(f"{stage['label']}", stage["options"], key=key)
|
| 108 |
selected_path.append(choice)
|
| 109 |
|
| 110 |
# --- Build tree and compute which edges/nodes to highlight ---
|