diff --git a/Python/_images/articles_AGBModelVisualisation_31_0.png b/Python/_images/articles_AGBModelVisualisation_31_0.png index fdca71e7..ebef6b86 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 d5de54f8..8ccc8d8f 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_0xc67b95d38378526f").is_not_nan()) | (col("__POLARS_CSER_0xc67b95d38378526f").is_null())]).then(col("__POLARS_CSER_0xc67b95d38378526f")).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_0xc67b95d38378526f")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0x29cf79554d6c569f").is_not_nan()) | (col("__POLARS_CSER_0x29cf79554d6c569f").is_null())]).then(col("__POLARS_CSER_0x29cf79554d6c569f")).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_0x29cf79554d6c569f")] p3--p4 - + p5 - -WITH COLUMNS [col("Positives").strict_cast(Float32), col("Direction").strict_cast(Categorical(None, Physical)), col("Configuration").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("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical))] + +WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Configuration").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("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Issue").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_0x3914851859250ee2").list.length()) > (1)]).then(col("__POLARS_CSER_0x3914851859250ee2").list.get([dyn int: 0])).otherwise(String(Primary)).alias("PredictorCategory"), col("PredictorName").strict_cast(String).str.split([String(.)]).alias("__POLARS_CSER_0x3914851859250ee2")] + +WITH COLUMNS [[(col("BinPositives")) / (col("BinResponseCount"))].alias("BinPropensity"), [([(col("BinPositives")) + (0.5)]) / ([(col("BinResponseCount")) + (1.0)])].alias("BinAdjustedPropensity"), when([(col("__POLARS_CSER_0x96a44e70932c0d7c").list.length()) > (1)]).then(col("__POLARS_CSER_0x96a44e70932c0d7c").list.get([dyn int: 0])).otherwise(String(Primary)).alias("PredictorCategory"), col("PredictorName").strict_cast(String).str.split([String(.)]).alias("__POLARS_CSER_0x96a44e70932c0d7c")] p10--p11 - + p15 - -π 1/1 + +π 1/1 p10--p15 - + p12 - -WITH COLUMNS [col("BinPositives").strict_cast(Float32), col("GroupIndex").strict_cast(UInt32), col("PredictorName").strict_cast(Categorical(None, Physical)), col("BinType").strict_cast(Categorical(None, Physical)), col("BinIndex").strict_cast(UInt16), col("Positives").strict_cast(Float32), col("BinResponseCount").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("BinNegatives").strict_cast(Float32), col("ResponseCount").strict_cast(Float32), col("EntryType").strict_cast(Categorical(None, Physical))] + +WITH COLUMNS [col("BinResponseCount").strict_cast(Float32), col("GroupIndex").strict_cast(UInt32), col("PredictorName").strict_cast(Categorical(None, Physical)), col("BinIndex").strict_cast(UInt16), col("ResponseCount").strict_cast(Float32), col("BinNegatives").strict_cast(Float32), col("EntryType").strict_cast(Categorical(None, Physical)), 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("BinType").strict_cast(Categorical(None, Physical)), col("Positives").strict_cast(Float32), col("BinPositives").strict_cast(Float32)] 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_0xc67b95d38378526f").is_not_nan()) | (col("__POLARS_CSER_0xc67b95d38378526f").is_null())]).then(col("__POLARS_CSER_0xc67b95d38378526f")).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_0xc67b95d38378526f")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0x29cf79554d6c569f").is_not_nan()) | (col("__POLARS_CSER_0x29cf79554d6c569f").is_null())]).then(col("__POLARS_CSER_0x29cf79554d6c569f")).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_0x29cf79554d6c569f")] p17--p18 - + p19 - -WITH COLUMNS [col("Positives").strict_cast(Float32), col("Direction").strict_cast(Categorical(None, Physical)), col("Configuration").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("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical))] + +WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Configuration").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("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Issue").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 f27f4cf2..979184f3 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_0xc67b95d38378526f").is_not_nan()) | (col("__POLARS_CSER_0xc67b95d38378526f").is_null())]).then(col("__POLARS_CSER_0xc67b95d38378526f")).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_0xc67b95d38378526f")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0x29cf79554d6c569f").is_not_nan()) | (col("__POLARS_CSER_0x29cf79554d6c569f").is_null())]).then(col("__POLARS_CSER_0x29cf79554d6c569f")).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_0x29cf79554d6c569f")] p2 - -WITH COLUMNS [col("Positives").strict_cast(Float32), col("Direction").strict_cast(Categorical(None, Physical)), col("Configuration").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("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical))] + +WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Configuration").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("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Issue").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 e238fc2c..ede446d0 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_0xc67b95d38378526f").is_not_nan()) | (col("__POLARS_CSER_0xc67b95d38378526f").is_null())]).then(col("__POLARS_CSER_0xc67b95d38378526f")).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_0xc67b95d38378526f")] + +WITH COLUMNS [when([(col("__POLARS_CSER_0x29cf79554d6c569f").is_not_nan()) | (col("__POLARS_CSER_0x29cf79554d6c569f").is_null())]).then(col("__POLARS_CSER_0x29cf79554d6c569f")).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_0x29cf79554d6c569f")] p1--p2 - + p3 - -WITH COLUMNS [col("Positives").strict_cast(Float32), col("Direction").strict_cast(Categorical(None, Physical)), col("Configuration").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("Issue").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical))] + +WITH COLUMNS [col("Direction").strict_cast(Categorical(None, Physical)), col("Channel").strict_cast(Categorical(None, Physical)), col("ResponseCount").strict_cast(Float32), col("Configuration").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("Positives").strict_cast(Float32), col("Group").strict_cast(Categorical(None, Physical)), col("Issue").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/_sources/articles/explainability_extract.ipynb.txt b/Python/_sources/articles/explainability_extract.ipynb.txt index 4f734282..568b2647 100644 --- a/Python/_sources/articles/explainability_extract.ipynb.txt +++ b/Python/_sources/articles/explainability_extract.ipynb.txt @@ -10,7 +10,7 @@ "\n", "__2024-06-11__\n", "\n", - "Welcome to the Explainability Extract Demo. This notebook is designed to guide you through the analysis of Explainability Extract data using the DecisionData class of pdstools library. At this point, the dataset is particularly targeted on the \"Arbitration\" stage, but we have intentions to widen the data scope in subsequent iterations.\n", + "Welcome to the Explainability Extract Demo. This notebook is designed to guide you through the analysis of Explainability Extract v1 dataset using the DecisionData class of pdstools library. At this point, the dataset is particularly targeted on the \"Arbitration\" stage, but we have intentions to widen the data scope in subsequent iterations. This dataset can be extracted from Infinity 24.1 and its preceding versions.\n", "\n", "We developed this notebook with a dual purpose. Firstly, we aim to familiarize you with the various functions and visualizations available in the DecisionData class. You'll learn how to aggregate and visualize data in ways that are meaningful and insightful for your specific use cases.\n", "\n", diff --git a/Python/articles/ADMBinningInsights.html b/Python/articles/ADMBinningInsights.html index 86d02256..70ebd92e 100644 --- a/Python/articles/ADMBinningInsights.html +++ b/Python/articles/ADMBinningInsights.html @@ -443,9 +443,9 @@

Insights from ADM Models
-