Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -736,44 +736,42 @@ elif app_mode == "Model Training":
|
|
736 |
model_name = st.selectbox("Select Model", model_options, help="Choose a model.")
|
737 |
|
738 |
if model_name == "Gradient Boosting":
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
else:
|
776 |
-
hyperparams = {}
|
777 |
|
778 |
# Train-Test Split
|
779 |
st.subheader("✂️ Train-Test Split")
|
|
|
736 |
model_name = st.selectbox("Select Model", model_options, help="Choose a model.")
|
737 |
|
738 |
if model_name == "Gradient Boosting":
|
739 |
+
learning_rate = st.slider("Learning Rate", 0.01, 1.0, 0.1)
|
740 |
+
n_estimators = st.slider("Number of Estimators", 10, 200, 100)
|
741 |
+
max_depth = st.slider("Max Depth", 3, 20, 10)
|
742 |
+
hyperparams = {
|
743 |
+
'learning_rate': learning_rate,
|
744 |
+
'n_estimators': n_estimators,
|
745 |
+
'max_depth': max_depth
|
746 |
+
}
|
747 |
+
elif model_name == "Neural Network":
|
748 |
+
hidden_layers = st.slider("Number of Hidden Layers", 1, 5, 2)
|
749 |
+
neurons_per_layer = st.slider("Neurons per Layer", 10, 200, 50)
|
750 |
+
activation = st.selectbox("Activation Function", ["relu", "tanh", "sigmoid", "selu", "swish"])
|
751 |
+
dropout_rate = st.slider("Dropout Rate", 0.0, 0.5, 0.2)
|
752 |
+
initializer = st.selectbox("Weight Initializer", ["glorot_uniform", "he_normal", "lecun_uniform"])
|
753 |
+
learning_rate = st.slider("Learning Rate", 0.0001, 0.1, 0.001, format="%.4f")
|
754 |
+
optimizer_choice = st.selectbox("Optimizer", ["Adam", "Nadam", "RMSprop", "SGD"])
|
755 |
+
batch_norm = st.checkbox("Batch Normalization", value=True)
|
756 |
+
regularization = st.checkbox("L2 Regularization")
|
757 |
+
epochs = st.slider("Epochs", 10, 200, 50)
|
758 |
+
batch_size = st.slider("Batch Size", 16, 128, 32)
|
759 |
+
hyperparams = {
|
760 |
+
'hidden_layers': hidden_layers,
|
761 |
+
'neurons_per_layer': neurons_per_layer,
|
762 |
+
'activation': activation,
|
763 |
+
'dropout_rate': dropout_rate,
|
764 |
+
'initializer': initializer,
|
765 |
+
'learning_rate': learning_rate,
|
766 |
+
'optimizer_choice': optimizer_choice,
|
767 |
+
'batch_norm': batch_norm,
|
768 |
+
'regularization': regularization,
|
769 |
+
'epochs': epochs,
|
770 |
+
'batch_size': batch_size
|
771 |
+
}
|
772 |
+
|
773 |
+
else:
|
774 |
+
hyperparams = {}
|
|
|
|
|
775 |
|
776 |
# Train-Test Split
|
777 |
st.subheader("✂️ Train-Test Split")
|