diff --git a/acro.R b/acro.R index ab57296..e536bcc 100644 --- a/acro.R +++ b/acro.R @@ -1,6 +1,7 @@ library(reticulate) # import Python modules library(admiraldev) -library(stringr) +library(png) +library(grid) acro <- import("acro") ac <- acro$ACRO() @@ -17,32 +18,32 @@ acro_table <- function(index, columns, dnn=NULL, deparse.level=0, ...) "ACRO crosstab without aggregation function" if (is.null(dnn)) { if (deparse.level == 0) { - rownames <- list("") - colnames <- list("") + row_names <- list("") + col_names <- list("") } else if (deparse.level == 1) { tryCatch({ index_symbol <- assert_symbol(substitute(index)) - rownames <- list(deparse(index_symbol))}, + row_names <- list(deparse(index_symbol))}, error = function(e) { - rownames <<- list("") + row_names <- list("") }) tryCatch({ column_symbol <- assert_symbol(substitute(columns)) - colnames <- list(deparse(column_symbol))}, + col_names <- list(deparse(column_symbol))}, error = function(e) { - colnames <<- list("") + col_names <- list("") }) } else if (deparse.level == 2) { - rownames <- list(deparse((substitute(index)))) - colnames <- list(deparse(substitute(columns))) + row_names <- list(deparse((substitute(index)))) + col_names <- list(deparse(substitute(columns))) } } else { - rownames <- list(dnn[1]) - colnames <- list(dnn[2]) + row_names <- list(dnn[1]) + col_names <- list(dnn[2]) } - table <- ac$crosstab(index, columns, rownames=rownames, colnames=colnames) + table <- ac$crosstab(index, columns, rownames=row_names, colnames=col_names) # Check for any unused arguments if (length(list(...)) > 0) { warning("Unused arguments were provided: ", paste0(names(list(...)), collapse = ", "), "\n", "To find more help about the function use: acro_help(\"acro_table\")\n") @@ -77,6 +78,24 @@ acro_glm <- function(formula, data, family) model$summary() } +acro_hist <- function(data, column, breaks=10, freq=TRUE, col=NULL, filename="histogram.png"){ + "ACRO histogram" + histogram = ac$hist(data=data, column=column, bins=breaks, density=freq, color=col, filename=filename) + # Load the saved histogram + image <- readPNG(histogram) + grid.raster(image) +} + +acro_surv_func <- function(time, status, output, filename="kaplan-meier.png"){ + "Estimates the survival function. Produce either a plot of table" + results = ac$surv_func(time=time, status=status, output=output, filename=filename) + if (output=="plot"){ + # Loasd the saved survival plot + image <- readPNG(results[[2]]) + grid.raster(image) + } +} + acro_rename_output <- function(old, new) { "Rename an output" diff --git a/acro/acro_tables.py b/acro/acro_tables.py index 0318f36..86648ce 100644 --- a/acro/acro_tables.py +++ b/acro/acro_tables.py @@ -474,10 +474,10 @@ def surv_func( # pylint: disable=too-many-arguments,too-many-locals ) return table if output == "plot": - plot = self.survival_plot( + plot, filename = self.survival_plot( survival_table, survival_func, filename, status, sdc, command, summary ) - return plot + return (plot, filename) return None def survival_table( # pylint: disable=too-many-arguments,too-many-locals @@ -513,7 +513,22 @@ def survival_plot( # pylint: disable=too-many-arguments,too-many-locals logger.debug("Directory acro_artifacts created successfully") except FileExistsError: # pragma: no cover logger.debug("Directory acro_artifacts already exists") - plt.savefig(f"acro_artifacts/{filename}") + + # create a unique filename with number to avoid overwrite + filename, extension = os.path.splitext(filename) + if not extension: # pragma: no cover + logger.info("Please provide a valid file extension") + return + increment_number = 0 + while os.path.exists( + f"acro_artifacts/{filename}_{increment_number}{extension}" + ): + increment_number += 1 + unique_filename = f"acro_artifacts/{filename}_{increment_number}{extension}" + + # save the plot to the acro artifacts directory + plt.savefig(unique_filename) + # record output self.results.add( status=status, @@ -523,9 +538,9 @@ def survival_plot( # pylint: disable=too-many-arguments,too-many-locals command=command, summary=summary, outcome=pd.DataFrame(), - output=[os.path.normpath(filename)], + output=[os.path.normpath(unique_filename)], ) - return plot + return (plot, unique_filename) def hist( # pylint: disable=too-many-arguments,too-many-locals self, @@ -606,6 +621,9 @@ def hist( # pylint: disable=too-many-arguments,too-many-locals Returns ------- matplotlib.Axes + The histogram. + str + The name of the file where the histogram is saved. """ logger.debug("hist()") command: str = utils.get_command("hist()", stack()) @@ -715,6 +733,7 @@ def hist( # pylint: disable=too-many-arguments,too-many-locals outcome=pd.DataFrame(), output=[os.path.normpath(unique_filename)], ) + return unique_filename def create_crosstab_masks( # pylint: disable=too-many-arguments,too-many-locals diff --git a/notebooks/test-nursery.Rmd b/notebooks/test-nursery.Rmd index d1ce31d..a1e14bb 100644 --- a/notebooks/test-nursery.Rmd +++ b/notebooks/test-nursery.Rmd @@ -7,6 +7,7 @@ output: html_notebook # install.packages("haven") # install.packages("reticulate") # install.packages("farff") +# install.packages("survival") ``` ## Import Libraries @@ -67,7 +68,7 @@ table index = data[, c("recommend")] columns = data[, c("parents")] -table = acro_table(data[, c("recommend")], columns, dnn=c("rows", "columns"), deparse.level = 1, useNa = "no") +table = acro_table(index, columns, dnn= c("recommend", "parents"), deparse.level=0) ``` ```{r} @@ -94,6 +95,25 @@ table = acro_pivot_table(data, values=values, index=index, aggfunc=aggfunc) table ``` +### ACRO histogram + +```{r} +acro_hist(data, "children") +``` + +### ACRO survival analysis + +```{r} +data(package = "survival") + +# Load the lung dataset +data(lung) +#head(lung) + +acro_surv_func(time=lung$time, status=lung$status, output ="plot") +``` +``` + # Regression examples using ACRO Again there is an industry-standard package in python, this time called **statsmodels**. diff --git a/notebooks/test-nursery.ipynb b/notebooks/test-nursery.ipynb index fc426ad..1ac8c32 100644 --- a/notebooks/test-nursery.ipynb +++ b/notebooks/test-nursery.ipynb @@ -545,13 +545,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:get_summary(): fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ + "INFO:acro:get_summary(): fail; threshold: 1 cells suppressed; p-ratio: 4 cells suppressed; nk-rule: 4 cells suppressed; \n", "INFO:acro:outcome_df:\n", "------------------------------------------------------------------------------------|\n", "parents |great_pret |pretentious |usual |\n", @@ -573,11 +567,11 @@ "text": [ "parents great_pret pretentious usual\n", "recommend \n", - "not_recom 3.113194 3.122222 3.129167\n", - "priority 2.639860 3.018194 3.115904\n", + "not_recom 3.122222 3.095139 3.151389\n", + "priority 2.565268 3.012129 3.147609\n", "recommend NaN NaN NaN\n", - "spec_prior 3.302671 3.318829 3.408971\n", - "very_recom NaN 2.212121 2.163265\n" + "spec_prior 3.356578 3.314873 3.373351\n", + "very_recom NaN 2.212121 2.193878\n" ] } ], @@ -638,9 +632,9 @@ " mean std\n", " children children\n", "parents \n", - "great_pret 3.107870 2.213104\n", - "pretentious 3.116204 2.231749\n", - "usual 3.127546 2.245044\n" + "great_pret 3.121296 2.230648\n", + "pretentious 3.103935 2.216586\n", + "usual 3.144213 2.270397\n" ] } ], @@ -750,16 +744,16 @@ " Dep. Variable: recommend R-squared: 0.001 \n", "\n", "\n", - " Model: OLS Adj. R-squared: 0.000 \n", + " Model: OLS Adj. R-squared: 0.001 \n", "\n", "\n", - " Method: Least Squares F-statistic: 6.761 \n", + " Method: Least Squares F-statistic: 8.073 \n", "\n", "\n", - " Date: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933 \n", + " Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00450 \n", "\n", "\n", - " Time: 16:32:47 Log-Likelihood: -25124. \n", + " Time: 20:16:59 Log-Likelihood: -25124. \n", "\n", "\n", " No. Observations: 12960 AIC: 5.025e+04\n", @@ -779,24 +773,24 @@ " coef std err t P>|t| [0.025 0.975] \n", "\n", "\n", - " const 2.2327 0.025 87.939 0.000 2.183 2.282\n", + " const 2.2279 0.025 87.886 0.000 2.178 2.278\n", "\n", "\n", - " children 0.0172 0.007 2.600 0.009 0.004 0.030\n", + " children 0.0187 0.007 2.841 0.004 0.006 0.032\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", " \n", "\n", "\n", - " \n", + " \n", "\n", "
Omnibus: 76754.533 Durbin-Watson: 2.883Omnibus: 76817.981 Durbin-Watson: 2.883
Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.898Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901
Skew: -0.485 Prob(JB): 0.00
Kurtosis: 1.488 Cond. No. 6.89Kurtosis: 1.488 Cond. No. 6.90


Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified." ], @@ -806,10 +800,10 @@ " OLS Regression Results \n", "==============================================================================\n", "Dep. Variable: recommend R-squared: 0.001\n", - "Model: OLS Adj. R-squared: 0.000\n", - "Method: Least Squares F-statistic: 6.761\n", - "Date: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\n", - "Time: 16:32:47 Log-Likelihood: -25124.\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", "No. Observations: 12960 AIC: 5.025e+04\n", "Df Residuals: 12958 BIC: 5.027e+04\n", "Df Model: 1 \n", @@ -817,13 +811,13 @@ "==============================================================================\n", " coef std err t P>|t| [0.025 0.975]\n", "------------------------------------------------------------------------------\n", - "const 2.2327 0.025 87.939 0.000 2.183 2.282\n", - "children 0.0172 0.007 2.600 0.009 0.004 0.030\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", "==============================================================================\n", - "Omnibus: 76754.533 Durbin-Watson: 2.883\n", - "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\n", + "Omnibus: 76817.981 Durbin-Watson: 2.883\n", + "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n", "Skew: -0.485 Prob(JB): 0.00\n", - "Kurtosis: 1.488 Cond. No. 6.89\n", + "Kurtosis: 1.488 Cond. No. 6.90\n", "==============================================================================\n", "\n", "Notes:\n", @@ -889,10 +883,10 @@ " OLS Regression Results \n", "==============================================================================\n", "Dep. Variable: recommend R-squared: 0.001\n", - "Model: OLS Adj. R-squared: 0.000\n", - "Method: Least Squares F-statistic: 6.761\n", - "Date: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\n", - "Time: 16:32:47 Log-Likelihood: -25124.\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", "No. Observations: 12960 AIC: 5.025e+04\n", "Df Residuals: 12958 BIC: 5.027e+04\n", "Df Model: 1 \n", @@ -900,13 +894,13 @@ "==============================================================================\n", " coef std err t P>|t| [0.025 0.975]\n", "------------------------------------------------------------------------------\n", - "Intercept 2.2327 0.025 87.939 0.000 2.183 2.282\n", - "children 0.0172 0.007 2.600 0.009 0.004 0.030\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", "==============================================================================\n", - "Omnibus: 76754.533 Durbin-Watson: 2.883\n", - "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\n", + "Omnibus: 76817.981 Durbin-Watson: 2.883\n", + "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n", "Skew: -0.485 Prob(JB): 0.00\n", - "Kurtosis: 1.488 Cond. No. 6.89\n", + "Kurtosis: 1.488 Cond. No. 6.90\n", "==============================================================================\n", "\n", "Notes:\n", @@ -958,22 +952,22 @@ "output_type": "stream", "text": [ "Optimization terminated successfully.\n", - " Current function value: 0.693140\n", + " Current function value: 0.693146\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: Wed, 11 Oct 2023 Pseudo R-squ.: 1.103e-05\n", - "Time: 16:32:47 Log-Likelihood: -8983.1\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.142e-06\n", + "Time: 20:16:59 Log-Likelihood: -8983.2\n", "converged: True LL-Null: -8983.2\n", - "Covariance Type: nonrobust LLR p-value: 0.6562\n", + "Covariance Type: nonrobust LLR p-value: 0.8445\n", "==============================================================================\n", " coef std err z P>|z| [0.025 0.975]\n", "------------------------------------------------------------------------------\n", - "const 0.0069 0.019 0.362 0.717 -0.030 0.044\n", - "children -0.0022 0.005 -0.445 0.656 -0.012 0.007\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", "==============================================================================\n" ] } @@ -1018,7 +1012,13 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:logit() outcome: pass; dof=12958.0 >= 10\n", + "INFO:acro:logit() outcome: pass; dof=12958.0 >= 10\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ "INFO:acro:records:add(): output_7\n" ] }, @@ -1027,7 +1027,7 @@ "output_type": "stream", "text": [ "Optimization terminated successfully.\n", - " Current function value: 0.693140\n", + " Current function value: 0.693146\n", " Iterations 3\n" ] }, @@ -1046,16 +1046,16 @@ " Method: MLE Df Model: 1 \n", "\n", "\n", - " Date: Wed, 11 Oct 2023 Pseudo R-squ.: 1.103e-05\n", + " Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.141e-06\n", "\n", "\n", - " Time: 16:32:48 Log-Likelihood: -8983.1 \n", + " Time: 20:16:59 Log-Likelihood: -8983.2 \n", "\n", "\n", " converged: True LL-Null: -8983.2 \n", "\n", "\n", - " Covariance Type: nonrobust LLR p-value: 0.6562 \n", + " Covariance Type: nonrobust LLR p-value: 0.8445 \n", "\n", "\n", "\n", @@ -1063,10 +1063,10 @@ " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "
coef std err z P>|z| [0.025 0.975]
const 0.0109 0.030 0.362 0.717 -0.048 0.070const -0.0048 0.030 -0.159 0.873 -0.064 0.054
children -0.0035 0.008 -0.445 0.656 -0.019 0.012children 0.0015 0.008 0.196 0.844 -0.014 0.017
" ], @@ -1078,15 +1078,15 @@ "Dep. Variable: finance No. Observations: 12960\n", "Model: Logit Df Residuals: 12958\n", "Method: MLE Df Model: 1\n", - "Date: Wed, 11 Oct 2023 Pseudo R-squ.: 1.103e-05\n", - "Time: 16:32:48 Log-Likelihood: -8983.1\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.141e-06\n", + "Time: 20:16:59 Log-Likelihood: -8983.2\n", "converged: True LL-Null: -8983.2\n", - "Covariance Type: nonrobust LLR p-value: 0.6562\n", + "Covariance Type: nonrobust LLR p-value: 0.8445\n", "==============================================================================\n", " coef std err z P>|z| [0.025 0.975]\n", "------------------------------------------------------------------------------\n", - "const 0.0109 0.030 0.362 0.717 -0.048 0.070\n", - "children -0.0035 0.008 -0.445 0.656 -0.019 0.012\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", "==============================================================================\n", "\"\"\"" ] @@ -1254,7 +1254,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Axes(0.125,0.11;0.775x0.77)\n" + "(, 'acro_artifacts/kaplan-mier_1.png')\n" ] }, { @@ -1326,7 +1326,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-11T16:32:46.939391\n", + "timestamp: 2023-10-30T20:16:58.817104\n", "comments: []\n", "exception: \n", "\n", @@ -1351,7 +1351,7 @@ "recommend 0 0 2\n", "spec_prior 2022 1264 758\n", "very_recom 0 132 196]\n", - "timestamp: 2023-10-11T16:32:47.027677\n", + "timestamp: 2023-10-30T20:16:58.903118\n", "comments: []\n", "exception: \n", "\n", @@ -1379,12 +1379,12 @@ "very_recom ok \n", "output: [parents great_pret pretentious usual\n", "recommend \n", - "not_recom 3.113194 3.122222 3.129167\n", - "priority 2.639860 3.018194 3.115904\n", + "not_recom 3.122222 3.095139 3.151389\n", + "priority 2.565268 3.012129 3.147609\n", "recommend NaN NaN NaN\n", - "spec_prior 3.302671 3.318829 3.408971\n", - "very_recom NaN 2.212121 2.163265]\n", - "timestamp: 2023-10-11T16:32:47.271746\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", "comments: []\n", "exception: \n", "\n", @@ -1404,10 +1404,10 @@ "output: [ mean std\n", " children children\n", "parents \n", - "great_pret 3.107870 2.213104\n", - "pretentious 3.116204 2.231749\n", - "usual 3.127546 2.245044]\n", - "timestamp: 2023-10-11T16:32:47.488533\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", "comments: []\n", "exception: \n", "\n", @@ -1421,23 +1421,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.00000\n", - "Method: Least Squares F-statistic: 6.76100\n", - "Date: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\n", - "Time: 16:32:47 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.2327 0.025 87.939 0.000 2.183 2.282\n", - "children 0.0172 0.007 2.600 0.009 0.004 0.030, 76754.533 Durbin-Watson: 2.883\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", "Omnibus: \n", - "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\n", + "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n", "Skew: -0.485 Prob(JB): 0.000\n", - "Kurtosis: 1.488 Cond. No. 6.890]\n", - "timestamp: 2023-10-11T16:32:47.713988\n", + "Kurtosis: 1.488 Cond. No. 6.900]\n", + "timestamp: 2023-10-30T20:16:59.403117\n", "comments: []\n", "exception: \n", "\n", @@ -1451,23 +1451,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.00000\n", - "Method: Least Squares F-statistic: 6.76100\n", - "Date: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\n", - "Time: 16:32:47 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.2327 0.025 87.939 0.000 2.183 2.282\n", - "children 0.0172 0.007 2.600 0.009 0.004 0.030, 76754.533 Durbin-Watson: 2.883\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", "Omnibus: \n", - "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\n", + "Prob(Omnibus): 0.000 Jarque-Bera (JB): 1742.901\n", "Skew: -0.485 Prob(JB): 0.000\n", - "Kurtosis: 1.488 Cond. No. 6.890]\n", - "timestamp: 2023-10-11T16:32:47.823980\n", + "Kurtosis: 1.488 Cond. No. 6.900]\n", + "timestamp: 2023-10-30T20:16:59.510245\n", "comments: []\n", "exception: \n", "\n", @@ -1485,13 +1485,13 @@ "Dep. Variable: \n", "Model: Probit Df Residuals: 12958.000000\n", "Method: MLE Df Model: 1.000000\n", - "Date: Wed, 11 Oct 2023 Pseudo R-squ.: 0.000011\n", - "Time: 16:32:47 Log-Likelihood: -8983.100000\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.656200, coef std err z P>|z| [0.025 0.975]\n", - "const 0.0069 0.019 0.362 0.717 -0.030 0.044\n", - "children -0.0022 0.005 -0.445 0.656 -0.012 0.007]\n", - "timestamp: 2023-10-11T16:32:47.969095\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", "comments: []\n", "exception: \n", "\n", @@ -1509,13 +1509,13 @@ "Dep. Variable: \n", "Model: Logit Df Residuals: 12958.000000\n", "Method: MLE Df Model: 1.000000\n", - "Date: Wed, 11 Oct 2023 Pseudo R-squ.: 0.000011\n", - "Time: 16:32:48 Log-Likelihood: -8983.100000\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.656200, coef std err z P>|z| [0.025 0.975]\n", - "const 0.0109 0.030 0.362 0.717 -0.048 0.070\n", - "children -0.0035 0.008 -0.445 0.656 -0.019 0.012]\n", - "timestamp: 2023-10-11T16:32:48.094164\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", "comments: []\n", "exception: \n", "\n", @@ -1570,7 +1570,7 @@ "2776 NaN NaN NaN NaN\n", "2851 NaN NaN NaN NaN\n", "3309 NaN NaN NaN NaN]\n", - "timestamp: 2023-10-11T16:32:49.135017\n", + "timestamp: 2023-10-30T20:17:00.689719\n", "comments: []\n", "exception: \n", "\n", @@ -1584,8 +1584,8 @@ "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", - "output: ['kaplan-mier.png']\n", - "timestamp: 2023-10-11T16:32:49.479216\n", + "output: ['acro_artifacts\\\\kaplan-mier_1.png']\n", + "timestamp: 2023-10-30T20:17:00.946712\n", "comments: []\n", "exception: \n", "\n", @@ -1595,7 +1595,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-11T16:32:46.939391\\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-11T16:32:47.027677\\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.113194 3.122222 3.129167\\npriority 2.639860 3.018194 3.115904\\nrecommend NaN NaN NaN\\nspec_prior 3.302671 3.318829 3.408971\\nvery_recom NaN 2.212121 2.163265]\\ntimestamp: 2023-10-11T16:32:47.271746\\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.107870 2.213104\\npretentious 3.116204 2.231749\\nusual 3.127546 2.245044]\\ntimestamp: 2023-10-11T16:32:47.488533\\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.00000\\nMethod: Least Squares F-statistic: 6.76100\\nDate: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\\nTime: 16:32:47 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.2327 0.025 87.939 0.000 2.183 2.282\\nchildren 0.0172 0.007 2.600 0.009 0.004 0.030, 76754.533 Durbin-Watson: 2.883\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.890]\\ntimestamp: 2023-10-11T16:32:47.713988\\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.00000\\nMethod: Least Squares F-statistic: 6.76100\\nDate: Wed, 11 Oct 2023 Prob (F-statistic): 0.00933\\nTime: 16:32:47 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.2327 0.025 87.939 0.000 2.183 2.282\\nchildren 0.0172 0.007 2.600 0.009 0.004 0.030, 76754.533 Durbin-Watson: 2.883\\nOmnibus: \\nProb(Omnibus): 0.000 Jarque-Bera (JB): 1742.898\\nSkew: -0.485 Prob(JB): 0.000\\nKurtosis: 1.488 Cond. No. 6.890]\\ntimestamp: 2023-10-11T16:32:47.823980\\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: Wed, 11 Oct 2023 Pseudo R-squ.: 0.000011\\nTime: 16:32:47 Log-Likelihood: -8983.100000\\nconverged: True LL-Null: -8983.200000\\nCovariance Type: nonrobust LLR p-value: 0.656200, coef std err z P>|z| [0.025 0.975]\\nconst 0.0069 0.019 0.362 0.717 -0.030 0.044\\nchildren -0.0022 0.005 -0.445 0.656 -0.012 0.007]\\ntimestamp: 2023-10-11T16:32:47.969095\\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: Wed, 11 Oct 2023 Pseudo R-squ.: 0.000011\\nTime: 16:32:48 Log-Likelihood: -8983.100000\\nconverged: True LL-Null: -8983.200000\\nCovariance Type: nonrobust LLR p-value: 0.656200, coef std err z P>|z| [0.025 0.975]\\nconst 0.0109 0.030 0.362 0.717 -0.048 0.070\\nchildren -0.0035 0.008 -0.445 0.656 -0.019 0.012]\\ntimestamp: 2023-10-11T16:32:48.094164\\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-11T16:32:49.135017\\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: [\\'kaplan-mier.png\\']\\ntimestamp: 2023-10-11T16:32:49.479216\\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}, \\'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'" ] }, "execution_count": 22, @@ -1805,7 +1805,7 @@ "recommend 0 0 2\n", "spec_prior 2022 1264 758\n", "very_recom 0 132 196]\n", - "timestamp: 2023-10-11T16:32:47.027677\n", + "timestamp: 2023-10-30T20:16:58.903118\n", "comments: ['Please let me have this data.', '6 cells were suppressed in this table']\n", "exception: \n", "\n", @@ -1864,7 +1864,7 @@ "2776 NaN NaN NaN NaN\n", "2851 NaN NaN NaN NaN\n", "3309 NaN NaN NaN NaN]\n", - "timestamp: 2023-10-11T16:32:49.135017\n", + "timestamp: 2023-10-30T20:17:00.689719\n", "comments: []\n", "exception: \n", "\n", @@ -1882,8 +1882,8 @@ "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", - "output: ['kaplan-mier.png']\n", - "timestamp: 2023-10-11T16:32:49.479216\n", + "output: ['acro_artifacts\\\\kaplan-mier_1.png']\n", + "timestamp: 2023-10-30T20:17:00.946712\n", "comments: []\n", "exception: \n", "\n", @@ -1915,12 +1915,12 @@ "very_recom ok \n", "output: [parents great_pret pretentious usual\n", "recommend \n", - "not_recom 3.113194 3.122222 3.129167\n", - "priority 2.639860 3.018194 3.115904\n", + "not_recom 3.122222 3.095139 3.151389\n", + "priority 2.565268 3.012129 3.147609\n", "recommend NaN NaN NaN\n", - "spec_prior 3.302671 3.318829 3.408971\n", - "very_recom NaN 2.212121 2.163265]\n", - "timestamp: 2023-10-11T16:32:47.271746\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", "comments: []\n", "exception: \n", "\n", @@ -1939,7 +1939,7 @@ "Columns: []\n", "Index: []\n", "output: ['XandY.jpeg']\n", - "timestamp: 2023-10-11T16:32:49.757662\n", + "timestamp: 2023-10-30T20:17:01.249713\n", "comments: ['This output is an image showing the relationship between X and Y']\n", "exception: \n", "\n", @@ -1990,7 +1990,7 @@ "Columns: []\n", "Index: []\n", "output: ['test_add_to_acro\\\\crosstab.pkl']\n", - "timestamp: 2023-10-11T16:32:55.320162\n", + "timestamp: 2023-10-30T20:17:09.762867\n", "comments: ['']\n", "exception: \n", "\n", diff --git a/notebooks/test.ipynb b/notebooks/test.ipynb index 3a30abe..bb20099 100644 --- a/notebooks/test.ipynb +++ b/notebooks/test.ipynb @@ -1175,7 +1175,7 @@ "- In this version of acro checking the disclosiveness of an output with missing values is not supported.\n", "- The status of the command will be \"review\" to indicate that the output needs to be checked by the output checker to review if the output is disclosive or not.\n", "- In the outcome_df each cell with missing value/values will be shown as missing.\n", - "- The output table will not be suppressed even if the suppress=True." + "- The output hist will not be suppressed even if the suppress=True." ] }, { @@ -1188,20 +1188,20 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:get_summary(): review; missing values found\n", + "INFO:acro:get_summary(): fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n", "INFO:acro:outcome_df:\n", - "-------------------------------------------------------|\n", - "grant_type |G |N |R |R/G |All|\n", - "year | | | | | |\n", - "-------------------------------------------------------|\n", - "2010 | missing | missing | missing | missing | |\n", - "2011 | | missing | missing | | |\n", - "2012 | | | missing | | |\n", - "2013 | | missing | missing | | |\n", - "2014 | | missing | missing | | |\n", - "2015 | missing | missing | missing | | |\n", - "All | | | | | |\n", - "-------------------------------------------------------|\n", + "--------------------------------------------------------------------------------|\n", + "grant_type |G |N |R |R/G |All|\n", + "year | | | | | |\n", + "--------------------------------------------------------------------------------|\n", + "2010 | ok | threshold; p-ratio; | ok | threshold; p-ratio; nk-rule; | ok|\n", + "2011 | ok | ok | ok | threshold; | ok|\n", + "2012 | ok | ok | ok | threshold; | ok|\n", + "2013 | ok | ok | ok | threshold; | ok|\n", + "2014 | ok | ok | ok | threshold; | ok|\n", + "2015 | ok | ok | ok | threshold; | ok|\n", + "All | ok | ok | ok | ok | ok|\n", + "--------------------------------------------------------------------------------|\n", "\n", "INFO:acro:records:add(): output_5\n" ] @@ -1321,7 +1321,7 @@ } ], "source": [ - "acro_tables.CHECK_MISSING_VALUES = True\n", + "utils.CHECK_MISSING_VALUES = True\n", "\n", "missing = df.inc_grants.copy()\n", "missing[0:10] = np.NaN\n", @@ -1500,19 +1500,19 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:get_summary(): review; missing values found\n", + "INFO:acro:get_summary(): fail; threshold: 7 cells may need suppressing; p-ratio: 2 cells may need suppressing; nk-rule: 1 cells may need suppressing; \n", "INFO:acro:outcome_df:\n", - "------------------------------------------------------------------|\n", - " inc_grants |\n", - "year 2010 2011 2012 2013 2014 2015 All|\n", - "grant_type |\n", - "------------------------------------------------------------------|\n", - "G missing missing |\n", - "N missing missing missing |\n", - "R missing missing missing missing missing |\n", - "R/G missing |\n", - "All |\n", - "------------------------------------------------------------------|\n", + "--------------------------------------------------------------------------------------------------------------|\n", + " inc_grants |\n", + "year 2010 2011 2012 2013 2014 2015 All|\n", + "grant_type |\n", + "--------------------------------------------------------------------------------------------------------------|\n", + "G ok ok ok ok ok ok ok|\n", + "N threshold; p-ratio; ok ok ok ok ok ok|\n", + "R ok ok ok ok ok ok ok|\n", + "R/G threshold; p-ratio; nk-rule; threshold; threshold; threshold; threshold; threshold; ok|\n", + "All ok ok ok ok ok ok ok|\n", + "--------------------------------------------------------------------------------------------------------------|\n", "\n", "INFO:acro:records:add(): output_7\n" ] @@ -1802,17 +1802,17 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:get_summary(): review; missing values found\n", + "INFO:acro:get_summary(): pass\n", "INFO:acro:outcome_df:\n", "---------------------------------|\n", " mean |std |\n", " inc_grants |inc_grants|\n", "grant_type | |\n", "---------------------------------|\n", - "G missing | missing |\n", - "N missing | missing |\n", - "R missing | missing |\n", - "R/G missing | missing |\n", + "G ok | ok |\n", + "N ok | ok |\n", + "R ok | ok |\n", + "R/G ok | ok |\n", "---------------------------------|\n", "\n", "INFO:acro:records:add(): output_8\n" @@ -1922,17 +1922,17 @@ "name": "stderr", "output_type": "stream", "text": [ - "INFO:acro:get_summary(): review; missing values found\n", + "INFO:acro:get_summary(): pass\n", "INFO:acro:outcome_df:\n", "---------------------------------|\n", " mean |std |\n", " inc_grants |inc_grants|\n", "grant_type | |\n", "---------------------------------|\n", - "G missing | missing |\n", - "N missing | missing |\n", - "R missing | missing |\n", - "R/G missing | missing |\n", + "G ok | ok |\n", + "N ok | ok |\n", + "R ok | ok |\n", + "R/G ok | ok |\n", "---------------------------------|\n", "\n", "INFO:acro:records:add(): output_9\n" @@ -2203,10 +2203,10 @@ " Method: Least Squares F-statistic: 2261. \n", "\n", "\n", - " Date: Wed, 18 Oct 2023 Prob (F-statistic): 0.00 \n", + " Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00 \n", "\n", "\n", - " Time: 10:45:22 Log-Likelihood: -14495. \n", + " Time: 20:02:31 Log-Likelihood: -14495. \n", "\n", "\n", " No. Observations: 811 AIC: 2.900e+04\n", @@ -2261,8 +2261,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: Wed, 18 Oct 2023 Prob (F-statistic): 0.00\n", - "Time: 10:45:22 Log-Likelihood: -14495.\n", + "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00\n", + "Time: 20:02:31 Log-Likelihood: -14495.\n", "No. Observations: 811 AIC: 2.900e+04\n", "Df Residuals: 807 BIC: 2.902e+04\n", "Df Model: 3 \n", @@ -2348,10 +2348,10 @@ " Method: Least Squares F-statistic: 2261. \n", "\n", "\n", - " Date: Wed, 18 Oct 2023 Prob (F-statistic): 0.00 \n", + " Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00 \n", "\n", "\n", - " Time: 10:45:22 Log-Likelihood: -14495. \n", + " Time: 20:02:32 Log-Likelihood: -14495. \n", "\n", "\n", " No. Observations: 811 AIC: 2.900e+04\n", @@ -2406,8 +2406,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: Wed, 18 Oct 2023 Prob (F-statistic): 0.00\n", - "Time: 10:45:22 Log-Likelihood: -14495.\n", + "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.00\n", + "Time: 20:02:32 Log-Likelihood: -14495.\n", "No. Observations: 811 AIC: 2.900e+04\n", "Df Residuals: 807 BIC: 2.902e+04\n", "Df Model: 3 \n", @@ -2497,10 +2497,10 @@ " Method: MLE Df Model: 4 \n", "\n", "\n", - " Date: Wed, 18 Oct 2023 Pseudo R-squ.: 0.2140 \n", + " Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2140 \n", "\n", "\n", - " Time: 10:45:22 Log-Likelihood: -400.46 \n", + " Time: 20:02:32 Log-Likelihood: -400.46 \n", "\n", "\n", " converged: True LL-Null: -509.50 \n", @@ -2538,8 +2538,8 @@ "Dep. Variable: survivor No. Observations: 811\n", "Model: Probit Df Residuals: 806\n", "Method: MLE Df Model: 4\n", - "Date: Wed, 18 Oct 2023 Pseudo R-squ.: 0.2140\n", - "Time: 10:45:22 Log-Likelihood: -400.46\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2140\n", + "Time: 20:02:32 Log-Likelihood: -400.46\n", "converged: True LL-Null: -509.50\n", "Covariance Type: nonrobust LLR p-value: 4.875e-46\n", "=================================================================================\n", @@ -2622,10 +2622,10 @@ " Method: MLE Df Model: 4 \n", "\n", "\n", - " Date: Wed, 18 Oct 2023 Pseudo R-squ.: 0.2187 \n", + " Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2187 \n", "\n", "\n", - " Time: 10:45:22 Log-Likelihood: -398.07 \n", + " Time: 20:02:32 Log-Likelihood: -398.07 \n", "\n", "\n", " converged: True LL-Null: -509.50 \n", @@ -2663,8 +2663,8 @@ "Dep. Variable: survivor No. Observations: 811\n", "Model: Logit Df Residuals: 806\n", "Method: MLE Df Model: 4\n", - "Date: Wed, 18 Oct 2023 Pseudo R-squ.: 0.2187\n", - "Time: 10:45:22 Log-Likelihood: -398.07\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 0.2187\n", + "Time: 20:02:32 Log-Likelihood: -398.07\n", "converged: True LL-Null: -509.50\n", "Covariance Type: nonrobust LLR p-value: 4.532e-47\n", "=================================================================================\n", @@ -2715,6 +2715,13 @@ "INFO:acro:records:add(): output_15\n" ] }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acro_artifacts/histogram_0.png\n" + ] + }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAHFCAYAAADYPwJEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA2+ElEQVR4nO3de3hU1b3/8U+uEwIkMUAm5BACeEECCohCRrEghESNHJFUi3IwIkIfTGghLSotxBBQNKcKxROhFyTYmqrYQpEiEKDEo1zkFsvFQ1GR1MokVUgCpAxDsn9/9JexMSCZkExWyPv1PPM87rXXXnutL8Pwcc+eGT/LsiwBAAAYxL+lJwAAAPBNBBQAAGAcAgoAADAOAQUAABiHgAIAAIxDQAEAAMYhoAAAAOMQUAAAgHEIKAAAwDgEFKCNyc/Pl5+fnz777LOWngoAXBQBBQAkvfzyy8rPz2/paQD4//z4LR6gbamurpbb7ZbNZpOfn19LT8cY/fr1U+fOnbV169aWngoAcQUFaHMCAgIUEhLSKsPJmTNnWnoKAHyEgAK0Md+8B6VHjx6655579N5772nw4MEKCQlRr1699Oqrr9Y7try8XDNmzFCPHj1ks9nUrVs3Pfzww/ryyy8bfP6amhplZ2crJiZGoaGhuuOOO3To0CH16NFDjzzySL15FhUV6fHHH1dUVJS6desmSTp27Jgef/xx9e7dW+3atVOnTp10//3317uvpnaM999/X5mZmerSpYvat2+v++67T//4xz88/Xr06KGDBw+qqKhIfn5+8vPz0/DhwyVJbrdbc+fO1bXXXquQkBB16tRJQ4cOVWFhYYPXDMB7gS09AQAt7+OPP9Z3v/tdTZo0SWlpaXrllVf0yCOPaNCgQerbt68k6fTp07r99tv10Ucf6dFHH9VNN92kL7/8UmvWrNHnn3+uzp07N+hcs2bNUm5urkaPHq3k5GR9+OGHSk5O1tmzZy/Y//HHH1eXLl2UlZXluYKya9cubdu2TePGjVO3bt302WefacmSJRo+fLgOHTqk0NDQOmNMmzZNV111lZ5++ml99tlnWrRokTIyMvTGG29IkhYtWqRp06apQ4cO+ulPfypJstvtkqTs7GwtWLBAjz32mAYPHqzKykrt3r1be/fu1ahRo7wvNoCGsQC0KcuXL7ckWUePHrUsy7Li4uIsSda7777r6VNWVmbZbDbrRz/6kactKyvLkmT94Q9/qDdmTU1Ng87tdDqtwMBAa8yYMXXas7OzLUlWWlpavXkOHTrUOn/+fJ3+VVVV9cbevn27Jcl69dVX642RmJhYZ44zZsywAgICrPLyck9b3759rWHDhtUbt3///lZKSkqD1geg6fAWDwDFx8fr9ttv92x36dJFvXv31qeffupp+/3vf6/+/fvrvvvuq3d8Q+9n2bx5s86fP6/HH3+8Tvu0adMueszkyZMVEBBQp61du3ae/3a73frqq690zTXXKCIiQnv37q03xpQpU+rM8fbbb1d1dbWOHTt2yTlHRETo4MGDOnLkyCX7Amg6BBQA6t69e722q666SidPnvRsf/LJJ+rXr99lnac2EFxzzTV12iMjI3XVVVdd8JiePXvWa/vnP/+prKwsxcbGymazqXPnzurSpYvKy8tVUVFRr/8311d7rn9f38Xk5OSovLxc1113nW644QbNnDlTf/nLXy55HIDLQ0ABUO8KRS3LgG8h+PerJbWmTZumZ555Rg888IDefPNNbdy4UYWFherUqZNqamrq9b+c9X3nO9/RJ598oldeeUX9+vXTr3/9a91000369a9/7f1iADQYN8kCaJCrr75aBw4cuKwx4uLiJP3rptx/vzLy1VdfNehqRq233npLaWlpeuGFFzxtZ8+eVXl5eaPn9m1vU0VGRmrixImaOHGiTp8+re985zvKzs7WY4891ujzAfh2XEEB0CCpqan68MMPtWrVqnr7GnqlZeTIkQoMDNSSJUvqtP/P//yPV3MJCAiod86XXnpJ1dXVXo3z79q3b3/BgPPVV1/V2e7QoYOuueYauVyuRp8LwKVxBQVAg8ycOVNvvfWW7r//fj366KMaNGiQTpw4oTVr1mjp0qXq37//Jcew2+364Q9/qBdeeEH/+Z//qTvvvFMffvih3nnnHXXu3LnBN9vec889+s1vfqPw8HDFx8dr+/bt2rRpkzp16tTo9Q0a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733ve1ZycnIzzuzK0pA6//nPf7YkWSdPnvTJnK5UZWVlliSrqKjoon14jW4aDam1r1+n29QVlHPnzmnPnj1KTEz0tPn7+ysxMVHbt2+/4DHbt2+v01+SkpOTL9ofjauzJJ0+fVpxcXGKjY3Vvffeq4MHD/pium0Kz2ffGjBggLp27apRo0bp/fffb+nptDoVFRWSpMjIyIv24TndNBpSa8m3r9NtKqB8+eWXqq6urvd1+na7/aLvDTudTq/6o3F17t27t1555RX98Y9/1G9/+1vV1NTo1ltv1eeff+6LKbcZF3s+V1ZW6p///GcLzerK07VrVy1dulS///3v9fvf/16xsbEaPny49u7d29JTazVqamo0ffp03XbbberXr99F+/EaffkaWmtfv0632G/xAP/O4XDU+SXrW2+9VX369NEvfvELzZs3rwVnBnivd+/e6t27t2f71ltv1SeffKKFCxfqN7/5TQvOrPVIT0/XgQMH9N5777X0VK54Da21r1+n29QVlM6dOysgIEClpaV12ktLSxUdHX3BY6Kjo73qj8bV+ZuCgoI0cOBAffzxx80xxTbrYs/nsLAwtWvXroVm1TYMHjyY53MDZWRkaO3atfrzn/+sbt26fWtfXqMvjze1/qbmfp1uUwElODhYgwYN0ubNmz1tNTU12rx5c51U+O8cDked/pJUWFh40f5oXJ2/qbq6Wvv371fXrl2ba5ptEs/nllNcXMzz+RIsy1JGRoZWrVqlLVu2qGfPnpc8hud04zSm1t/U7K/TPrsd1xCvv/66ZbPZrPz8fOvQoUPWlClTrIiICMvpdFqWZVkTJkywnnrqKU//999/3woMDLR+9rOfWR999JH19NNPW0FBQdb+/ftbagmtgrd1njt3rrVhwwbrk08+sfbs2WONGzfOCgkJsQ4ePNhSS2gVTp06Ze3bt8/at2+fJcl68cUXrX379lnHjh2zLMuynnrqKWvChAme/p9++qkVGhpqzZw50/roo4+svLw8KyAgwFq/fn1LLaFV8LbOCxcutFavXm0dOXLE2r9/v/XDH/7Q8vf3tzZt2tRSS2gVpk6daoWHh1tbt261jh8/7nlUVVV5+vAa3TQaU2tfv063uYBiWZb10ksvWd27d7eCg4OtwYMHWzt27PDsGzZsmJWWllan/5tvvmldd911VnBwsNW3b1/rT3/6k49n3Dp5U+fp06d7+trtduvuu++29u7d2wKzbl1qP876zUdtbdPS0qxhw4bVO2bAgAFWcHCw1atXL2v58uU+n3dr422dn3/+eevqq6+2QkJCrMjISGv48OHWli1bWmbyrciFaiypznOU1+im0Zha+/p12u//TxQAAMAYbeoeFAAA0DoQUAAAgHEIKAAAwDgEFAAAYBwCCgAAMA4BBQAAGIeAAgAAjENAAQAAkqR3331Xo0ePVkxMjPz8/LR69Wqvx9iwYYMSEhLUsWNHdenSRampqfrss8+8HoeAAgAAJElnzpxR//79lZeX16jjjx49qnvvvVcjRoxQcXGxNmzYoC+//FJjx471eiy+SRYAANTj5+enVatWacyYMZ42l8uln/70p/rd736n8vJy9evXT88//7yGDx8uSXrrrbf04IMPyuVyyd//X9dA3n77bd17771yuVwKCgpq8Pm5ggIAABokIyND27dv1+uvv66//OUvuv/++3XnnXfqyJEjkqRBgwbJ399fy5cvV3V1tSoqKvSb3/xGiYmJXoUTiSsoAADgAr55BaWkpES9evVSSUmJYmJiPP0SExM1ePBgPfvss5KkoqIiPfDAA/rqq69UXV0th8OhdevWKSIiwqvzcwUFAABc0v79+1VdXa3rrrtOHTp08DyKior0ySefSJKcTqcmT56stLQ07dq1S0VFRQoODtZ3v/tdeXs9JLA5FgEAAK4sp0+fVkBAgPbs2aOAgIA6+zp06CBJysvLU3h4uHJzcz37fvvb3yo2NlY7d+5UQkJCg89HQAEAAJc0cOBAVVdXq6ysTLfffvsF+1RVVXlujq1VG2Zqamq8Oh9v8QAAAEn/ukpSXFys4uJiSf/62HBxcbFKSkp03XXXafz48Xr44Yf1hz/8QUePHtUHH3ygBQsW6E9/+pMkKSUlRbt27VJOTo6OHDmivXv3auLEiYqLi9PAgQO9mgs3yQIAAEnS1q1bdccdd9RrT0tLU35+vtxut+bPn69XX31Vf//739W5c2clJCRo7ty5uuGGGyRJr7/+unJzc/XXv/5VoaGhcjgcev7553X99dd7NRcCCgAAMA5v8QAAAOMQUAAAgHEIKAAAwDgEFAAAYBwCCgAAMA4BBQAAGIeAAgAAjENAAQAAxiGgAAAA4xBQAACAcQgoAADAOP8Pvwsig2/29eUAAAAASUVORK5CYII=", @@ -2727,7 +2734,8 @@ } ], "source": [ - "hist = acro.hist(df, \"inc_grants\")" + "hist = acro.hist(df, \"inc_grants\")\n", + "print(hist)" ] }, { @@ -2827,7 +2835,7 @@ "2013 15 59 71 8\n", "2014 15 59 71 8\n", "2015 15 59 71 8]\n", - "timestamp: 2023-10-18T10:45:20.095974\n", + "timestamp: 2023-10-30T20:02:29.590617\n", "comments: []\n", "exception: \n", "\n", @@ -2854,7 +2862,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-18T10:45:20.272862\n", + "timestamp: 2023-10-30T20:02:29.862306\n", "comments: []\n", "exception: \n", "\n", @@ -2907,7 +2915,7 @@ "2014 24 8 149 \n", "2015 23 8 129 \n", "All 139 44 815 ]\n", - "timestamp: 2023-10-18T10:45:20.500344\n", + "timestamp: 2023-10-30T20:02:30.125307\n", "comments: [\"Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\"]\n", "exception: \n", "\n", @@ -2934,7 +2942,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-18T10:45:20.652740\n", + "timestamp: 2023-10-30T20:02:30.270516\n", "comments: []\n", "exception: \n", "\n", @@ -2998,26 +3006,26 @@ "2014 2.641722e+07 \n", "2015 2.784636e+07 \n", "All 2.405324e+07 ]\n", - "timestamp: 2023-10-18T10:45:20.938806\n", + "timestamp: 2023-10-30T20:02:30.560783\n", "comments: []\n", "exception: \n", "\n", "uid: output_5\n", - "status: review\n", + "status: fail\n", "type: table\n", "properties: {'method': 'crosstab'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 14, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 1], [0, 2], [0, 3], [1, 1], [1, 2], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2], [5, 0], [5, 1], [5, 2]], '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}, '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", "command: safe_table = acro.crosstab(\n", - "summary: review; missing values found\n", - "outcome: grant_type G N R R/G All\n", - "year \n", - "2010 missing missing missing missing \n", - "2011 missing missing \n", - "2012 missing \n", - "2013 missing missing \n", - "2014 missing missing \n", - "2015 missing missing missing \n", - "All \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", + "year \n", + "2010 ok threshold; p-ratio; ok threshold; p-ratio; nk-rule; ok\n", + "2011 ok ok ok threshold; ok\n", + "2012 ok ok ok threshold; ok\n", + "2013 ok ok ok threshold; ok\n", + "2014 ok ok ok threshold; ok\n", + "2015 ok ok ok threshold; ok\n", + "All ok ok ok ok ok\n", "output: [grant_type G N R R/G All\n", "year \n", "2010 9921906.0 0.000000 8420373.0 11636000.0 8320154.5\n", @@ -3027,7 +3035,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-18T10:45:21.145552\n", + "timestamp: 2023-10-30T20:02:30.762424\n", "comments: []\n", "exception: \n", "\n", @@ -3035,7 +3043,7 @@ "status: review\n", "type: table\n", "properties: {'method': 'crosstab'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 10, 'missing': 11, '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': [[0, 0], [0, 1], [0, 2], [0, 3], [1, 1], [1, 2], [2, 2], [4, 2], [5, 0], [5, 1], [5, 2]], '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}, '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", "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", @@ -3054,25 +3062,34 @@ "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-18T10:45:21.301223\n", + "timestamp: 2023-10-30T20:02:30.998114\n", "comments: []\n", "exception: \n", "\n", "uid: output_7\n", - "status: review\n", + "status: fail\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 11, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 5], [1, 0], [1, 1], [1, 5], [2, 0], [2, 1], [2, 2], [2, 4], [2, 5], [3, 0]], '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}, '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", "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", - "outcome: inc_grants \n", - "year 2010 2011 2012 2013 2014 2015 All\n", - "grant_type \n", - "G missing missing \n", - "N missing missing missing \n", - "R missing missing missing missing missing \n", - "R/G missing \n", - "All \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", + "year 2010 2011 2012 \n", + "grant_type \n", + "G ok ok ok \n", + "N threshold; p-ratio; ok ok \n", + "R ok ok ok \n", + "R/G threshold; p-ratio; nk-rule; threshold; threshold; \n", + "All ok ok ok \n", + "\n", + " \n", + "year 2013 2014 2015 All \n", + "grant_type \n", + "G ok ok ok ok \n", + "N ok ok ok ok \n", + "R ok ok ok ok \n", + "R/G threshold; threshold; threshold; ok \n", + "All ok ok ok ok \n", "output: [ inc_grants \\\n", "year 2010 2011 2012 2013 2014 \n", "grant_type \n", @@ -3090,24 +3107,24 @@ "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-18T10:45:21.498602\n", + "timestamp: 2023-10-30T20:02:31.269418\n", "comments: []\n", "exception: \n", "\n", "uid: output_8\n", - "status: review\n", + "status: pass\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\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", "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", + "summary: pass\n", "outcome: mean std\n", " inc_grants inc_grants\n", "grant_type \n", - "G missing missing\n", - "N missing missing\n", - "R missing missing\n", - "R/G missing missing\n", + "G ok ok\n", + "N ok ok\n", + "R ok ok\n", + "R/G ok ok\n", "output: [ mean std\n", " inc_grants inc_grants\n", "grant_type \n", @@ -3115,24 +3132,24 @@ "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-18T10:45:21.682294\n", + "timestamp: 2023-10-30T20:02:31.502534\n", "comments: []\n", "exception: \n", "\n", "uid: output_9\n", - "status: review\n", + "status: pass\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\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", "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", + "summary: pass\n", "outcome: mean std\n", " inc_grants inc_grants\n", "grant_type \n", - "G missing missing\n", - "N missing missing\n", - "R missing missing\n", - "R/G missing missing\n", + "G ok ok\n", + "N ok ok\n", + "R ok ok\n", + "R/G ok ok\n", "output: [ mean std\n", " inc_grants inc_grants\n", "grant_type \n", @@ -3140,7 +3157,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-18T10:45:21.802799\n", + "timestamp: 2023-10-30T20:02:31.628472\n", "comments: []\n", "exception: \n", "\n", @@ -3148,7 +3165,7 @@ "status: review\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\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", "command: table = acro.pivot_table(\n", "summary: review; negative values found\n", "outcome: mean std\n", @@ -3165,7 +3182,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-18T10:45:21.951148\n", + "timestamp: 2023-10-30T20:02:31.773039\n", "comments: []\n", "exception: \n", "\n", @@ -3183,8 +3200,8 @@ "Dep. Variable: \n", "Model: OLS Adj. R-squared: 0.893\n", "Method: Least Squares F-statistic: 2261.000\n", - "Date: Wed, 18 Oct 2023 Prob (F-statistic): 0.000\n", - "Time: 10:45:22 Log-Likelihood: -14495.000\n", + "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.000\n", + "Time: 20:02:31 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", @@ -3197,7 +3214,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-18T10:45:22.063254\n", + "timestamp: 2023-10-30T20:02:31.924170\n", "comments: []\n", "exception: \n", "\n", @@ -3215,8 +3232,8 @@ "Dep. Variable: \n", "Model: OLS Adj. R-squared: 0.893\n", "Method: Least Squares F-statistic: 2261.000\n", - "Date: Wed, 18 Oct 2023 Prob (F-statistic): 0.000\n", - "Time: 10:45:22 Log-Likelihood: -14495.000\n", + "Date: Mon, 30 Oct 2023 Prob (F-statistic): 0.000\n", + "Time: 20:02:32 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", @@ -3229,7 +3246,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-18T10:45:22.159163\n", + "timestamp: 2023-10-30T20:02:32.026679\n", "comments: []\n", "exception: \n", "\n", @@ -3247,8 +3264,8 @@ "Dep. Variable: \n", "Model: Probit Df Residuals: 8.060000e+02\n", "Method: MLE Df Model: 4.000000e+00\n", - "Date: Wed, 18 Oct 2023 Pseudo R-squ.: 2.140000e-01\n", - "Time: 10:45:22 Log-Likelihood: -4.004600e+02\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.140000e-01\n", + "Time: 20:02:32 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", @@ -3263,7 +3280,7 @@ "inc_grants 1.620000e-07 \n", "inc_donations 3.300000e-07 \n", "total_costs -1.440000e-08 ]\n", - "timestamp: 2023-10-18T10:45:22.278068\n", + "timestamp: 2023-10-30T20:02:32.158679\n", "comments: []\n", "exception: \n", "\n", @@ -3281,8 +3298,8 @@ "Dep. Variable: \n", "Model: Logit Df Residuals: 8.060000e+02\n", "Method: MLE Df Model: 4.000000e+00\n", - "Date: Wed, 18 Oct 2023 Pseudo R-squ.: 2.187000e-01\n", - "Time: 10:45:22 Log-Likelihood: -3.980700e+02\n", + "Date: Mon, 30 Oct 2023 Pseudo R-squ.: 2.187000e-01\n", + "Time: 20:02:32 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", @@ -3297,7 +3314,7 @@ "inc_grants 2.660000e-07 \n", "inc_donations 7.160000e-07 \n", "total_costs -2.150000e-08 ]\n", - "timestamp: 2023-10-18T10:45:22.363104\n", + "timestamp: 2023-10-30T20:02:32.268680\n", "comments: []\n", "exception: \n", "\n", @@ -3306,13 +3323,13 @@ "type: histogram\n", "properties: {'method': 'histogram'}\n", "sdc: {}\n", - "command: hist = acro.hist(\n", + "command: hist = acro.hist(df, \"inc_grants\")\n", "summary: Please check the minimum and the maximum values. The minimum value of the inc_grants column is: -10.0. The maximum value of the inc_grants column is: 249327008.0\n", "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", "output: ['acro_artifacts\\\\histogram_0.png']\n", - "timestamp: 2023-10-18T10:45:22.607418\n", + "timestamp: 2023-10-30T20:02:32.526748\n", "comments: []\n", "exception: \n", "\n", @@ -3321,13 +3338,13 @@ "type: histogram\n", "properties: {'method': 'histogram'}\n", "sdc: {}\n", - "command: hist = acro.hist(\n", + "command: hist = acro.hist(df, \"inc_grants\")\n", "summary: Please check the minimum and the maximum values. The minimum value of the inc_grants column is: -10.0. The maximum value of the inc_grants column is: 249327008.0\n", "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", "output: ['acro_artifacts\\\\histogram_1.png']\n", - "timestamp: 2023-10-18T10:45:22.800147\n", + "timestamp: 2023-10-30T20:02:32.815177\n", "comments: []\n", "exception: \n", "\n", @@ -3501,20 +3518,29 @@ "text": [ "INFO:acro:records:\n", "uid: output_7\n", - "status: review\n", + "status: fail\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 11, 'threshold': 7, 'p-ratio': 2, 'nk-rule': 1}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 5], [1, 0], [1, 1], [1, 5], [2, 0], [2, 1], [2, 2], [2, 4], [2, 5], [3, 0]], '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}, '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", "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", - "outcome: inc_grants \n", - "year 2010 2011 2012 2013 2014 2015 All\n", - "grant_type \n", - "G missing missing \n", - "N missing missing missing \n", - "R missing missing missing missing missing \n", - "R/G missing \n", - "All \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", + "year 2010 2011 2012 \n", + "grant_type \n", + "G ok ok ok \n", + "N threshold; p-ratio; ok ok \n", + "R ok ok ok \n", + "R/G threshold; p-ratio; nk-rule; threshold; threshold; \n", + "All ok ok ok \n", + "\n", + " \n", + "year 2013 2014 2015 All \n", + "grant_type \n", + "G ok ok ok ok \n", + "N ok ok ok ok \n", + "R ok ok ok ok \n", + "R/G threshold; threshold; threshold; ok \n", + "All ok ok ok ok \n", "output: [ inc_grants \\\n", "year 2010 2011 2012 2013 2014 \n", "grant_type \n", @@ -3532,75 +3558,11 @@ "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-18T10:45:21.498602\n", + "timestamp: 2023-10-30T20:02:31.269418\n", "comments: []\n", "exception: \n", "\n", - "The status of the record above is: review.\n", - "Please explain why an exception should be granted.\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:acro:records:\n", - "uid: output_8\n", - "status: review\n", - "type: table\n", - "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n", - "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", - "outcome: mean std\n", - " inc_grants inc_grants\n", - "grant_type \n", - "G missing missing\n", - "N missing missing\n", - "R missing missing\n", - "R/G missing missing\n", - "output: [ mean std\n", - " inc_grants inc_grants\n", - "grant_type \n", - "G 1.141279e+07 2.283220e+07\n", - "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-18T10:45:21.682294\n", - "comments: []\n", - "exception: \n", - "\n", - "The status of the record above is: review.\n", - "Please explain why an exception should be granted.\n", - "\n", - "INFO:acro:records:\n", - "uid: output_9\n", - "status: review\n", - "type: table\n", - "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 0, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\n", - "command: table = acro.pivot_table(\n", - "summary: review; missing values found\n", - "outcome: mean std\n", - " inc_grants inc_grants\n", - "grant_type \n", - "G missing missing\n", - "N missing missing\n", - "R missing missing\n", - "R/G missing missing\n", - "output: [ mean std\n", - " inc_grants inc_grants\n", - "grant_type \n", - "G 1.141279e+07 2.283220e+07\n", - "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-18T10:45:21.802799\n", - "comments: []\n", - "exception: \n", - "\n", - "The status of the record above is: review.\n", + "The status of the record above is: fail.\n", "Please explain why an exception should be granted.\n", "\n", "INFO:acro:records:\n", @@ -3608,7 +3570,7 @@ "status: review\n", "type: table\n", "properties: {'method': 'pivot_table'}\n", - "sdc: {'summary': {'suppressed': False, 'negative': 4, 'missing': 8, 'threshold': 0, 'p-ratio': 0, 'nk-rule': 0}, 'cells': {'negative': [[1, 0], [1, 1], [2, 0], [2, 1]], 'missing': [[0, 0], [0, 1], [1, 0], [1, 1], [2, 0], [2, 1], [3, 0], [3, 1]], 'threshold': [], 'p-ratio': [], 'nk-rule': []}}\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", "command: table = acro.pivot_table(\n", "summary: review; negative values found\n", "outcome: mean std\n", @@ -3625,7 +3587,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-18T10:45:21.951148\n", + "timestamp: 2023-10-30T20:02:31.773039\n", "comments: []\n", "exception: \n", "\n", @@ -3638,13 +3600,13 @@ "type: histogram\n", "properties: {'method': 'histogram'}\n", "sdc: {}\n", - "command: hist = acro.hist(\n", + "command: hist = acro.hist(df, \"inc_grants\")\n", "summary: Please check the minimum and the maximum values. The minimum value of the inc_grants column is: -10.0. The maximum value of the inc_grants column is: 249327008.0\n", "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", "output: ['acro_artifacts\\\\histogram_0.png']\n", - "timestamp: 2023-10-18T10:45:22.607418\n", + "timestamp: 2023-10-30T20:02:32.526748\n", "comments: []\n", "exception: \n", "\n", @@ -3657,13 +3619,13 @@ "type: histogram\n", "properties: {'method': 'histogram'}\n", "sdc: {}\n", - "command: hist = acro.hist(\n", + "command: hist = acro.hist(df, \"inc_grants\")\n", "summary: Please check the minimum and the maximum values. The minimum value of the inc_grants column is: -10.0. The maximum value of the inc_grants column is: 249327008.0\n", "outcome: Empty DataFrame\n", "Columns: []\n", "Index: []\n", "output: ['acro_artifacts\\\\histogram_1.png']\n", - "timestamp: 2023-10-18T10:45:22.800147\n", + "timestamp: 2023-10-30T20:02:32.815177\n", "comments: []\n", "exception: \n", "\n", @@ -3720,7 +3682,7 @@ "2014 24 8 149 \n", "2015 23 8 129 \n", "All 139 44 815 ]\n", - "timestamp: 2023-10-18T10:45:20.500344\n", + "timestamp: 2023-10-30T20:02:30.125307\n", "comments: [\"Empty columns: ('N', 'Dead in 2015'), ('R/G', 'Dead in 2015') were deleted.\"]\n", "exception: \n", "\n", @@ -3739,7 +3701,7 @@ "Columns: []\n", "Index: []\n", "output: ['XandY.jpeg']\n", - "timestamp: 2023-10-18T10:45:23.039087\n", + "timestamp: 2023-10-30T20:02:33.243177\n", "comments: ['This output is an image showing the relationship between X and Y']\n", "exception: \n", "\n", @@ -3831,7 +3793,6 @@ "output_type": "stream", "text": [ "XandY.jpeg.txt\n", - "config.json.txt\n", "histogram_0.png.txt\n", "histogram_1.png.txt\n", "output_0_0.csv.txt\n", diff --git a/test/test_initial.py b/test/test_initial.py index aecfe63..7054a05 100644 --- a/test/test_initial.py +++ b/test/test_initial.py @@ -562,9 +562,9 @@ def test_surv_func(acro): output.summary == correct_summary ), f"\n{output.summary}\n should be \n{correct_summary}\n" - filename = "kaplan-mier.png" - _ = acro.surv_func(data.futime, data.death, output="plot", filename=filename) - assert os.path.exists(f"acro_artifacts/{filename}") + filename = os.path.normpath("acro_artifacts/kaplan-meier_0.png") + _ = acro.surv_func(data.futime, data.death, output="plot") + assert os.path.exists(filename) acro.add_exception("output_0", "I need this") acro.add_exception("output_1", "Let me have it") results: Records = acro.finalise(path=PATH)