fixed num parents mating and keep parents parameters
Browse files
app.py
CHANGED
@@ -169,21 +169,26 @@ with st.sidebar:
|
|
169 |
|
170 |
crossover_type = crossover_translator[crossover_type]
|
171 |
|
172 |
-
num_parents_mating =
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
keep_parents = st.slider(
|
181 |
-
'Percentage of parents kept taken from number of parents mating',
|
182 |
-
min_value=1,
|
183 |
-
max_value=num_parents_mating,
|
184 |
-
value=int(num_parents_mating * 0.66 // 10 * 10) # 2/3 of num_parents_mating
|
185 |
)
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
use_ordering_score = st.toggle('Use ordering score', value=True)
|
188 |
|
189 |
random_seed = int(st.number_input("Random seed", value=42, placeholder="Type a number..."))
|
|
|
169 |
|
170 |
crossover_type = crossover_translator[crossover_type]
|
171 |
|
172 |
+
num_parents_mating = int(
|
173 |
+
st.slider(
|
174 |
+
'Pecentage of parents mating taken from initial population',
|
175 |
+
min_value=0,
|
176 |
+
max_value=100,
|
177 |
+
step=1,
|
178 |
+
value=33,
|
179 |
+
) * X.shape[0] // 100
|
|
|
|
|
|
|
|
|
|
|
180 |
)
|
181 |
|
182 |
+
keep_parents = int(
|
183 |
+
st.slider(
|
184 |
+
'Percentage of parents kept taken from number of parents mating',
|
185 |
+
min_value=0,
|
186 |
+
max_value=100,
|
187 |
+
step=1,
|
188 |
+
value=66
|
189 |
+
) * num_parents_mating // 100
|
190 |
+
)
|
191 |
+
# 2/3 of num_parents_mating
|
192 |
use_ordering_score = st.toggle('Use ordering score', value=True)
|
193 |
|
194 |
random_seed = int(st.number_input("Random seed", value=42, placeholder="Type a number..."))
|