Spaces:
Runtime error
Runtime error
ChuckNorris
commited on
Commit
·
5624d07
1
Parent(s):
8cd60d6
Initial commit
Browse files- src/web_app.py +4 -2
src/web_app.py
CHANGED
@@ -226,13 +226,12 @@ with st.expander('Результаты ручной фильтрации', expan
|
|
226 |
st.write('Uplift по процентилям')
|
227 |
st.write(user_metric_uplift_by_percentile)
|
228 |
|
229 |
-
|
230 |
show_ml_reasons = st.checkbox('Показать решения с помощью ML')
|
231 |
if show_ml_reasons:
|
232 |
with st.expander('Решение с помощью CatBoost'):
|
233 |
with st.form(key='catboost_metricks'):
|
234 |
|
235 |
-
final_uplift =
|
236 |
|
237 |
# считаем метрики для ML
|
238 |
catboost_uplift_at_k = uplift_at_k(target_filtered, final_uplift, treatment_filtered, strategy='overall', k=k)
|
@@ -244,6 +243,9 @@ if show_ml_reasons:
|
|
244 |
col1.metric(label=f'Uplift для {k}% пользователей', value=f'{catboost_uplift_at_k:.4f}', delta=f'{catboost_uplift_at_k - user_metric_uplift_at_k:.4f}')
|
245 |
col2.metric(label=f'Qini AUC score', value=f'{catboost_qini_auc_score:.4f}', help='Всегда будет 0 для пользователя', delta=f'{catboost_qini_auc_score - user_metric_qini_auc_score:.4f}')
|
246 |
col3.metric(label=f'Weighted average uplift', value=f'{catboost_weighted_average_uplift:.4f}', delta=f'{catboost_weighted_average_uplift - user_metric_weighted_average_uplift:.4f}')
|
|
|
|
|
|
|
247 |
st.write('Uplift по процентилям')
|
248 |
st.write(catboost_uplift_by_percentile)
|
249 |
|
|
|
226 |
st.write('Uplift по процентилям')
|
227 |
st.write(user_metric_uplift_by_percentile)
|
228 |
|
|
|
229 |
show_ml_reasons = st.checkbox('Показать решения с помощью ML')
|
230 |
if show_ml_reasons:
|
231 |
with st.expander('Решение с помощью CatBoost'):
|
232 |
with st.form(key='catboost_metricks'):
|
233 |
|
234 |
+
final_uplift = sm_cbc.loc[filtered_dataset.index]['0']
|
235 |
|
236 |
# считаем метрики для ML
|
237 |
catboost_uplift_at_k = uplift_at_k(target_filtered, final_uplift, treatment_filtered, strategy='overall', k=k)
|
|
|
243 |
col1.metric(label=f'Uplift для {k}% пользователей', value=f'{catboost_uplift_at_k:.4f}', delta=f'{catboost_uplift_at_k - user_metric_uplift_at_k:.4f}')
|
244 |
col2.metric(label=f'Qini AUC score', value=f'{catboost_qini_auc_score:.4f}', help='Всегда будет 0 для пользователя', delta=f'{catboost_qini_auc_score - user_metric_qini_auc_score:.4f}')
|
245 |
col3.metric(label=f'Weighted average uplift', value=f'{catboost_weighted_average_uplift:.4f}', delta=f'{catboost_weighted_average_uplift - user_metric_weighted_average_uplift:.4f}')
|
246 |
+
|
247 |
+
st.write()
|
248 |
+
|
249 |
st.write('Uplift по процентилям')
|
250 |
st.write(catboost_uplift_by_percentile)
|
251 |
|