diff --git a/Python/_images/articles_AGBModelVisualisation_31_0.png b/Python/_images/articles_AGBModelVisualisation_31_0.png index 51fc2343..8496db91 100644 Binary files a/Python/_images/articles_AGBModelVisualisation_31_0.png and b/Python/_images/articles_AGBModelVisualisation_31_0.png differ diff --git a/Python/_images/articles_pdstoolsv3_16_0.svg b/Python/_images/articles_pdstoolsv3_16_0.svg index a0ffcec1..7629929a 100644 --- a/Python/_images/articles_pdstoolsv3_16_0.svg +++ b/Python/_images/articles_pdstoolsv3_16_0.svg @@ -1,270 +1,270 @@ - + polars_query - + p1 - -JOIN INNER -left: [col("ModelID")]; -right: [col("ModelID")] + +JOIN INNER +left: [col("ModelID")]; +right: [col("ModelID")] p2 - -FILTER BY [(col("SnapshotTime").fill_null_with_strategy()) == (col("SnapshotTime").fill_null_with_strategy().max())] + +FILTER BY [(col("SnapshotTime").fill_null_with_strategy()) == (col("SnapshotTime").fill_null_with_strategy().max())] p1--p2 - + p9 - -FILTER BY [(col("SnapshotTime").fill_null_with_strategy()) == (col("SnapshotTime").fill_null_with_strategy().max())] + +FILTER BY [(col("SnapshotTime").fill_null_with_strategy()) == (col("SnapshotTime").fill_null_with_strategy().max())] p1--p9 - + c0 - -CACHE: 1 times + +CACHE: 1 times p2--c0 - + p3 - -FILTER BY col("Name").str.contains([String(Visa)]) + +FILTER BY col("Name").str.contains([String(Visa)]) c0--p3 - + p17 - -FILTER BY col("Name").str.contains([String(Visa)]) + +FILTER BY col("Name").str.contains([String(Visa)]) c0--p17 - + p4 - -WITH COLUMNS [when([(col("__POLARS_CSER_0x36c299bdc8534abf").is_not_nan()) | (col("__POLARS_CSER_0x36c299bdc8534abf").is_null())]).then(col("__POLARS_CSER_0x36c299bdc8534abf")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0x36c299bdc8534abf")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0xaba69f25a38966b5").is_not_nan()) | (col("__POLARS_CSER_0xaba69f25a38966b5").is_null())]).then(col("__POLARS_CSER_0xaba69f25a38966b5")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0xaba69f25a38966b5")] p3--p4 - + p5 - -WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Channel").strict_cast(Categorical(None, Physical)), col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Issue").strict_cast(Categorical(None, Physical)), col("Group").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32)] + +WITH COLUMNS [col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Direction").strict_cast(Categorical(None, Physical)), col("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Channel").strict_cast(Categorical(None, Physical))] p4--p5 - + p6 - -π 12/12 + +π 12/12 p5--p6 - + p7 - -RENAME + +RENAME p6--p7 - + p8 - -TABLE -π 12/27; -σ col("Name").str.contains([String(Visa)]) + +TABLE +π 12/27; +σ col("Name").str.contains([String(Visa)]) p7--p8 - + p10 - -JOIN INNER -left: [col("ModelID")]; -right: [col("ModelID")] + +JOIN INNER +left: [col("ModelID")]; +right: [col("ModelID")] p9--p10 - + p11 - -WITH COLUMNS [[(col("BinPositives")) / (col("BinResponseCount"))].alias("BinPropensity"), [([(col("BinPositives")) + (0.5)]) / ([(col("BinResponseCount")) + (1.0)])].alias("BinAdjustedPropensity"), when([(col("__POLARS_CSER_0x3f3ecce13fbc0b01").list.length()) > (1)]).then(col("__POLARS_CSER_0x3f3ecce13fbc0b01").list.get([dyn int: 0])).otherwise(String(Primary)).alias("PredictorCategory"), col("PredictorName").strict_cast(String).str.split([String(.)]).alias("__POLARS_CSER_0x3f3ecce13fbc0b01")] + +WITH COLUMNS [[(col("BinPositives")) / (col("BinResponseCount"))].alias("BinPropensity"), [([(col("BinPositives")) + (0.5)]) / ([(col("BinResponseCount")) + (1.0)])].alias("BinAdjustedPropensity"), when([(col("__POLARS_CSER_0xd76190681c6c72c8").list.length()) > (1)]).then(col("__POLARS_CSER_0xd76190681c6c72c8").list.get([dyn int: 0])).otherwise(String(Primary)).alias("PredictorCategory"), col("PredictorName").strict_cast(String).str.split([String(.)]).alias("__POLARS_CSER_0xd76190681c6c72c8")] p10--p11 - + p15 - -π 1/1 + +π 1/1 p10--p15 - + p12 - -WITH COLUMNS [col("BinIndex").strict_cast(UInt16), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("BinResponseCount").strict_cast(Float32), col("BinNegatives").strict_cast(Float32), col("Positives").strict_cast(Float32), col("GroupIndex").strict_cast(UInt32), col("BinType").strict_cast(Categorical(None, Physical)), col("PredictorName").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Type").strict_cast(Categorical(None, Physical)), col("EntryType").strict_cast(Categorical(None, Physical)), col("BinPositives").strict_cast(Float32)] + +WITH COLUMNS [col("Positives").strict_cast(Float32), col("BinPositives").strict_cast(Float32), col("Type").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("BinIndex").strict_cast(UInt16), col("ResponseCount").strict_cast(Float32), col("BinResponseCount").strict_cast(Float32), col("GroupIndex").strict_cast(UInt32), col("EntryType").strict_cast(Categorical(None, Physical)), col("PredictorName").strict_cast(Categorical(None, Physical)), col("BinNegatives").strict_cast(Float32), col("BinType").strict_cast(Categorical(None, Physical))] p11--p12 - + p13 - -RENAME + +RENAME p12--p13 - + p14 - -TABLE -π 16/36; -σ None + +TABLE +π 16/36; +σ None p13--p14 - + p16 - -simple π 1/15 -["ModelID"] + +simple π 1/15 +["ModelID"] p15--p16 - + p16--c0 - + p18 - -WITH COLUMNS [when([(col("__POLARS_CSER_0x36c299bdc8534abf").is_not_nan()) | (col("__POLARS_CSER_0x36c299bdc8534abf").is_null())]).then(col("__POLARS_CSER_0x36c299bdc8534abf")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0x36c299bdc8534abf")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0xaba69f25a38966b5").is_not_nan()) | (col("__POLARS_CSER_0xaba69f25a38966b5").is_null())]).then(col("__POLARS_CSER_0xaba69f25a38966b5")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0xaba69f25a38966b5")] p17--p18 - + p19 - -WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Channel").strict_cast(Categorical(None, Physical)), col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Issue").strict_cast(Categorical(None, Physical)), col("Group").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32)] + +WITH COLUMNS [col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Direction").strict_cast(Categorical(None, Physical)), col("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Channel").strict_cast(Categorical(None, Physical))] p18--p19 - + p20 - -π 12/12 + +π 12/12 p19--p20 - + p21 - -RENAME + +RENAME p20--p21 - + p22 - -TABLE -π 12/27; -σ col("Name").str.contains([String(Visa)]) + +TABLE +π 12/27; +σ col("Name").str.contains([String(Visa)]) p21--p22 - + \ No newline at end of file diff --git a/Python/_images/articles_pdstoolsv3_6_0.svg b/Python/_images/articles_pdstoolsv3_6_0.svg index e7879d17..d34d4e56 100644 --- a/Python/_images/articles_pdstoolsv3_6_0.svg +++ b/Python/_images/articles_pdstoolsv3_6_0.svg @@ -1,47 +1,47 @@ - + polars_query - + p1 - -WITH COLUMNS [when([(col("__POLARS_CSER_0x36c299bdc8534abf").is_not_nan()) | (col("__POLARS_CSER_0x36c299bdc8534abf").is_null())]).then(col("__POLARS_CSER_0x36c299bdc8534abf")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0x36c299bdc8534abf")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0xaba69f25a38966b5").is_not_nan()) | (col("__POLARS_CSER_0xaba69f25a38966b5").is_null())]).then(col("__POLARS_CSER_0xaba69f25a38966b5")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0xaba69f25a38966b5")] p2 - -WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Channel").strict_cast(Categorical(None, Physical)), col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Issue").strict_cast(Categorical(None, Physical)), col("Group").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32)] + +WITH COLUMNS [col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Direction").strict_cast(Categorical(None, Physical)), col("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Channel").strict_cast(Categorical(None, Physical))] p1--p2 - + p3 - -RENAME + +RENAME p2--p3 - + p4 - -TABLE -π 12/27; -σ None + +TABLE +π 12/27; +σ None p3--p4 - + \ No newline at end of file diff --git a/Python/_images/articles_pdstoolsv3_8_0.svg b/Python/_images/articles_pdstoolsv3_8_0.svg index 3ffd38df..93fc46f3 100644 --- a/Python/_images/articles_pdstoolsv3_8_0.svg +++ b/Python/_images/articles_pdstoolsv3_8_0.svg @@ -1,58 +1,58 @@ - + polars_query - + p1 - -FILTER BY col("Name").str.contains([String(Visa)]) + +FILTER BY col("Name").str.contains([String(Visa)]) p2 - -WITH COLUMNS [when([(col("__POLARS_CSER_0x36c299bdc8534abf").is_not_nan()) | (col("__POLARS_CSER_0x36c299bdc8534abf").is_null())]).then(col("__POLARS_CSER_0x36c299bdc8534abf")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0x36c299bdc8534abf")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0xaba69f25a38966b5").is_not_nan()) | (col("__POLARS_CSER_0xaba69f25a38966b5").is_null())]).then(col("__POLARS_CSER_0xaba69f25a38966b5")).otherwise(0.0).alias("SuccessRate"), when([(col("Positives").min()) == (col("Positives").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("Positives").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_Positives"), when([(col("ResponseCount").min()) == (col("ResponseCount").max())]).then(col("SnapshotTime").max()).otherwise(col("SnapshotTime").filter([(col("ResponseCount").diff()) != (0.0)]).max()).over([col("ModelID")]).alias("Last_ResponseCount"), [(col("Positives")) / (col("ResponseCount"))].alias("__POLARS_CSER_0xaba69f25a38966b5")] p1--p2 - + p3 - -WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Channel").strict_cast(Categorical(None, Physical)), col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Issue").strict_cast(Categorical(None, Physical)), col("Group").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32)] + +WITH COLUMNS [col("Configuration").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), when([(col("SnapshotTime").str.slice([dyn int: 4, dyn int: 1])) == (String(-))]).then(col("SnapshotTime").str.strptime([String(raise)]).dt.cast_time_unit()).otherwise(col("SnapshotTime").str.strptime([String(raise)]).dt.replace_time_zone([String(raise)]).dt.cast_time_unit()).alias("SnapshotTime"), col("Direction").strict_cast(Categorical(None, Physical)), col("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Channel").strict_cast(Categorical(None, Physical))] p2--p3 - + p4 - -RENAME + +RENAME p3--p4 - + p5 - -TABLE -π 12/27; -σ col("Name").str.contains([String(Visa)]) + +TABLE +π 12/27; +σ col("Name").str.contains([String(Visa)]) p4--p5 - + \ No newline at end of file diff --git a/Python/articles/ADMBinningInsights.html b/Python/articles/ADMBinningInsights.html index 3e7329af..9bf3d522 100644 --- a/Python/articles/ADMBinningInsights.html +++ b/Python/articles/ADMBinningInsights.html @@ -446,9 +446,9 @@

Insights from ADM Models
-