@@ -32,7 +32,7 @@ def _():
3232
3333@app .cell
3434def _ (np , pl ):
35- probs_test = {
35+ probs_dict_test = {
3636 "small_data_set" : np .array (
3737 [0.9 , 0.85 , 0.95 , 0.88 , 0.6 , 0.7 , 0.51 , 0.2 , 0.1 , 0.33 ]
3838 )
@@ -50,7 +50,7 @@ def _(np, pl):
5050 )
5151
5252 data_to_adjust
53- return probs_test , reals_dict_test , times_dict_test
53+ return probs_dict_test , reals_dict_test , times_dict_test
5454
5555
5656@app .cell
@@ -60,6 +60,8 @@ def _(create_aj_data_combinations, create_breaks_values):
6060 stratified_by = ["probability_threshold" , "ppcr" ]
6161 # stratified_by = ["probability_threshold"]
6262
63+ fixed_time_horizons = [10.0 , 20.0 , 30.0 , 40.0 , 50.0 ]
64+
6365 # stratified_by = ["ppcr"]
6466
6567 heuristics_sets = [
@@ -100,7 +102,7 @@ def _(create_aj_data_combinations, create_breaks_values):
100102 aj_data_combinations = create_aj_data_combinations (
101103 ["small_data_set" ],
102104 heuristics_sets = heuristics_sets ,
103- fixed_time_horizons = [ 10.0 , 20.0 , 30.0 , 40.0 , 50.0 ] ,
105+ fixed_time_horizons = fixed_time_horizons ,
104106 stratified_by = stratified_by ,
105107 by = by ,
106108 breaks = breaks ,
@@ -110,22 +112,29 @@ def _(create_aj_data_combinations, create_breaks_values):
110112 # aj_data_combinations
111113
112114 aj_data_combinations
113- return aj_data_combinations , breaks , by , heuristics_sets , stratified_by
115+ return (
116+ aj_data_combinations ,
117+ breaks ,
118+ by ,
119+ fixed_time_horizons ,
120+ heuristics_sets ,
121+ stratified_by ,
122+ )
114123
115124
116125@app .cell
117126def _ (
118127 aj_data_combinations ,
119128 by ,
120129 create_list_data_to_adjust ,
121- probs_test ,
130+ probs_dict_test ,
122131 reals_dict_test ,
123132 stratified_by ,
124133 times_dict_test ,
125134):
126135 list_data_to_adjust_polars_probability_threshold = create_list_data_to_adjust (
127136 aj_data_combinations ,
128- probs_test ,
137+ probs_dict_test ,
129138 reals_dict_test ,
130139 times_dict_test ,
131140 stratified_by = stratified_by ,
@@ -140,14 +149,15 @@ def _(
140149def _ (
141150 breaks ,
142151 create_adjusted_data ,
152+ fixed_time_horizons ,
143153 heuristics_sets ,
144154 list_data_to_adjust_polars_probability_threshold ,
145155 stratified_by ,
146156):
147157 adjusted_data = create_adjusted_data (
148158 list_data_to_adjust_polars_probability_threshold ,
149159 heuristics_sets = heuristics_sets ,
150- fixed_time_horizons = [ 10.0 , 20.0 , 30.0 , 40.0 , 50.0 ] ,
160+ fixed_time_horizons = fixed_time_horizons ,
151161 breaks = breaks ,
152162 stratified_by = stratified_by ,
153163 # risk_set_scope = ["pooled_by_cutoff"]
@@ -192,7 +202,50 @@ def _(cumulative_aj_data):
192202 return
193203
194204
195- @app .cell (column = 1 , hide_code = True )
205+ @app .cell (column = 1 )
206+ def _ ():
207+ from rtichoke .performance_data .performance_data_times import (
208+ prepare_performance_data_times ,
209+ )
210+
211+ return (prepare_performance_data_times ,)
212+
213+
214+ @app .cell
215+ def _ (
216+ fixed_time_horizons ,
217+ prepare_performance_data_times ,
218+ probs_dict_test ,
219+ reals_dict_test ,
220+ times_dict_test ,
221+ ):
222+ prepare_performance_data_times (
223+ probs_dict_test , reals_dict_test , times_dict_test , fixed_time_horizons , by = 0.1
224+ )
225+ return
226+
227+
228+ @app .cell
229+ def _ (np ):
230+ probs_dict_test = {
231+ "small_data_set" : np .array (
232+ [0.9 , 0.85 , 0.95 , 0.88 , 0.6 , 0.7 , 0.51 , 0.2 , 0.1 , 0.33 ]
233+ )
234+ }
235+ reals_dict_test = [1 , 1 , 1 , 1 , 0 , 2 , 1 , 2 , 0 , 1 ]
236+ times_dict_test = [24.1 , 9.7 , 49.9 , 18.6 , 34.8 , 14.2 , 39.2 , 46.0 , 31.5 , 4.3 ]
237+
238+ fixed_time_horizons = [10.0 , 20.0 , 30.0 , 40.0 , 50.0 ]
239+
240+ return (
241+ fixed_time_horizons ,
242+ probs_dict_test ,
243+ reals_dict_test ,
244+ times_dict_test ,
245+ )
246+
247+
248+ @app .cell (column = 2 , hide_code = True )
196249def _ (mo ):
197250 fill_color_radio = mo .ui .radio (
198251 options = ["classification_outcome" , "reals_labels" ],
@@ -275,7 +328,7 @@ def _(mo):
275328 return (competing_heuristic_radio ,)
276329
277330
278- @app .cell (column = 2 , hide_code = True )
331+ @app .cell (column = 3 , hide_code = True )
279332def _ (
280333 by ,
281334 censoring_heuristic_radio ,
0 commit comments