tagirshin commited on
Commit
d8cf067
1 Parent(s): 3ae9d07

fixed num parents mating and keep parents parameters

Browse files
Files changed (1) hide show
  1. app.py +18 -13
app.py CHANGED
@@ -169,21 +169,26 @@ with st.sidebar:
169
 
170
  crossover_type = crossover_translator[crossover_type]
171
 
172
- num_parents_mating = st.slider(
173
- 'Pecentage of parents mating taken from initial population',
174
- min_value=0,
175
- max_value=X.shape[0],
176
- step=0.01,
177
- value=0.33,
178
- ) * X.shape[0] * 10 // 10
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..."))