diff --git a/acro/acro_regression.py b/acro/acro_regression.py
index f901d09..db350f9 100644
--- a/acro/acro_regression.py
+++ b/acro/acro_regression.py
@@ -114,6 +114,7 @@ def olsr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data must define __getitem__ with the keys in the formula terms
args and kwargs are passed on to the model instantiation. E.g.,
a numpy structured or rec array, a dictionary, or a pandas DataFrame.
+ Arguments are passed in the same order as statsmodels.
"""
logger.debug("olsr()")
command: str = utils.get_command("olsr()", stack())
@@ -122,7 +123,7 @@ def olsr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data=data,
subset=subset,
drop_cols=drop_cols,
- *args,
+ *args, # noqa: B026
**kwargs,
)
results = model.fit()
@@ -227,6 +228,7 @@ def logitr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data must define __getitem__ with the keys in the formula terms
args and kwargs are passed on to the model instantiation. E.g.,
a numpy structured or rec array, a dictionary, or a pandas DataFrame.
+ Arguments are passed in the same order as statsmodels.
"""
logger.debug("logitr()")
command: str = utils.get_command("logitr()", stack())
@@ -235,7 +237,7 @@ def logitr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data=data,
subset=subset,
drop_cols=drop_cols,
- *args,
+ *args, # noqa: B026
**kwargs,
)
results = model.fit()
@@ -340,6 +342,7 @@ def probitr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data must define __getitem__ with the keys in the formula terms
args and kwargs are passed on to the model instantiation. E.g.,
a numpy structured or rec array, a dictionary, or a pandas DataFrame.
+ Arguments are passed in the same order as statsmodels.
"""
logger.debug("probitr()")
command: str = utils.get_command("probitr()", stack())
@@ -348,7 +351,7 @@ def probitr( # pylint: disable=too-many-locals,keyword-arg-before-vararg
data=data,
subset=subset,
drop_cols=drop_cols,
- *args,
+ *args, # noqa: B026
**kwargs,
)
results = model.fit()
diff --git a/acro/acro_tables.py b/acro/acro_tables.py
index 0e9fca5..2f660ec 100644
--- a/acro/acro_tables.py
+++ b/acro/acro_tables.py
@@ -5,6 +5,7 @@
import logging
import os
+import secrets
from collections.abc import Callable
from inspect import stack
@@ -20,12 +21,30 @@
logger = logging.getLogger("acro")
-AGGFUNC: dict[str, str] = {
+def mode_aggfunc(values) -> Series:
+ """Calculate the mode or randomly selects one of the modes from a pandas Series.
+
+ Parameters
+ ----------
+ values : Series
+ A pandas Series for which to calculate the mode.
+
+ Returns
+ -------
+ Series
+ The mode. If there are multiple modes, randomly selects and returns one of the modes.
+ """
+ modes = values.mode()
+ return secrets.choice(modes)
+
+
+AGGFUNC: dict[str, str | Callable] = {
"mean": "mean",
"median": "median",
"sum": "sum",
"std": "std",
"count": "count",
+ "mode": mode_aggfunc,
}
# aggregation function parameters
@@ -137,9 +156,11 @@ def crosstab( # pylint: disable=too-many-arguments,too-many-locals
dropna,
normalize,
)
- # delete empty rows and columns from table
- table, comments = delete_empty_rows_columns(table)
-
+ comments: list[str] = []
+ # do not delete empty rows and columns from table if the aggfunc is mode
+ if agg_func is not mode_aggfunc:
+ # delete empty rows and columns from table
+ table, comments = delete_empty_rows_columns(table)
masks = create_crosstab_masks(
index,
columns,
@@ -742,7 +763,7 @@ def create_crosstab_masks( # pylint: disable=too-many-arguments,too-many-locals
if agg_func is not None:
# create lists with single entry for when there is only one aggfunc
- count_funcs: list[str] = [AGGFUNC["count"]]
+ count_funcs: list[str | Callable] = [AGGFUNC["count"]]
neg_funcs: list[Callable] = [agg_negative]
pperc_funcs: list[Callable] = [agg_p_percent]
nk_funcs: list[Callable] = [agg_nk]
@@ -756,49 +777,67 @@ def create_crosstab_masks( # pylint: disable=too-many-arguments,too-many-locals
nk_funcs.extend([agg_nk for i in range(1, num)])
missing_funcs.extend([agg_missing for i in range(1, num)])
# threshold check- doesn't matter what we pass for value
+ if agg_func is mode_aggfunc:
+ # check that all observations dont have the same value
+ logger.info(
+ "If there are multiple modes, one of them is randomly selected and displayed."
+ )
+ masks["all-values-are-same"] = pd.crosstab( # type: ignore
+ index,
+ columns,
+ values,
+ aggfunc=agg_values_are_same,
+ margins=margins,
+ dropna=dropna,
+ )
+ else:
+ t_values = pd.crosstab( # type: ignore
+ index,
+ columns,
+ values=values,
+ rownames=rownames,
+ colnames=colnames,
+ aggfunc=count_funcs,
+ margins=margins,
+ margins_name=margins_name,
+ dropna=dropna,
+ normalize=normalize,
+ )
- t_values = pd.crosstab( # type: ignore
- index,
- columns,
- values=values,
- rownames=rownames,
- colnames=colnames,
- aggfunc=count_funcs,
- margins=margins,
- margins_name=margins_name,
- dropna=dropna,
- normalize=normalize,
- )
-
- # drop empty columns and rows
- if dropna or margins:
- empty_cols_mask = t_values.sum(axis=0) == 0
- empty_rows_mask = t_values.sum(axis=1) == 0
+ # drop empty columns and rows
+ if dropna or margins:
+ empty_cols_mask = t_values.sum(axis=0) == 0
+ empty_rows_mask = t_values.sum(axis=1) == 0
- t_values = t_values.loc[:, ~empty_cols_mask]
- t_values = t_values.loc[~empty_rows_mask, :]
+ t_values = t_values.loc[:, ~empty_cols_mask]
+ t_values = t_values.loc[~empty_rows_mask, :]
- t_values = t_values < THRESHOLD
- masks["threshold"] = t_values
- # check for negative values -- currently unsupported
- negative = pd.crosstab( # type: ignore
- index, columns, values, aggfunc=neg_funcs, margins=margins
- )
- if negative.to_numpy().sum() > 0:
- masks["negative"] = negative
- # p-percent check
- masks["p-ratio"] = pd.crosstab( # type: ignore
- index, columns, values, aggfunc=pperc_funcs, margins=margins, dropna=dropna
- )
- # nk values check
- masks["nk-rule"] = pd.crosstab( # type: ignore
- index, columns, values, aggfunc=nk_funcs, margins=margins, dropna=dropna
- )
- # check for missing values -- currently unsupported
- if CHECK_MISSING_VALUES:
- masks["missing"] = pd.crosstab( # type: ignore
- index, columns, values, aggfunc=missing_funcs, margins=margins
+ t_values = t_values < THRESHOLD
+ masks["threshold"] = t_values
+ # check for negative values -- currently unsupported
+ negative = pd.crosstab( # type: ignore
+ index, columns, values, aggfunc=neg_funcs, margins=margins
+ )
+ if negative.to_numpy().sum() > 0:
+ masks["negative"] = negative
+ # p-percent check
+ masks["p-ratio"] = pd.crosstab( # type: ignore
+ index,
+ columns,
+ values,
+ aggfunc=pperc_funcs,
+ margins=margins,
+ dropna=dropna,
+ )
+ # nk values check
+ masks["nk-rule"] = pd.crosstab( # type: ignore
+ index, columns, values, aggfunc=nk_funcs, margins=margins, dropna=dropna
)
+ # check for missing values -- currently unsupported
+ if CHECK_MISSING_VALUES:
+ masks["missing"] = pd.crosstab( # type: ignore
+ index, columns, values, aggfunc=missing_funcs, margins=margins
+ )
else:
# threshold check- doesn't matter what we pass for value
t_values = pd.crosstab( # type: ignore
@@ -908,7 +947,7 @@ def rounded_survival_table(survival_table):
return survival_table
-def get_aggfunc(aggfunc: str | None) -> str | None:
+def get_aggfunc(aggfunc: str | None) -> str | Callable | None:
"""Checks whether an aggregation function is allowed and returns the
appropriate function.
@@ -940,7 +979,7 @@ def get_aggfunc(aggfunc: str | None) -> str | None:
def get_aggfuncs(
aggfuncs: str | list[str] | None,
-) -> str | list[str] | None:
+) -> str | Callable | list[str | Callable] | None:
"""Checks whether a list of aggregation functions is allowed and returns
the appropriate functions.
@@ -963,7 +1002,7 @@ def get_aggfuncs(
logger.debug("aggfuncs: %s", function)
return function
if isinstance(aggfuncs, list):
- functions: list[str] = []
+ functions: list[str | Callable] = []
for function_name in aggfuncs:
function = get_aggfunc(function_name)
if function is not None:
@@ -1076,6 +1115,24 @@ def agg_threshold(vals: Series) -> bool:
return vals.count() < THRESHOLD
+def agg_values_are_same(vals: Series) -> bool:
+ """Aggregation function that returns whether all observations having
+ the same value.
+
+ Parameters
+ ----------
+ vals : Series
+ Series to calculate if all the values are the same.
+
+ Returns
+ -------
+ bool
+ Whether the values are the same.
+ """
+ # the observations are not the same
+ return vals.nunique(dropna=True) == 1
+
+
def apply_suppression(
table: DataFrame, masks: dict[str, DataFrame]
) -> tuple[DataFrame, DataFrame]:
@@ -1147,6 +1204,7 @@ def get_table_sdc(masks: dict[str, DataFrame], suppress: bool) -> dict:
sdc["summary"]["threshold"] = 0
sdc["summary"]["p-ratio"] = 0
sdc["summary"]["nk-rule"] = 0
+ sdc["summary"]["all-values-are-same"] = 0
for name, mask in masks.items():
sdc["summary"][name] = int(np.nansum(mask.to_numpy()))
# positions of cells to be suppressed
@@ -1155,6 +1213,7 @@ def get_table_sdc(masks: dict[str, DataFrame], suppress: bool) -> dict:
sdc["cells"]["threshold"] = []
sdc["cells"]["p-ratio"] = []
sdc["cells"]["nk-rule"] = []
+ sdc["cells"]["all-values-are-same"] = []
for name, mask in masks.items():
true_positions = np.column_stack(np.where(mask.values))
for pos in true_positions:
@@ -1198,6 +1257,12 @@ def get_summary(sdc: dict) -> tuple[str, str]:
if sdc_summary["nk-rule"] > 0:
summary += f"nk-rule: {sdc_summary['nk-rule']} cells {sup}; "
status = "fail"
+ if sdc_summary["all-values-are-same"] > 0:
+ summary += (
+ f"all-values-are-same: {sdc_summary['all-values-are-same']} "
+ f"cells {sup}; "
+ )
+ status = "fail"
if summary != "":
summary = f"{status}; {summary}"
else:
diff --git a/data/nursery_dataset.dta b/data/nursery_dataset.dta
new file mode 100644
index 0000000..195b103
Binary files /dev/null and b/data/nursery_dataset.dta differ
diff --git a/notebooks/test-nursery.ipynb b/notebooks/test-nursery.ipynb
index c6734fe..f34ad35 100644
--- a/notebooks/test-nursery.ipynb
+++ b/notebooks/test-nursery.ipynb
@@ -466,13 +466,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "INFO:acro:get_summary(): fail; threshold: 4 cells may need suppressing; \n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
+ "INFO:acro:get_summary(): fail; threshold: 4 cells may need suppressing; \n",
"INFO:acro:outcome_df:\n",
"----------------------------------------------------|\n",
"parents |great_pret |pretentious |usual |\n",
@@ -567,11 +561,11 @@
"text": [
"parents great_pret pretentious usual\n",
"recommend \n",
- "not_recom 3.122222 3.095139 3.151389\n",
- "priority 2.565268 3.012129 3.147609\n",
+ "not_recom 3.147222 3.097917 3.093750\n",
+ "priority 2.636364 3.000674 3.075364\n",
"recommend NaN NaN NaN\n",
- "spec_prior 3.356578 3.314873 3.373351\n",
- "very_recom NaN 2.212121 2.193878\n"
+ "spec_prior 3.345697 3.332278 3.317942\n",
+ "very_recom NaN 2.227273 2.229592\n"
]
}
],
@@ -632,9 +626,9 @@
" mean std\n",
" children children\n",
"parents \n",
- "great_pret 3.121296 2.230648\n",
- "pretentious 3.103935 2.216586\n",
- "usual 3.144213 2.270397\n"
+ "great_pret 3.138657 2.257859\n",
+ "pretentious 3.106481 2.216308\n",
+ "usual 3.084722 2.175608\n"
]
}
],
@@ -747,13 +741,13 @@
"
Model: | OLS | Adj. R-squared: | 0.001 | \n",
"\n",
"\n",
- " Method: | Least Squares | F-statistic: | 8.073 | \n",
+ " Method: | Least Squares | F-statistic: | 7.652 | \n",
"
\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Prob (F-statistic): | 0.00450 | \n",
+ " Date: | Tue, 30 Jan 2024 | Prob (F-statistic): | 0.00568 | \n",
"
\n",
"\n",
- " Time: | 20:16:59 | Log-Likelihood: | -25124. | \n",
+ " Time: | 14:09:59 | Log-Likelihood: | -25124. | \n",
"
\n",
"\n",
" No. Observations: | 12960 | AIC: | 5.025e+04 | \n",
@@ -773,24 +767,24 @@
" | coef | std err | t | P>|t| | [0.025 | 0.975] | \n",
"
\n",
"\n",
- " const | 2.2279 | 0.025 | 87.886 | 0.000 | 2.178 | 2.278 | \n",
+ " const | 2.2291 | 0.025 | 87.594 | 0.000 | 2.179 | 2.279 | \n",
"
\n",
"\n",
- " children | 0.0187 | 0.007 | 2.841 | 0.004 | 0.006 | 0.032 | \n",
+ " children | 0.0184 | 0.007 | 2.766 | 0.006 | 0.005 | 0.031 | \n",
"
\n",
"\n",
"\n",
"\n",
- " Omnibus: | 76817.981 | Durbin-Watson: | 2.883 | \n",
+ " Omnibus: | 76792.958 | Durbin-Watson: | 2.884 | \n",
"
\n",
"\n",
- " Prob(Omnibus): | 0.000 | Jarque-Bera (JB): | 1742.901 | \n",
+ " Prob(Omnibus): | 0.000 | Jarque-Bera (JB): | 1743.166 | \n",
"
\n",
"\n",
" Skew: | -0.485 | Prob(JB): | 0.00 | \n",
"
\n",
"\n",
- " Kurtosis: | 1.488 | Cond. No. | 6.90 | \n",
+ " Kurtosis: | 1.488 | Cond. No. | 6.89 | \n",
"
\n",
"
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified."
],
@@ -801,9 +795,9 @@
"==============================================================================\n",
"Dep. Variable: recommend R-squared: 0.001\n",
"Model: OLS Adj. R-squared: 0.001\n",
- "Method: Least Squares F-statistic: 8.073\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00450\n",
- "Time: 20:16:59 Log-Likelihood: -25124.\n",
+ "Method: Least Squares F-statistic: 7.652\n",
+ "Date: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\n",
+ "Time: 14:09:59 Log-Likelihood: -25124.\n",
"No. Observations: 12960 AIC: 5.025e+04\n",
"Df Residuals: 12958 BIC: 5.027e+04\n",
"Df Model: 1 \n",
@@ -811,13 +805,13 @@
"==============================================================================\n",
" coef std err t P>|t| [0.025 0.975]\n",
"------------------------------------------------------------------------------\n",
- "const 2.2279 0.025 87.886 0.000 2.178 2.278\n",
- "children 0.0187 0.007 2.841 0.004 0.006 0.032\n",
+ "const 2.2291 0.025 87.594 0.000 2.179 2.279\n",
+ "children 0.0184 0.007 2.766 0.006 0.005 0.031\n",
"==============================================================================\n",
- "Omnibus: 76817.981 Durbin-Watson: 2.883\n",
- "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n",
+ "Omnibus: 76792.958 Durbin-Watson: 2.884\n",
+ "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\n",
"Skew: -0.485 Prob(JB): 0.00\n",
- "Kurtosis: 1.488 Cond. No. 6.90\n",
+ "Kurtosis: 1.488 Cond. No. 6.89\n",
"==============================================================================\n",
"\n",
"Notes:\n",
@@ -884,9 +878,9 @@
"==============================================================================\n",
"Dep. Variable: recommend R-squared: 0.001\n",
"Model: OLS Adj. R-squared: 0.001\n",
- "Method: Least Squares F-statistic: 8.073\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00450\n",
- "Time: 20:16:59 Log-Likelihood: -25124.\n",
+ "Method: Least Squares F-statistic: 7.652\n",
+ "Date: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\n",
+ "Time: 14:09:59 Log-Likelihood: -25124.\n",
"No. Observations: 12960 AIC: 5.025e+04\n",
"Df Residuals: 12958 BIC: 5.027e+04\n",
"Df Model: 1 \n",
@@ -894,13 +888,13 @@
"==============================================================================\n",
" coef std err t P>|t| [0.025 0.975]\n",
"------------------------------------------------------------------------------\n",
- "Intercept 2.2279 0.025 87.886 0.000 2.178 2.278\n",
- "children 0.0187 0.007 2.841 0.004 0.006 0.032\n",
+ "Intercept 2.2291 0.025 87.594 0.000 2.179 2.279\n",
+ "children 0.0184 0.007 2.766 0.006 0.005 0.031\n",
"==============================================================================\n",
- "Omnibus: 76817.981 Durbin-Watson: 2.883\n",
- "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n",
+ "Omnibus: 76792.958 Durbin-Watson: 2.884\n",
+ "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\n",
"Skew: -0.485 Prob(JB): 0.00\n",
- "Kurtosis: 1.488 Cond. No. 6.90\n",
+ "Kurtosis: 1.488 Cond. No. 6.89\n",
"==============================================================================\n",
"\n",
"Notes:\n",
@@ -952,22 +946,22 @@
"output_type": "stream",
"text": [
"Optimization terminated successfully.\n",
- " Current function value: 0.693146\n",
+ " Current function value: 0.693113\n",
" Iterations 3\n",
" Probit Regression Results \n",
"==============================================================================\n",
"Dep. Variable: finance No. Observations: 12960\n",
"Model: Probit Df Residuals: 12958\n",
"Method: MLE Df Model: 1\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.142e-06\n",
- "Time: 20:16:59 Log-Likelihood: -8983.2\n",
+ "Date: Tue, 30 Jan 2024 Pseudo R-squ.: 4.993e-05\n",
+ "Time: 14:10:00 Log-Likelihood: -8982.7\n",
"converged: True LL-Null: -8983.2\n",
- "Covariance Type: nonrobust LLR p-value: 0.8445\n",
+ "Covariance Type: nonrobust LLR p-value: 0.3436\n",
"==============================================================================\n",
" coef std err z P>|z| [0.025 0.975]\n",
"------------------------------------------------------------------------------\n",
- "const -0.0030 0.019 -0.159 0.873 -0.040 0.034\n",
- "children 0.0010 0.005 0.196 0.844 -0.009 0.011\n",
+ "const 0.0146 0.019 0.771 0.441 -0.023 0.052\n",
+ "children -0.0047 0.005 -0.947 0.344 -0.014 0.005\n",
"==============================================================================\n"
]
}
@@ -1027,7 +1021,7 @@
"output_type": "stream",
"text": [
"Optimization terminated successfully.\n",
- " Current function value: 0.693146\n",
+ " Current function value: 0.693113\n",
" Iterations 3\n"
]
},
@@ -1046,16 +1040,16 @@
" Method: | MLE | Df Model: | 1 | \n",
"\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Pseudo R-squ.: | 2.141e-06 | \n",
+ " Date: | Tue, 30 Jan 2024 | Pseudo R-squ.: | 4.993e-05 | \n",
"
\n",
"\n",
- " Time: | 20:16:59 | Log-Likelihood: | -8983.2 | \n",
+ " Time: | 14:10:00 | Log-Likelihood: | -8982.7 | \n",
"
\n",
"\n",
" converged: | True | LL-Null: | -8983.2 | \n",
"
\n",
"\n",
- " Covariance Type: | nonrobust | LLR p-value: | 0.8445 | \n",
+ " Covariance Type: | nonrobust | LLR p-value: | 0.3436 | \n",
"
\n",
"\n",
"\n",
@@ -1063,10 +1057,10 @@
" | coef | std err | z | P>|z| | [0.025 | 0.975] | \n",
"\n",
"\n",
- " const | -0.0048 | 0.030 | -0.159 | 0.873 | -0.064 | 0.054 | \n",
+ " const | 0.0233 | 0.030 | 0.771 | 0.441 | -0.036 | 0.083 | \n",
"
\n",
"\n",
- " children | 0.0015 | 0.008 | 0.196 | 0.844 | -0.014 | 0.017 | \n",
+ " children | -0.0075 | 0.008 | -0.947 | 0.344 | -0.023 | 0.008 | \n",
"
\n",
"
"
],
@@ -1078,15 +1072,15 @@
"Dep. Variable: finance No. Observations: 12960\n",
"Model: Logit Df Residuals: 12958\n",
"Method: MLE Df Model: 1\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.141e-06\n",
- "Time: 20:16:59 Log-Likelihood: -8983.2\n",
+ "Date: Tue, 30 Jan 2024 Pseudo R-squ.: 4.993e-05\n",
+ "Time: 14:10:00 Log-Likelihood: -8982.7\n",
"converged: True LL-Null: -8983.2\n",
- "Covariance Type: nonrobust LLR p-value: 0.8445\n",
+ "Covariance Type: nonrobust LLR p-value: 0.3436\n",
"==============================================================================\n",
" coef std err z P>|z| [0.025 0.975]\n",
"------------------------------------------------------------------------------\n",
- "const -0.0048 0.030 -0.159 0.873 -0.064 0.054\n",
- "children 0.0015 0.008 0.196 0.844 -0.014 0.017\n",
+ "const 0.0233 0.030 0.771 0.441 -0.036 0.083\n",
+ "children -0.0075 0.008 -0.947 0.344 -0.023 0.008\n",
"==============================================================================\n",
"\"\"\""
]
@@ -1254,7 +1248,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "(, 'acro_artifacts/kaplan-mier_1.png')\n"
+ "(, 'acro_artifacts/kaplan-mier_0.png')\n"
]
},
{
@@ -1309,7 +1303,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(\n",
"summary: fail; threshold: 4 cells suppressed; \n",
"outcome: parents great_pret pretentious usual\n",
@@ -1326,7 +1320,7 @@
"recommend NaN NaN NaN\n",
"spec_prior 2022.0 1264.0 758.0\n",
"very_recom NaN 132.0 196.0]\n",
- "timestamp: 2023-10-30T20:16:58.817104\n",
+ "timestamp: 2024-01-30T14:09:59.298279\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1334,7 +1328,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.recommend, df.parents)\n",
"summary: fail; threshold: 4 cells may need suppressing; \n",
"outcome: parents great_pret pretentious usual\n",
@@ -1351,7 +1345,7 @@
"recommend 0 0 2\n",
"spec_prior 2022 1264 758\n",
"very_recom 0 132 196]\n",
- "timestamp: 2023-10-30T20:16:58.903118\n",
+ "timestamp: 2024-01-30T14:09:59.381804\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1359,7 +1353,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 1, 'p-ratio': 4, 'nk-rule': 4}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 2]], 'p-ratio': [[2, 0], [2, 1], [2, 2], [4, 0]], 'nk-rule': [[2, 0], [2, 1], [2, 2], [4, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 1, 'p-ratio': 4, 'nk-rule': 4, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 2]], 'p-ratio': [[2, 0], [2, 1], [2, 2], [4, 0]], 'nk-rule': [[2, 0], [2, 1], [2, 2], [4, 0]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.recommend, df.parents, values=df.children, aggfunc=\"mean\")\n",
"summary: fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \n",
"outcome: parents great_pret pretentious \\\n",
@@ -1379,12 +1373,12 @@
"very_recom ok \n",
"output: [parents great_pret pretentious usual\n",
"recommend \n",
- "not_recom 3.122222 3.095139 3.151389\n",
- "priority 2.565268 3.012129 3.147609\n",
+ "not_recom 3.147222 3.097917 3.093750\n",
+ "priority 2.636364 3.000674 3.075364\n",
"recommend NaN NaN NaN\n",
- "spec_prior 3.356578 3.314873 3.373351\n",
- "very_recom NaN 2.212121 2.193878]\n",
- "timestamp: 2023-10-30T20:16:59.076118\n",
+ "spec_prior 3.345697 3.332278 3.317942\n",
+ "very_recom NaN 2.227273 2.229592]\n",
+ "timestamp: 2024-01-30T14:09:59.519976\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1392,7 +1386,7 @@
"status: pass\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: pass\n",
"outcome: mean std\n",
@@ -1404,10 +1398,10 @@
"output: [ mean std\n",
" children children\n",
"parents \n",
- "great_pret 3.121296 2.230648\n",
- "pretentious 3.103935 2.216586\n",
- "usual 3.144213 2.270397]\n",
- "timestamp: 2023-10-30T20:16:59.226123\n",
+ "great_pret 3.138657 2.257859\n",
+ "pretentious 3.106481 2.216308\n",
+ "usual 3.084722 2.175608]\n",
+ "timestamp: 2024-01-30T14:09:59.637985\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1421,23 +1415,23 @@
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: [ recommend R-squared: 0.001\n",
- "Dep. Variable: \n",
- "Model: OLS Adj. R-squared: 0.0010\n",
- "Method: Least Squares F-statistic: 8.0730\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.0045\n",
- "Time: 20:16:59 Log-Likelihood: -25124.0000\n",
- "No. Observations: 12960 AIC: 50250.0000\n",
- "Df Residuals: 12958 BIC: 50270.0000\n",
- "Df Model: 1 NaN NaN\n",
- "Covariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\n",
- "const 2.2279 0.025 87.886 0.000 2.178 2.278\n",
- "children 0.0187 0.007 2.841 0.004 0.006 0.032, 76817.981 Durbin-Watson: 2.883\n",
+ "output: [ recommend R-squared: 0.001\n",
+ "Dep. Variable: \n",
+ "Model: OLS Adj. R-squared: 0.00100\n",
+ "Method: Least Squares F-statistic: 7.65200\n",
+ "Date: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\n",
+ "Time: 14:09:59 Log-Likelihood: -25124.00000\n",
+ "No. Observations: 12960 AIC: 50250.00000\n",
+ "Df Residuals: 12958 BIC: 50270.00000\n",
+ "Df Model: 1 NaN NaN\n",
+ "Covariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\n",
+ "const 2.2291 0.025 87.594 0.000 2.179 2.279\n",
+ "children 0.0184 0.007 2.766 0.006 0.005 0.031, 76792.958 Durbin-Watson: 2.884\n",
"Omnibus: \n",
- "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n",
+ "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\n",
"Skew: -0.485 Prob(JB): 0.000\n",
- "Kurtosis: 1.488 Cond. No. 6.900]\n",
- "timestamp: 2023-10-30T20:16:59.403117\n",
+ "Kurtosis: 1.488 Cond. No. 6.890]\n",
+ "timestamp: 2024-01-30T14:09:59.809927\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1451,23 +1445,23 @@
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: [ recommend R-squared: 0.001\n",
- "Dep. Variable: \n",
- "Model: OLS Adj. R-squared: 0.0010\n",
- "Method: Least Squares F-statistic: 8.0730\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.0045\n",
- "Time: 20:16:59 Log-Likelihood: -25124.0000\n",
- "No. Observations: 12960 AIC: 50250.0000\n",
- "Df Residuals: 12958 BIC: 50270.0000\n",
- "Df Model: 1 NaN NaN\n",
- "Covariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\n",
- "Intercept 2.2279 0.025 87.886 0.000 2.178 2.278\n",
- "children 0.0187 0.007 2.841 0.004 0.006 0.032, 76817.981 Durbin-Watson: 2.883\n",
+ "output: [ recommend R-squared: 0.001\n",
+ "Dep. Variable: \n",
+ "Model: OLS Adj. R-squared: 0.00100\n",
+ "Method: Least Squares F-statistic: 7.65200\n",
+ "Date: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\n",
+ "Time: 14:09:59 Log-Likelihood: -25124.00000\n",
+ "No. Observations: 12960 AIC: 50250.00000\n",
+ "Df Residuals: 12958 BIC: 50270.00000\n",
+ "Df Model: 1 NaN NaN\n",
+ "Covariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\n",
+ "Intercept 2.2291 0.025 87.594 0.000 2.179 2.279\n",
+ "children 0.0184 0.007 2.766 0.006 0.005 0.031, 76792.958 Durbin-Watson: 2.884\n",
"Omnibus: \n",
- "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n",
+ "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\n",
"Skew: -0.485 Prob(JB): 0.000\n",
- "Kurtosis: 1.488 Cond. No. 6.900]\n",
- "timestamp: 2023-10-30T20:16:59.510245\n",
+ "Kurtosis: 1.488 Cond. No. 6.890]\n",
+ "timestamp: 2024-01-30T14:09:59.899115\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1481,17 +1475,17 @@
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: [ finance No. Observations: 12960\n",
- "Dep. Variable: \n",
- "Model: Probit Df Residuals: 12958.000000\n",
- "Method: MLE Df Model: 1.000000\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.000002\n",
- "Time: 20:16:59 Log-Likelihood: -8983.200000\n",
- "converged: True LL-Null: -8983.200000\n",
- "Covariance Type: nonrobust LLR p-value: 0.844500, coef std err z P>|z| [0.025 0.975]\n",
- "const -0.003 0.019 -0.159 0.873 -0.040 0.034\n",
- "children 0.001 0.005 0.196 0.844 -0.009 0.011]\n",
- "timestamp: 2023-10-30T20:16:59.647087\n",
+ "output: [ finance No. Observations: 12960\n",
+ "Dep. Variable: \n",
+ "Model: Probit Df Residuals: 12958.00000\n",
+ "Method: MLE Df Model: 1.00000\n",
+ "Date: Tue, 30 Jan 2024 Pseudo R-squ.: 0.00005\n",
+ "Time: 14:10:00 Log-Likelihood: -8982.70000\n",
+ "converged: True LL-Null: -8983.20000\n",
+ "Covariance Type: nonrobust LLR p-value: 0.34360, coef std err z P>|z| [0.025 0.975]\n",
+ "const 0.0146 0.019 0.771 0.441 -0.023 0.052\n",
+ "children -0.0047 0.005 -0.947 0.344 -0.014 0.005]\n",
+ "timestamp: 2024-01-30T14:10:00.028113\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1505,17 +1499,17 @@
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: [ finance No. Observations: 12960\n",
- "Dep. Variable: \n",
- "Model: Logit Df Residuals: 12958.000000\n",
- "Method: MLE Df Model: 1.000000\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.000002\n",
- "Time: 20:16:59 Log-Likelihood: -8983.200000\n",
- "converged: True LL-Null: -8983.200000\n",
- "Covariance Type: nonrobust LLR p-value: 0.844500, coef std err z P>|z| [0.025 0.975]\n",
- "const -0.0048 0.030 -0.159 0.873 -0.064 0.054\n",
- "children 0.0015 0.008 0.196 0.844 -0.014 0.017]\n",
- "timestamp: 2023-10-30T20:16:59.762991\n",
+ "output: [ finance No. Observations: 12960\n",
+ "Dep. Variable: \n",
+ "Model: Logit Df Residuals: 12958.00000\n",
+ "Method: MLE Df Model: 1.00000\n",
+ "Date: Tue, 30 Jan 2024 Pseudo R-squ.: 0.00005\n",
+ "Time: 14:10:00 Log-Likelihood: -8982.70000\n",
+ "converged: True LL-Null: -8983.20000\n",
+ "Covariance Type: nonrobust LLR p-value: 0.34360, coef std err z P>|z| [0.025 0.975]\n",
+ "const 0.0233 0.030 0.771 0.441 -0.036 0.083\n",
+ "children -0.0075 0.008 -0.947 0.344 -0.023 0.008]\n",
+ "timestamp: 2024-01-30T14:10:00.163252\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1523,7 +1517,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'surv_func'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.surv_func(data.futime, data.death, output=\"table\")\n",
"summary: fail; threshold: 76 cells suppressed; \n",
"outcome: Surv prob Surv prob SE num at risk num events\n",
@@ -1570,7 +1564,7 @@
"2776 NaN NaN NaN NaN\n",
"2851 NaN NaN NaN NaN\n",
"3309 NaN NaN NaN NaN]\n",
- "timestamp: 2023-10-30T20:17:00.689719\n",
+ "timestamp: 2024-01-30T14:10:00.984548\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1578,14 +1572,14 @@
"status: fail\n",
"type: survival plot\n",
"properties: {'method': 'surv_func'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_plot = acro.surv_func(\n",
"summary: fail; threshold: 76 cells suppressed; \n",
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: ['acro_artifacts\\\\kaplan-mier_1.png']\n",
- "timestamp: 2023-10-30T20:17:00.946712\n",
+ "output: ['acro_artifacts\\\\kaplan-mier_0.png']\n",
+ "timestamp: 2024-01-30T14:10:01.208677\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1595,7 +1589,7 @@
{
"data": {
"text/plain": [
- "'uid: output_0\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 4, \\'p-ratio\\': 0, \\'nk-rule\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'p-ratio\\': [], \\'nk-rule\\': []}}\\ncommand: safe_table = acro.crosstab(\\nsummary: fail; threshold: 4 cells suppressed; \\noutcome: parents great_pret pretentious usual\\nrecommendation \\nnot_recom ok ok ok\\npriority ok ok ok\\nrecommend threshold; threshold; threshold; \\nspec_prior ok ok ok\\nvery_recom threshold; ok ok\\noutput: [parents great_pret pretentious usual\\nrecommendation \\nnot_recom 1440.0 1440.0 1440.0\\npriority 858.0 1484.0 1924.0\\nrecommend NaN NaN NaN\\nspec_prior 2022.0 1264.0 758.0\\nvery_recom NaN 132.0 196.0]\\ntimestamp: 2023-10-30T20:16:58.817104\\ncomments: []\\nexception: \\n\\nuid: output_1\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': False, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 4, \\'p-ratio\\': 0, \\'nk-rule\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'p-ratio\\': [], \\'nk-rule\\': []}}\\ncommand: safe_table = acro.crosstab(df.recommend, df.parents)\\nsummary: fail; threshold: 4 cells may need suppressing; \\noutcome: parents great_pret pretentious usual\\nrecommend \\nnot_recom ok ok ok\\npriority ok ok ok\\nrecommend threshold; threshold; threshold; \\nspec_prior ok ok ok\\nvery_recom threshold; ok ok\\noutput: [parents great_pret pretentious usual\\nrecommend \\nnot_recom 1440 1440 1440\\npriority 858 1484 1924\\nrecommend 0 0 2\\nspec_prior 2022 1264 758\\nvery_recom 0 132 196]\\ntimestamp: 2023-10-30T20:16:58.903118\\ncomments: []\\nexception: \\n\\nuid: output_2\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 1, \\'p-ratio\\': 4, \\'nk-rule\\': 4}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 2]], \\'p-ratio\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'nk-rule\\': [[2, 0], [2, 1], [2, 2], [4, 0]]}}\\ncommand: safe_table = acro.crosstab(df.recommend, df.parents, values=df.children, aggfunc=\"mean\")\\nsummary: fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \\noutcome: parents great_pret pretentious \\\\\\nrecommend \\nnot_recom ok ok \\npriority ok ok \\nrecommend p-ratio; nk-rule; p-ratio; nk-rule; \\nspec_prior ok ok \\nvery_recom p-ratio; nk-rule; ok \\n\\nparents usual \\nrecommend \\nnot_recom ok \\npriority ok \\nrecommend threshold; p-ratio; nk-rule; \\nspec_prior ok \\nvery_recom ok \\noutput: [parents great_pret pretentious usual\\nrecommend \\nnot_recom 3.122222 3.095139 3.151389\\npriority 2.565268 3.012129 3.147609\\nrecommend NaN NaN NaN\\nspec_prior 3.356578 3.314873 3.373351\\nvery_recom NaN 2.212121 2.193878]\\ntimestamp: 2023-10-30T20:16:59.076118\\ncomments: []\\nexception: \\n\\nuid: output_3\\nstatus: pass\\ntype: table\\nproperties: {\\'method\\': \\'pivot_table\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 0, \\'p-ratio\\': 0, \\'nk-rule\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [], \\'p-ratio\\': [], \\'nk-rule\\': []}}\\ncommand: table = acro.pivot_table(\\nsummary: pass\\noutcome: mean std\\n children children\\nparents \\ngreat_pret ok ok\\npretentious ok ok\\nusual ok ok\\noutput: [ mean std\\n children children\\nparents \\ngreat_pret 3.121296 2.230648\\npretentious 3.103935 2.216586\\nusual 3.144213 2.270397]\\ntimestamp: 2023-10-30T20:16:59.226123\\ncomments: []\\nexception: \\n\\nuid: output_4\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'ols\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.ols(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ recommend R-squared: 0.001\\nDep. Variable: \\nModel: OLS Adj. R-squared: 0.0010\\nMethod: Least Squares F-statistic: 8.0730\\nDate: Mon, 30 Oct 2023 Prob (F-statistic): 0.0045\\nTime: 20:16:59 Log-Likelihood: -25124.0000\\nNo. Observations: 12960 AIC: 50250.0000\\nDf Residuals: 12958 BIC: 50270.0000\\nDf Model: 1 NaN NaN\\nCovariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\\nconst 2.2279 0.025 87.886 0.000 2.178 2.278\\nchildren 0.0187 0.007 2.841 0.004 0.006 0.032, 76817.981 Durbin-Watson: 2.883\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.900]\\ntimestamp: 2023-10-30T20:16:59.403117\\ncomments: []\\nexception: \\n\\nuid: output_5\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'olsr\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.olsr(formula=\"recommend ~ children\", data=new_df)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ recommend R-squared: 0.001\\nDep. Variable: \\nModel: OLS Adj. R-squared: 0.0010\\nMethod: Least Squares F-statistic: 8.0730\\nDate: Mon, 30 Oct 2023 Prob (F-statistic): 0.0045\\nTime: 20:16:59 Log-Likelihood: -25124.0000\\nNo. Observations: 12960 AIC: 50250.0000\\nDf Residuals: 12958 BIC: 50270.0000\\nDf Model: 1 NaN NaN\\nCovariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\\nIntercept 2.2279 0.025 87.886 0.000 2.178 2.278\\nchildren 0.0187 0.007 2.841 0.004 0.006 0.032, 76817.981 Durbin-Watson: 2.883\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.900]\\ntimestamp: 2023-10-30T20:16:59.510245\\ncomments: []\\nexception: \\n\\nuid: output_6\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'probit\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.probit(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ finance No. Observations: 12960\\nDep. Variable: \\nModel: Probit Df Residuals: 12958.000000\\nMethod: MLE Df Model: 1.000000\\nDate: Mon, 30 Oct 2023 Pseudo R-squ.: 0.000002\\nTime: 20:16:59 Log-Likelihood: -8983.200000\\nconverged: True LL-Null: -8983.200000\\nCovariance Type: nonrobust LLR p-value: 0.844500, coef std err z P>|z| [0.025 0.975]\\nconst -0.003 0.019 -0.159 0.873 -0.040 0.034\\nchildren 0.001 0.005 0.196 0.844 -0.009 0.011]\\ntimestamp: 2023-10-30T20:16:59.647087\\ncomments: []\\nexception: \\n\\nuid: output_7\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'logit\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.logit(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ finance No. Observations: 12960\\nDep. Variable: \\nModel: Logit Df Residuals: 12958.000000\\nMethod: MLE Df Model: 1.000000\\nDate: Mon, 30 Oct 2023 Pseudo R-squ.: 0.000002\\nTime: 20:16:59 Log-Likelihood: -8983.200000\\nconverged: True LL-Null: -8983.200000\\nCovariance Type: nonrobust LLR p-value: 0.844500, coef std err z P>|z| [0.025 0.975]\\nconst -0.0048 0.030 -0.159 0.873 -0.064 0.054\\nchildren 0.0015 0.008 0.196 0.844 -0.014 0.017]\\ntimestamp: 2023-10-30T20:16:59.762991\\ncomments: []\\nexception: \\n\\nuid: output_8\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'surv_func\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 76, \\'p-ratio\\': 0, \\'nk-rule\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], \\'p-ratio\\': [], \\'nk-rule\\': []}}\\ncommand: safe_table = acro.surv_func(data.futime, data.death, output=\"table\")\\nsummary: fail; threshold: 76 cells suppressed; \\noutcome: Surv prob Surv prob SE num at risk num events\\nTime \\n51 ok ok ok ok\\n69 threshold; threshold; threshold; threshold; \\n85 threshold; threshold; threshold; threshold; \\n91 threshold; threshold; threshold; threshold; \\n115 threshold; threshold; threshold; threshold; \\n372 threshold; threshold; threshold; threshold; \\n667 threshold; threshold; threshold; threshold; \\n874 threshold; threshold; threshold; threshold; \\n1039 threshold; threshold; threshold; threshold; \\n1046 threshold; threshold; threshold; threshold; \\n1281 threshold; threshold; threshold; threshold; \\n1286 threshold; threshold; threshold; threshold; \\n1326 threshold; threshold; threshold; threshold; \\n1355 threshold; threshold; threshold; threshold; \\n1626 threshold; threshold; threshold; threshold; \\n1903 threshold; threshold; threshold; threshold; \\n1914 threshold; threshold; threshold; threshold; \\n2776 threshold; threshold; threshold; threshold; \\n2851 threshold; threshold; threshold; threshold; \\n3309 threshold; threshold; threshold; threshold; \\noutput: [ Surv prob Surv prob SE num at risk num events\\nTime \\n51 0.95 0.048734 20.0 1.0\\n69 NaN NaN NaN NaN\\n85 NaN NaN NaN NaN\\n91 NaN NaN NaN NaN\\n115 NaN NaN NaN NaN\\n372 NaN NaN NaN NaN\\n667 NaN NaN NaN NaN\\n874 NaN NaN NaN NaN\\n1039 NaN NaN NaN NaN\\n1046 NaN NaN NaN NaN\\n1281 NaN NaN NaN NaN\\n1286 NaN NaN NaN NaN\\n1326 NaN NaN NaN NaN\\n1355 NaN NaN NaN NaN\\n1626 NaN NaN NaN NaN\\n1903 NaN NaN NaN NaN\\n1914 NaN NaN NaN NaN\\n2776 NaN NaN NaN NaN\\n2851 NaN NaN NaN NaN\\n3309 NaN NaN NaN NaN]\\ntimestamp: 2023-10-30T20:17:00.689719\\ncomments: []\\nexception: \\n\\nuid: output_9\\nstatus: fail\\ntype: survival plot\\nproperties: {\\'method\\': \\'surv_func\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 76, \\'p-ratio\\': 0, \\'nk-rule\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], \\'p-ratio\\': [], \\'nk-rule\\': []}}\\ncommand: safe_plot = acro.surv_func(\\nsummary: fail; threshold: 76 cells suppressed; \\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [\\'acro_artifacts\\\\\\\\kaplan-mier_1.png\\']\\ntimestamp: 2023-10-30T20:17:00.946712\\ncomments: []\\nexception: \\n\\n'"
+ "'uid: output_0\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 4, \\'p-ratio\\': 0, \\'nk-rule\\': 0, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'p-ratio\\': [], \\'nk-rule\\': [], \\'all-values-are-same\\': []}}\\ncommand: safe_table = acro.crosstab(\\nsummary: fail; threshold: 4 cells suppressed; \\noutcome: parents great_pret pretentious usual\\nrecommendation \\nnot_recom ok ok ok\\npriority ok ok ok\\nrecommend threshold; threshold; threshold; \\nspec_prior ok ok ok\\nvery_recom threshold; ok ok\\noutput: [parents great_pret pretentious usual\\nrecommendation \\nnot_recom 1440.0 1440.0 1440.0\\npriority 858.0 1484.0 1924.0\\nrecommend NaN NaN NaN\\nspec_prior 2022.0 1264.0 758.0\\nvery_recom NaN 132.0 196.0]\\ntimestamp: 2024-01-30T14:09:59.298279\\ncomments: []\\nexception: \\n\\nuid: output_1\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': False, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 4, \\'p-ratio\\': 0, \\'nk-rule\\': 0, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'p-ratio\\': [], \\'nk-rule\\': [], \\'all-values-are-same\\': []}}\\ncommand: safe_table = acro.crosstab(df.recommend, df.parents)\\nsummary: fail; threshold: 4 cells may need suppressing; \\noutcome: parents great_pret pretentious usual\\nrecommend \\nnot_recom ok ok ok\\npriority ok ok ok\\nrecommend threshold; threshold; threshold; \\nspec_prior ok ok ok\\nvery_recom threshold; ok ok\\noutput: [parents great_pret pretentious usual\\nrecommend \\nnot_recom 1440 1440 1440\\npriority 858 1484 1924\\nrecommend 0 0 2\\nspec_prior 2022 1264 758\\nvery_recom 0 132 196]\\ntimestamp: 2024-01-30T14:09:59.381804\\ncomments: []\\nexception: \\n\\nuid: output_2\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'crosstab\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 1, \\'p-ratio\\': 4, \\'nk-rule\\': 4, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[2, 2]], \\'p-ratio\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'nk-rule\\': [[2, 0], [2, 1], [2, 2], [4, 0]], \\'all-values-are-same\\': []}}\\ncommand: safe_table = acro.crosstab(df.recommend, df.parents, values=df.children, aggfunc=\"mean\")\\nsummary: fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \\noutcome: parents great_pret pretentious \\\\\\nrecommend \\nnot_recom ok ok \\npriority ok ok \\nrecommend p-ratio; nk-rule; p-ratio; nk-rule; \\nspec_prior ok ok \\nvery_recom p-ratio; nk-rule; ok \\n\\nparents usual \\nrecommend \\nnot_recom ok \\npriority ok \\nrecommend threshold; p-ratio; nk-rule; \\nspec_prior ok \\nvery_recom ok \\noutput: [parents great_pret pretentious usual\\nrecommend \\nnot_recom 3.147222 3.097917 3.093750\\npriority 2.636364 3.000674 3.075364\\nrecommend NaN NaN NaN\\nspec_prior 3.345697 3.332278 3.317942\\nvery_recom NaN 2.227273 2.229592]\\ntimestamp: 2024-01-30T14:09:59.519976\\ncomments: []\\nexception: \\n\\nuid: output_3\\nstatus: pass\\ntype: table\\nproperties: {\\'method\\': \\'pivot_table\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 0, \\'p-ratio\\': 0, \\'nk-rule\\': 0, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [], \\'p-ratio\\': [], \\'nk-rule\\': [], \\'all-values-are-same\\': []}}\\ncommand: table = acro.pivot_table(\\nsummary: pass\\noutcome: mean std\\n children children\\nparents \\ngreat_pret ok ok\\npretentious ok ok\\nusual ok ok\\noutput: [ mean std\\n children children\\nparents \\ngreat_pret 3.138657 2.257859\\npretentious 3.106481 2.216308\\nusual 3.084722 2.175608]\\ntimestamp: 2024-01-30T14:09:59.637985\\ncomments: []\\nexception: \\n\\nuid: output_4\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'ols\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.ols(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ recommend R-squared: 0.001\\nDep. Variable: \\nModel: OLS Adj. R-squared: 0.00100\\nMethod: Least Squares F-statistic: 7.65200\\nDate: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\\nTime: 14:09:59 Log-Likelihood: -25124.00000\\nNo. Observations: 12960 AIC: 50250.00000\\nDf Residuals: 12958 BIC: 50270.00000\\nDf Model: 1 NaN NaN\\nCovariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\\nconst 2.2291 0.025 87.594 0.000 2.179 2.279\\nchildren 0.0184 0.007 2.766 0.006 0.005 0.031, 76792.958 Durbin-Watson: 2.884\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.890]\\ntimestamp: 2024-01-30T14:09:59.809927\\ncomments: []\\nexception: \\n\\nuid: output_5\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'olsr\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.olsr(formula=\"recommend ~ children\", data=new_df)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ recommend R-squared: 0.001\\nDep. Variable: \\nModel: OLS Adj. R-squared: 0.00100\\nMethod: Least Squares F-statistic: 7.65200\\nDate: Tue, 30 Jan 2024 Prob (F-statistic): 0.00568\\nTime: 14:09:59 Log-Likelihood: -25124.00000\\nNo. Observations: 12960 AIC: 50250.00000\\nDf Residuals: 12958 BIC: 50270.00000\\nDf Model: 1 NaN NaN\\nCovariance Type: nonrobust NaN NaN, coef std err t P>|t| [0.025 0.975]\\nIntercept 2.2291 0.025 87.594 0.000 2.179 2.279\\nchildren 0.0184 0.007 2.766 0.006 0.005 0.031, 76792.958 Durbin-Watson: 2.884\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1743.166\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.890]\\ntimestamp: 2024-01-30T14:09:59.899115\\ncomments: []\\nexception: \\n\\nuid: output_6\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'probit\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.probit(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ finance No. Observations: 12960\\nDep. Variable: \\nModel: Probit Df Residuals: 12958.00000\\nMethod: MLE Df Model: 1.00000\\nDate: Tue, 30 Jan 2024 Pseudo R-squ.: 0.00005\\nTime: 14:10:00 Log-Likelihood: -8982.70000\\nconverged: True LL-Null: -8983.20000\\nCovariance Type: nonrobust LLR p-value: 0.34360, coef std err z P>|z| [0.025 0.975]\\nconst 0.0146 0.019 0.771 0.441 -0.023 0.052\\nchildren -0.0047 0.005 -0.947 0.344 -0.014 0.005]\\ntimestamp: 2024-01-30T14:10:00.028113\\ncomments: []\\nexception: \\n\\nuid: output_7\\nstatus: pass\\ntype: regression\\nproperties: {\\'method\\': \\'logit\\', \\'dof\\': 12958.0}\\nsdc: {}\\ncommand: results = acro.logit(y, x)\\nsummary: pass; dof=12958.0 >= 10\\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [ finance No. Observations: 12960\\nDep. Variable: \\nModel: Logit Df Residuals: 12958.00000\\nMethod: MLE Df Model: 1.00000\\nDate: Tue, 30 Jan 2024 Pseudo R-squ.: 0.00005\\nTime: 14:10:00 Log-Likelihood: -8982.70000\\nconverged: True LL-Null: -8983.20000\\nCovariance Type: nonrobust LLR p-value: 0.34360, coef std err z P>|z| [0.025 0.975]\\nconst 0.0233 0.030 0.771 0.441 -0.036 0.083\\nchildren -0.0075 0.008 -0.947 0.344 -0.023 0.008]\\ntimestamp: 2024-01-30T14:10:00.163252\\ncomments: []\\nexception: \\n\\nuid: output_8\\nstatus: fail\\ntype: table\\nproperties: {\\'method\\': \\'surv_func\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 76, \\'p-ratio\\': 0, \\'nk-rule\\': 0, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], \\'p-ratio\\': [], \\'nk-rule\\': [], \\'all-values-are-same\\': []}}\\ncommand: safe_table = acro.surv_func(data.futime, data.death, output=\"table\")\\nsummary: fail; threshold: 76 cells suppressed; \\noutcome: Surv prob Surv prob SE num at risk num events\\nTime \\n51 ok ok ok ok\\n69 threshold; threshold; threshold; threshold; \\n85 threshold; threshold; threshold; threshold; \\n91 threshold; threshold; threshold; threshold; \\n115 threshold; threshold; threshold; threshold; \\n372 threshold; threshold; threshold; threshold; \\n667 threshold; threshold; threshold; threshold; \\n874 threshold; threshold; threshold; threshold; \\n1039 threshold; threshold; threshold; threshold; \\n1046 threshold; threshold; threshold; threshold; \\n1281 threshold; threshold; threshold; threshold; \\n1286 threshold; threshold; threshold; threshold; \\n1326 threshold; threshold; threshold; threshold; \\n1355 threshold; threshold; threshold; threshold; \\n1626 threshold; threshold; threshold; threshold; \\n1903 threshold; threshold; threshold; threshold; \\n1914 threshold; threshold; threshold; threshold; \\n2776 threshold; threshold; threshold; threshold; \\n2851 threshold; threshold; threshold; threshold; \\n3309 threshold; threshold; threshold; threshold; \\noutput: [ Surv prob Surv prob SE num at risk num events\\nTime \\n51 0.95 0.048734 20.0 1.0\\n69 NaN NaN NaN NaN\\n85 NaN NaN NaN NaN\\n91 NaN NaN NaN NaN\\n115 NaN NaN NaN NaN\\n372 NaN NaN NaN NaN\\n667 NaN NaN NaN NaN\\n874 NaN NaN NaN NaN\\n1039 NaN NaN NaN NaN\\n1046 NaN NaN NaN NaN\\n1281 NaN NaN NaN NaN\\n1286 NaN NaN NaN NaN\\n1326 NaN NaN NaN NaN\\n1355 NaN NaN NaN NaN\\n1626 NaN NaN NaN NaN\\n1903 NaN NaN NaN NaN\\n1914 NaN NaN NaN NaN\\n2776 NaN NaN NaN NaN\\n2851 NaN NaN NaN NaN\\n3309 NaN NaN NaN NaN]\\ntimestamp: 2024-01-30T14:10:00.984548\\ncomments: []\\nexception: \\n\\nuid: output_9\\nstatus: fail\\ntype: survival plot\\nproperties: {\\'method\\': \\'surv_func\\'}\\nsdc: {\\'summary\\': {\\'suppressed\\': True, \\'negative\\': 0, \\'missing\\': 0, \\'threshold\\': 76, \\'p-ratio\\': 0, \\'nk-rule\\': 0, \\'all-values-are-same\\': 0}, \\'cells\\': {\\'negative\\': [], \\'missing\\': [], \\'threshold\\': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], \\'p-ratio\\': [], \\'nk-rule\\': [], \\'all-values-are-same\\': []}}\\ncommand: safe_plot = acro.surv_func(\\nsummary: fail; threshold: 76 cells suppressed; \\noutcome: Empty DataFrame\\nColumns: []\\nIndex: []\\noutput: [\\'acro_artifacts\\\\\\\\kaplan-mier_0.png\\']\\ntimestamp: 2024-01-30T14:10:01.208677\\ncomments: []\\nexception: \\n\\n'"
]
},
"execution_count": 22,
@@ -1788,7 +1782,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 4, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 0], [2, 1], [2, 2], [4, 0]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.recommend, df.parents)\n",
"summary: fail; threshold: 4 cells may need suppressing; \n",
"outcome: parents great_pret pretentious usual\n",
@@ -1805,7 +1799,7 @@
"recommend 0 0 2\n",
"spec_prior 2022 1264 758\n",
"very_recom 0 132 196]\n",
- "timestamp: 2023-10-30T20:16:58.903118\n",
+ "timestamp: 2024-01-30T14:09:59.381804\n",
"comments: ['Please let me have this data.', '6 cells were suppressed in this table']\n",
"exception: \n",
"\n",
@@ -1817,7 +1811,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'surv_func'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.surv_func(data.futime, data.death, output=\"table\")\n",
"summary: fail; threshold: 76 cells suppressed; \n",
"outcome: Surv prob Surv prob SE num at risk num events\n",
@@ -1864,7 +1858,7 @@
"2776 NaN NaN NaN NaN\n",
"2851 NaN NaN NaN NaN\n",
"3309 NaN NaN NaN NaN]\n",
- "timestamp: 2023-10-30T20:17:00.689719\n",
+ "timestamp: 2024-01-30T14:10:00.984548\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1876,14 +1870,14 @@
"status: fail\n",
"type: survival plot\n",
"properties: {'method': 'surv_func'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 76, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [6, 0], [6, 1], [6, 2], [6, 3], [7, 0], [7, 1], [7, 2], [7, 3], [8, 0], [8, 1], [8, 2], [8, 3], [9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [10, 3], [11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [14, 3], [15, 0], [15, 1], [15, 2], [15, 3], [16, 0], [16, 1], [16, 2], [16, 3], [17, 0], [17, 1], [17, 2], [17, 3], [18, 0], [18, 1], [18, 2], [18, 3], [19, 0], [19, 1], [19, 2], [19, 3]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_plot = acro.surv_func(\n",
"summary: fail; threshold: 76 cells suppressed; \n",
"outcome: Empty DataFrame\n",
"Columns: []\n",
"Index: []\n",
- "output: ['acro_artifacts\\\\kaplan-mier_1.png']\n",
- "timestamp: 2023-10-30T20:17:00.946712\n",
+ "output: ['acro_artifacts\\\\kaplan-mier_0.png']\n",
+ "timestamp: 2024-01-30T14:10:01.208677\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1895,7 +1889,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 1, 'p-ratio': 4, 'nk-rule': 4}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 2]], 'p-ratio': [[2, 0], [2, 1], [2, 2], [4, 0]], 'nk-rule': [[2, 0], [2, 1], [2, 2], [4, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 1, 'p-ratio': 4, 'nk-rule': 4, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[2, 2]], 'p-ratio': [[2, 0], [2, 1], [2, 2], [4, 0]], 'nk-rule': [[2, 0], [2, 1], [2, 2], [4, 0]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.recommend, df.parents, values=df.children, aggfunc=\"mean\")\n",
"summary: fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \n",
"outcome: parents great_pret pretentious \\\n",
@@ -1915,12 +1909,12 @@
"very_recom ok \n",
"output: [parents great_pret pretentious usual\n",
"recommend \n",
- "not_recom 3.122222 3.095139 3.151389\n",
- "priority 2.565268 3.012129 3.147609\n",
+ "not_recom 3.147222 3.097917 3.093750\n",
+ "priority 2.636364 3.000674 3.075364\n",
"recommend NaN NaN NaN\n",
- "spec_prior 3.356578 3.314873 3.373351\n",
- "very_recom NaN 2.212121 2.193878]\n",
- "timestamp: 2023-10-30T20:16:59.076118\n",
+ "spec_prior 3.345697 3.332278 3.317942\n",
+ "very_recom NaN 2.227273 2.229592]\n",
+ "timestamp: 2024-01-30T14:09:59.519976\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -1939,7 +1933,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['XandY.jpeg']\n",
- "timestamp: 2023-10-30T20:17:01.249713\n",
+ "timestamp: 2024-01-30T14:10:01.468365\n",
"comments: ['This output is an image showing the relationship between X and Y']\n",
"exception: \n",
"\n",
@@ -1990,7 +1984,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['test_add_to_acro\\\\crosstab.pkl']\n",
- "timestamp: 2023-10-30T20:17:09.762867\n",
+ "timestamp: 2024-01-30T14:10:05.475682\n",
"comments: ['']\n",
"exception: \n",
"\n",
diff --git a/notebooks/test.ipynb b/notebooks/test.ipynb
index 84ea5eb..c7cc38a 100644
--- a/notebooks/test.ipynb
+++ b/notebooks/test.ipynb
@@ -63,7 +63,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "INFO:acro:version: 0.4.3\n",
+ "INFO:acro:version: 0.4.5\n",
"INFO:acro:config: {'safe_threshold': 10, 'safe_dof_threshold': 10, 'safe_nk_n': 2, 'safe_nk_k': 0.9, 'safe_pratio_p': 0.1, 'check_missing_values': False, 'survival_safe_threshold': 10, 'zeros_are_disclosive': True}\n",
"INFO:acro:automatic suppression: False\n"
]
@@ -713,7 +713,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 10,
"id": "ef42beb6",
"metadata": {},
"outputs": [
@@ -721,7 +721,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "INFO:acro:Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\n",
+ "INFO:acro:Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
"INFO:acro:get_summary(): fail; threshold: 14 cells may need suppressing; p-ratio: 8 cells may need suppressing; nk-rule: 7 cells may need suppressing; \n",
"INFO:acro:outcome_df:\n",
"------------------------------------------------------------------------------------------------------------------------------------------------|\n",
@@ -783,7 +789,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 11,
"id": "506135e0",
"metadata": {},
"outputs": [],
@@ -801,7 +807,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 12,
"id": "4ae844a0",
"metadata": {},
"outputs": [
@@ -918,7 +924,7 @@
"2015 11133433.0 146572.187500 10812888.0 18278624.0"
]
},
- "execution_count": 11,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -938,7 +944,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 13,
"id": "fb7abfc9-e428-4b71-9066-01ac9a08d655",
"metadata": {},
"outputs": [
@@ -1151,7 +1157,7 @@
"All 2.405324e+07 "
]
},
- "execution_count": 12,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -1180,7 +1186,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 14,
"id": "bf132239",
"metadata": {},
"outputs": [
@@ -1315,7 +1321,7 @@
"All 11412787.0 136158.859375 8006361.0 16648273.0 5968295.5"
]
},
- "execution_count": 13,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -1334,7 +1340,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 15,
"id": "7cc417a0",
"metadata": {},
"outputs": [],
@@ -1352,7 +1358,7 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 16,
"id": "15bcdc7c",
"metadata": {},
"outputs": [
@@ -1373,7 +1379,13 @@
"2014 | | negative | negative | |\n",
"2015 | | negative | negative | |\n",
"----------------------------------------|\n",
- "\n",
+ "\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
"INFO:acro:records:add(): output_6\n"
]
},
@@ -1469,7 +1481,7 @@
"2015 11133433.0 146572.015625 10388612.0 18278624.0"
]
},
- "execution_count": 15,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -1492,7 +1504,7 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 17,
"id": "b13b5f7e",
"metadata": {},
"outputs": [
@@ -1640,7 +1652,7 @@
"All 839788672.0 4.888204e+09 "
]
},
- "execution_count": 16,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -2068,10 +2080,10 @@
" Method: | Least Squares | F-statistic: | 2261. | \n",
"\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Prob (F-statistic): | 0.00 | \n",
+ " Date: | Wed, 07 Feb 2024 | Prob (F-statistic): | 0.00 | \n",
"
\n",
"\n",
- " Time: | 20:02:31 | Log-Likelihood: | -14495. | \n",
+ " Time: | 18:17:39 | Log-Likelihood: | -14495. | \n",
"
\n",
"\n",
" No. Observations: | 811 | AIC: | 2.900e+04 | \n",
@@ -2126,8 +2138,8 @@
"Dep. Variable: inc_activity R-squared: 0.894\n",
"Model: OLS Adj. R-squared: 0.893\n",
"Method: Least Squares F-statistic: 2261.\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00\n",
- "Time: 20:02:31 Log-Likelihood: -14495.\n",
+ "Date: Wed, 07 Feb 2024 Prob (F-statistic): 0.00\n",
+ "Time: 18:17:39 Log-Likelihood: -14495.\n",
"No. Observations: 811 AIC: 2.900e+04\n",
"Df Residuals: 807 BIC: 2.902e+04\n",
"Df Model: 3 \n",
@@ -2213,10 +2225,10 @@
" Method: | Least Squares | F-statistic: | 2261. | \n",
"
\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Prob (F-statistic): | 0.00 | \n",
+ " Date: | Wed, 07 Feb 2024 | Prob (F-statistic): | 0.00 | \n",
"
\n",
"\n",
- " Time: | 20:02:32 | Log-Likelihood: | -14495. | \n",
+ " Time: | 18:17:39 | Log-Likelihood: | -14495. | \n",
"
\n",
"\n",
" No. Observations: | 811 | AIC: | 2.900e+04 | \n",
@@ -2271,8 +2283,8 @@
"Dep. Variable: inc_activity R-squared: 0.894\n",
"Model: OLS Adj. R-squared: 0.893\n",
"Method: Least Squares F-statistic: 2261.\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00\n",
- "Time: 20:02:32 Log-Likelihood: -14495.\n",
+ "Date: Wed, 07 Feb 2024 Prob (F-statistic): 0.00\n",
+ "Time: 18:17:39 Log-Likelihood: -14495.\n",
"No. Observations: 811 AIC: 2.900e+04\n",
"Df Residuals: 807 BIC: 2.902e+04\n",
"Df Model: 3 \n",
@@ -2328,13 +2340,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "INFO:acro:probit() outcome: pass; dof=806.0 >= 10\n"
- ]
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
+ "INFO:acro:probit() outcome: pass; dof=806.0 >= 10\n",
"INFO:acro:records:add(): output_13\n"
]
},
@@ -2362,10 +2368,10 @@
" Method: | MLE | Df Model: | 4 | \n",
"
\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Pseudo R-squ.: | 0.2140 | \n",
+ " Date: | Wed, 07 Feb 2024 | Pseudo R-squ.: | 0.2140 | \n",
"
\n",
"\n",
- " Time: | 20:02:32 | Log-Likelihood: | -400.46 | \n",
+ " Time: | 18:17:39 | Log-Likelihood: | -400.46 | \n",
"
\n",
"\n",
" converged: | True | LL-Null: | -509.50 | \n",
@@ -2403,8 +2409,8 @@
"Dep. Variable: survivor No. Observations: 811\n",
"Model: Probit Df Residuals: 806\n",
"Method: MLE Df Model: 4\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2140\n",
- "Time: 20:02:32 Log-Likelihood: -400.46\n",
+ "Date: Wed, 07 Feb 2024 Pseudo R-squ.: 0.2140\n",
+ "Time: 18:17:39 Log-Likelihood: -400.46\n",
"converged: True LL-Null: -509.50\n",
"Covariance Type: nonrobust LLR p-value: 4.875e-46\n",
"=================================================================================\n",
@@ -2459,7 +2465,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "INFO:acro:logit() outcome: pass; dof=806.0 >= 10\n",
+ "INFO:acro:logit() outcome: pass; dof=806.0 >= 10\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
"INFO:acro:records:add(): output_14\n"
]
},
@@ -2487,10 +2499,10 @@
" Method: | MLE | Df Model: | 4 | \n",
"
\n",
"\n",
- " Date: | Mon, 30 Oct 2023 | Pseudo R-squ.: | 0.2187 | \n",
+ " Date: | Wed, 07 Feb 2024 | Pseudo R-squ.: | 0.2187 | \n",
"
\n",
"\n",
- " Time: | 20:02:32 | Log-Likelihood: | -398.07 | \n",
+ " Time: | 18:17:39 | Log-Likelihood: | -398.07 | \n",
"
\n",
"\n",
" converged: | True | LL-Null: | -509.50 | \n",
@@ -2528,8 +2540,8 @@
"Dep. Variable: survivor No. Observations: 811\n",
"Model: Logit Df Residuals: 806\n",
"Method: MLE Df Model: 4\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2187\n",
- "Time: 20:02:32 Log-Likelihood: -398.07\n",
+ "Date: Wed, 07 Feb 2024 Pseudo R-squ.: 0.2187\n",
+ "Time: 18:17:39 Log-Likelihood: -398.07\n",
"converged: True LL-Null: -509.50\n",
"Covariance Type: nonrobust LLR p-value: 4.532e-47\n",
"=================================================================================\n",
@@ -2681,7 +2693,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 6, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 6, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.year, df.grant_type)\n",
"summary: fail; threshold: 6 cells may need suppressing; \n",
"outcome: grant_type G N R R/G\n",
@@ -2700,7 +2712,7 @@
"2013 15 59 71 8\n",
"2014 15 59 71 8\n",
"2015 15 59 71 8]\n",
- "timestamp: 2023-10-30T20:02:29.590617\n",
+ "timestamp: 2024-02-07T18:17:37.121926\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2708,7 +2720,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]]}}\n",
+ "sdc: {'summary': {'suppressed': True, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.year, df.grant_type, values=df.inc_grants, aggfunc=\"mean\")\n",
"summary: fail; threshold: 7 cells suppressed; p-ratio: 2 cells suppressed; nk-rule: 1 cells suppressed; \n",
"outcome: grant_type G N R R/G\n",
@@ -2727,7 +2739,7 @@
"2013 13557147.0 147937.796875 7202273.5 NaN\n",
"2014 13748147.0 133198.250000 8277525.0 NaN\n",
"2015 11133433.0 146572.187500 10812888.0 NaN]\n",
- "timestamp: 2023-10-30T20:02:29.862306\n",
+ "timestamp: 2024-02-07T18:17:37.329382\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2735,7 +2747,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 8, 'nk-rule': 7}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 0], [0, 2], [0, 5], [1, 0], [1, 5], [2, 0], [2, 5], [3, 0], [3, 5], [4, 0], [4, 5], [5, 0], [5, 1], [5, 5]], 'p-ratio': [[0, 0], [0, 2], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'nk-rule': [[0, 0], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 8, 'nk-rule': 7, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 0], [0, 2], [0, 5], [1, 0], [1, 5], [2, 0], [2, 5], [3, 0], [3, 5], [4, 0], [4, 5], [5, 0], [5, 1], [5, 5]], 'p-ratio': [[0, 0], [0, 2], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'nk-rule': [[0, 0], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'all-values-are-same': []}}\n",
"command: table = acro.crosstab(\n",
"summary: fail; threshold: 14 cells may need suppressing; p-ratio: 8 cells may need suppressing; nk-rule: 7 cells may need suppressing; \n",
"outcome: grant_type G N \\\n",
@@ -2780,7 +2792,7 @@
"2014 24 8 149 \n",
"2015 23 8 129 \n",
"All 139 44 815 ]\n",
- "timestamp: 2023-10-30T20:02:30.125307\n",
+ "timestamp: 2024-02-07T18:17:37.647788\n",
"comments: [\"Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\"]\n",
"exception: \n",
"\n",
@@ -2788,7 +2800,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.year, df.grant_type, values=df.inc_grants, aggfunc=\"mean\")\n",
"summary: fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n",
"outcome: grant_type G N R R/G\n",
@@ -2807,7 +2819,7 @@
"2013 13557147.0 147937.796875 7202273.5 16765625.0\n",
"2014 13748147.0 133198.250000 8277525.0 17845750.0\n",
"2015 11133433.0 146572.187500 10812888.0 18278624.0]\n",
- "timestamp: 2023-10-30T20:02:30.270516\n",
+ "timestamp: 2024-02-07T18:17:37.841705\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2815,7 +2827,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 4, 'nk-rule': 2}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [0, 6], [0, 8], [1, 3], [1, 8], [2, 3], [2, 8], [3, 3], [3, 8], [4, 3], [4, 8], [5, 3], [5, 8]], 'p-ratio': [[0, 1], [0, 3], [0, 6], [0, 8]], 'nk-rule': [[0, 3], [0, 8]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 4, 'nk-rule': 2, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [0, 6], [0, 8], [1, 3], [1, 8], [2, 3], [2, 8], [3, 3], [3, 8], [4, 3], [4, 8], [5, 3], [5, 8]], 'p-ratio': [[0, 1], [0, 3], [0, 6], [0, 8]], 'nk-rule': [[0, 3], [0, 8]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(\n",
"summary: fail; threshold: 14 cells may need suppressing; p-ratio: 4 cells may need suppressing; nk-rule: 2 cells may need suppressing; \n",
"outcome: mean \\\n",
@@ -2871,7 +2883,7 @@
"2014 2.641722e+07 \n",
"2015 2.784636e+07 \n",
"All 2.405324e+07 ]\n",
- "timestamp: 2023-10-30T20:02:30.560783\n",
+ "timestamp: 2024-02-07T18:17:38.177816\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2879,7 +2891,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(\n",
"summary: fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n",
"outcome: grant_type G N R R/G All\n",
@@ -2900,7 +2912,7 @@
"2014 13748147.0 135494.781250 8118565.5 17845750.0 6072600.0\n",
"2015 11133433.0 149143.625000 10596385.0 18278624.0 6442131.0\n",
"All 11412787.0 136158.859375 8006361.0 16648273.0 5968295.5]\n",
- "timestamp: 2023-10-30T20:02:30.762424\n",
+ "timestamp: 2024-02-07T18:17:38.466906\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2908,7 +2920,7 @@
"status: review\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 10, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [[0, 2], [1, 1], [1, 2], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2], [5, 1], [5, 2]], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 10, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [[0, 2], [1, 1], [1, 2], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2], [5, 1], [5, 2]], 'missing': [], 'threshold': [[0, 1], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3]], 'p-ratio': [[0, 1], [0, 3]], 'nk-rule': [[0, 3]], 'all-values-are-same': []}}\n",
"command: safe_table = acro.crosstab(df.year, df.grant_type, values=negative, aggfunc=\"mean\")\n",
"summary: review; negative values found\n",
"outcome: grant_type G N R R/G\n",
@@ -2927,7 +2939,7 @@
"2013 13557147.0 147937.625000 6988263.0 16765625.0\n",
"2014 13748147.0 133198.078125 7997392.0 17845750.0\n",
"2015 11133433.0 146572.015625 10388612.0 18278624.0]\n",
- "timestamp: 2023-10-30T20:02:30.998114\n",
+ "timestamp: 2024-02-07T18:17:38.727912\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2935,7 +2947,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5]], 'p-ratio': [[1, 0], [3, 0]], 'nk-rule': [[3, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5]], 'p-ratio': [[1, 0], [3, 0]], 'nk-rule': [[3, 0]], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n",
"outcome: inc_grants \\\n",
@@ -2972,7 +2984,7 @@
"R 551457280.0 3.134120e+09 \n",
"R/G 146228992.0 7.325240e+08 \n",
"All 839788672.0 4.888204e+09 ]\n",
- "timestamp: 2023-10-30T20:02:31.269418\n",
+ "timestamp: 2024-02-07T18:17:38.943781\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -2980,7 +2992,7 @@
"status: pass\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: pass\n",
"outcome: mean std\n",
@@ -2997,7 +3009,7 @@
"N 1.344319e+05 1.988737e+05\n",
"R 8.098502e+06 3.204495e+07\n",
"R/G 1.664827e+07 1.583532e+07]\n",
- "timestamp: 2023-10-30T20:02:31.502534\n",
+ "timestamp: 2024-02-07T18:17:39.107108\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3005,7 +3017,7 @@
"status: pass\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: pass\n",
"outcome: mean std\n",
@@ -3022,7 +3034,7 @@
"N 1.364700e+05 1.999335e+05\n",
"R 8.006361e+06 3.228216e+07\n",
"R/G 1.664827e+07 1.583532e+07]\n",
- "timestamp: 2023-10-30T20:02:31.628472\n",
+ "timestamp: 2024-02-07T18:17:39.221129\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3030,7 +3042,7 @@
"status: review\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: review; negative values found\n",
"outcome: mean std\n",
@@ -3047,7 +3059,7 @@
"N 1.341800e+05 1.990196e+05\n",
"R 7.882230e+06 3.204558e+07\n",
"R/G 1.664827e+07 1.583532e+07]\n",
- "timestamp: 2023-10-30T20:02:31.773039\n",
+ "timestamp: 2024-02-07T18:17:39.365207\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3065,8 +3077,8 @@
"Dep. Variable: \n",
"Model: OLS Adj. R-squared: 0.893\n",
"Method: Least Squares F-statistic: 2261.000\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.000\n",
- "Time: 20:02:31 Log-Likelihood: -14495.000\n",
+ "Date: Wed, 07 Feb 2024 Prob (F-statistic): 0.000\n",
+ "Time: 18:17:39 Log-Likelihood: -14495.000\n",
"No. Observations: 811 AIC: 29000.000\n",
"Df Residuals: 807 BIC: 29020.000\n",
"Df Model: 3 NaN NaN\n",
@@ -3079,7 +3091,7 @@
"Prob(Omnibus): 0.000 Jarque-Bera (JB): 1.253318e+06\n",
"Skew: 9.899 Prob(JB): 0.000000e+00\n",
"Kurtosis: 194.566 Cond. No. 1.050000e+08]\n",
- "timestamp: 2023-10-30T20:02:31.924170\n",
+ "timestamp: 2024-02-07T18:17:39.484206\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3097,8 +3109,8 @@
"Dep. Variable: \n",
"Model: OLS Adj. R-squared: 0.893\n",
"Method: Least Squares F-statistic: 2261.000\n",
- "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.000\n",
- "Time: 20:02:32 Log-Likelihood: -14495.000\n",
+ "Date: Wed, 07 Feb 2024 Prob (F-statistic): 0.000\n",
+ "Time: 18:17:39 Log-Likelihood: -14495.000\n",
"No. Observations: 811 AIC: 29000.000\n",
"Df Residuals: 807 BIC: 29020.000\n",
"Df Model: 3 NaN NaN\n",
@@ -3111,7 +3123,7 @@
"Prob(Omnibus): 0.000 Jarque-Bera (JB): 1.253318e+06\n",
"Skew: 9.899 Prob(JB): 0.000000e+00\n",
"Kurtosis: 194.566 Cond. No. 1.050000e+08]\n",
- "timestamp: 2023-10-30T20:02:32.026679\n",
+ "timestamp: 2024-02-07T18:17:39.580828\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3129,8 +3141,8 @@
"Dep. Variable: \n",
"Model: Probit Df Residuals: 8.060000e+02\n",
"Method: MLE Df Model: 4.000000e+00\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.140000e-01\n",
- "Time: 20:02:32 Log-Likelihood: -4.004600e+02\n",
+ "Date: Wed, 07 Feb 2024 Pseudo R-squ.: 2.140000e-01\n",
+ "Time: 18:17:39 Log-Likelihood: -4.004600e+02\n",
"converged: True LL-Null: -5.095000e+02\n",
"Covariance Type: nonrobust LLR p-value: 4.875000e-46, coef std err z P>|z| [0.025 \\\n",
"const 4.740000e-02 5.700000e-02 0.838 0.402 -6.300000e-02 \n",
@@ -3145,7 +3157,7 @@
"inc_grants 1.620000e-07 \n",
"inc_donations 3.300000e-07 \n",
"total_costs -1.440000e-08 ]\n",
- "timestamp: 2023-10-30T20:02:32.158679\n",
+ "timestamp: 2024-02-07T18:17:39.674825\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3163,8 +3175,8 @@
"Dep. Variable: \n",
"Model: Logit Df Residuals: 8.060000e+02\n",
"Method: MLE Df Model: 4.000000e+00\n",
- "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.187000e-01\n",
- "Time: 20:02:32 Log-Likelihood: -3.980700e+02\n",
+ "Date: Wed, 07 Feb 2024 Pseudo R-squ.: 2.187000e-01\n",
+ "Time: 18:17:39 Log-Likelihood: -3.980700e+02\n",
"converged: True LL-Null: -5.095000e+02\n",
"Covariance Type: nonrobust LLR p-value: 4.532000e-47, coef std err z P>|z| [0.025 \\\n",
"const 5.120000e-02 9.100000e-02 0.561 0.575 -1.280000e-01 \n",
@@ -3179,7 +3191,7 @@
"inc_grants 2.660000e-07 \n",
"inc_donations 7.160000e-07 \n",
"total_costs -2.150000e-08 ]\n",
- "timestamp: 2023-10-30T20:02:32.268680\n",
+ "timestamp: 2024-02-07T18:17:39.761361\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3194,7 +3206,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['acro_artifacts\\\\histogram_0.png']\n",
- "timestamp: 2023-10-30T20:02:32.526748\n",
+ "timestamp: 2024-02-07T18:17:40.007776\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3209,7 +3221,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['acro_artifacts\\\\histogram_1.png']\n",
- "timestamp: 2023-10-30T20:02:32.815177\n",
+ "timestamp: 2024-02-07T18:17:40.251684\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3386,7 +3398,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5]], 'p-ratio': [[1, 0], [3, 0]], 'nk-rule': [[3, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[1, 0], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5]], 'p-ratio': [[1, 0], [3, 0]], 'nk-rule': [[3, 0]], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n",
"outcome: inc_grants \\\n",
@@ -3423,19 +3435,25 @@
"R 551457280.0 3.134120e+09 \n",
"R/G 146228992.0 7.325240e+08 \n",
"All 839788672.0 4.888204e+09 ]\n",
- "timestamp: 2023-10-30T20:02:31.269418\n",
+ "timestamp: 2024-02-07T18:17:38.943781\n",
"comments: []\n",
"exception: \n",
"\n",
"The status of the record above is: fail.\n",
"Please explain why an exception should be granted.\n",
- "\n",
+ "\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
"INFO:acro:records:\n",
"uid: output_10\n",
"status: review\n",
"type: table\n",
"properties: {'method': 'pivot_table'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 0, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0, 'all-values-are-same': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [], 'threshold': [], 'p-ratio': [], 'nk-rule': [], 'all-values-are-same': []}}\n",
"command: table = acro.pivot_table(\n",
"summary: review; negative values found\n",
"outcome: mean std\n",
@@ -3452,7 +3470,7 @@
"N 1.341800e+05 1.990196e+05\n",
"R 7.882230e+06 3.204558e+07\n",
"R/G 1.664827e+07 1.583532e+07]\n",
- "timestamp: 2023-10-30T20:02:31.773039\n",
+ "timestamp: 2024-02-07T18:17:39.365207\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3471,7 +3489,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['acro_artifacts\\\\histogram_0.png']\n",
- "timestamp: 2023-10-30T20:02:32.526748\n",
+ "timestamp: 2024-02-07T18:17:40.007776\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3490,7 +3508,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['acro_artifacts\\\\histogram_1.png']\n",
- "timestamp: 2023-10-30T20:02:32.815177\n",
+ "timestamp: 2024-02-07T18:17:40.251684\n",
"comments: []\n",
"exception: \n",
"\n",
@@ -3502,7 +3520,7 @@
"status: fail\n",
"type: table\n",
"properties: {'method': 'crosstab'}\n",
- "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 8, 'nk-rule': 7}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 0], [0, 2], [0, 5], [1, 0], [1, 5], [2, 0], [2, 5], [3, 0], [3, 5], [4, 0], [4, 5], [5, 0], [5, 1], [5, 5]], 'p-ratio': [[0, 0], [0, 2], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'nk-rule': [[0, 0], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]}}\n",
+ "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 0, 'threshold': 14, 'p-ratio': 8, 'nk-rule': 7, 'all-values-are-same': 0}, 'cells': {'negative': [], 'missing': [], 'threshold': [[0, 0], [0, 2], [0, 5], [1, 0], [1, 5], [2, 0], [2, 5], [3, 0], [3, 5], [4, 0], [4, 5], [5, 0], [5, 1], [5, 5]], 'p-ratio': [[0, 0], [0, 2], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'nk-rule': [[0, 0], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]], 'all-values-are-same': []}}\n",
"command: table = acro.crosstab(\n",
"summary: fail; threshold: 14 cells may need suppressing; p-ratio: 8 cells may need suppressing; nk-rule: 7 cells may need suppressing; \n",
"outcome: grant_type G N \\\n",
@@ -3547,7 +3565,7 @@
"2014 24 8 149 \n",
"2015 23 8 129 \n",
"All 139 44 815 ]\n",
- "timestamp: 2023-10-30T20:02:30.125307\n",
+ "timestamp: 2024-02-07T18:17:37.647788\n",
"comments: [\"Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\"]\n",
"exception: \n",
"\n",
@@ -3566,7 +3584,7 @@
"Columns: []\n",
"Index: []\n",
"output: ['XandY.jpeg']\n",
- "timestamp: 2023-10-30T20:02:33.243177\n",
+ "timestamp: 2024-02-07T18:17:40.529687\n",
"comments: ['This output is an image showing the relationship between X and Y']\n",
"exception: \n",
"\n",
diff --git a/test/test_initial.py b/test/test_initial.py
index e01508e..ff717e2 100644
--- a/test/test_initial.py
+++ b/test/test_initial.py
@@ -41,6 +41,18 @@ def test_crosstab_without_suppression(data):
assert 48 == output.output[0]["R/G"].sum()
+def test_crosstab_with_aggfunc_mode(data):
+ """Crosstab threshold without automatic suppression."""
+ acro = ACRO(suppress=False)
+ _ = acro.crosstab(
+ data.year, data.grant_type, values=data.inc_grants, aggfunc="mode"
+ )
+ output = acro.results.get_index(0)
+ correct_summary: str = "fail; all-values-are-same: 1 cells may need suppressing; "
+ assert output.summary == correct_summary
+ assert 913000 == output.output[0]["R/G"].iat[0]
+
+
def test_crosstab_with_aggfunc_sum(data, acro):
"""Test the crosstab with two columns and aggfunc sum."""
acro = ACRO(suppress=False)