Repository navigation
Release: 0.2.2
All notable changes to this project will be documented in this file.
0.2.2
- Added eleven plots from shap to the artist:
shap_bar,shap_beeswarm,
shap_violin,shap_heatmap,shap_decision,shap_embedding,
shap_waterfall,shap_force,shap_scatter(a dependence plot),
shap_partial_dependence, andshap_group_difference. They draw the SHAP
values thatshap_importancefound (or find them), for the class chosen
with "category" (by default, the last class). shap draws with
matplotlib.pyplot, so these plots lend it their figure while it draws,
without opening a window, and leave pyplot as it was. The random numbers
that shap uses to jitter dots and to bootstrap are seeded with the
dataset's seed, so the figures are reproducible. - Added plots from the other packages:
- scikit-learn:
calibration_curve,det_curve,partial_dependence,
learning_curve,validation_curve, andtree_plot. - seaborn:
box_plots,count_plots,pair_plot,label_plot, and
missing_heatmap, split or colored by the label's classes (or by a
group, or by "by"). - statsmodels:
qq_plotandinfluence_plot. - InterpretML:
shape_functions, the shape functions of an
explainable_boostingmodel. - Plots of the tables made with other packages:
coefficient_plot(of
the coefficients ofols,glm,fixest, orcox, or of an effect from
DoubleML),fairness_plot(fairlearn),prediction_intervals(MAPIE),
andsearch_plot(of any search, including Optuna's).
- scikit-learn:
survival_curvescan add a table of the number of rows at risk
(at_risk).- A plot can have its own usual size (
Plot.size), which "width" and
"height" still change, and a plot whose tool makes its own figure (as
shap's force plot does) can return that figure fromdraw. - Moved the technique catalog out of the advanced user guide into its own
page of the user guide, "Technique Catalog". Its tables are written from
the techniques' docstrings bydocs/scripts/technique_catalog.py, and a
test checks that they are up to date.
0.2.1
- Replaced the
scorecardtechnique of the critic stage withScorecard,
which compares every branch of an analysis: one row for each combination of
techniques that the most recentexperimenttried, ranked by its criterion,
with the technique used at each step and every standard metric for the
task, computed from each branch's own predictions. It still stores the final
model's scores in the dataset'smetrics. Its table now has one row for
each branch (instead of one row for each metric). - A scorecard can be saved as a csv file (
to_csv), a Markdown table
(to_markdown), a Word document (to_word), or an image (to_image), or
in all four formats at once (export).Scorecard.createmakes one from a
dataset or an applied project, andProject.scorecardreturns the
project's scorecard.Project.exportsaves it in every format. - An
experimentnow keeps aBranch(the technique used at each step, the
score, and the predictions) for every combination in the winning dataset's
branches. - Added the
wordextra, which installs python-docx for Word documents. - Added the scorecard of the README's breast cancer study to the README.
- Added
groupstoDataset(and a "groups" setting in the "general"
section): columns that identify groups of people or places, which stay in
the data but are not features. Cleaners and samplers keep them (synthetic
rows have none), andgroup_splituses the first group by default. - Added support for 13 more packages, for 139 techniques in ten genres:
- fairlearn: six fairness metrics (
demographic_parity,equalized_odds,
andequal_opportunity, with a "_ratio" version of each) in the new
GroupMetricgenre, and thefairnessevaluator, which compares the
model across groups. Thescorecardaddsdemographic_parityand
equalized_oddsfor every branch when a dataset has groups and a label
with two classes. - MAPIE: the
conformalevaluator, which makes prediction intervals (or
sets of classes) with a known rate of coverage. - eli5: the
explain_weightsevaluator. - InterpretML: the
explainable_boostingmodel, whose term importances
feature_importancereports. - CatBoost: the
catboostmodel, which uses categorical columns directly. - TabPFN: the
tabpfnmodel (in its owntabpfnextra, which is not part
ofallbecause it needs PyTorch). - pyfixest: the
fixestmodel, a regression (or logit) with fixed effects
and clustered standard errors, whose coefficients are stored in a table. - lifelines: the
coxmodel, theconcordancemetric, thekaplan_meier
describer, and thesurvival_curvesplot. - DoubleML: the new
Effectgenre, withpartially_linearand
interactive_regression, which estimate the causal effect of a
treatment with double machine learning. - skrub: the
date_parts,gap,min_hash, andtfidfencoders. - Optuna:
search = "optuna"for any model. - Polars:
Dataset.createaccepts Polars data frames (lazy or not). - great_tables: scorecards as HTML tables (
to_html). Scorecards can also
be saved as LaTeX tables (to_latex), andexportsaves both.
- fairlearn: six fairness metrics (
- Added the
causal,fairness,polars,survival,tables,tuning,
uncertainty, andtabpfnextras, and added packages to theboosting,
encoders,explain, andstatisticsextras. - Added
Dataset.dates, the names of the date and time columns. - Code that calls pyfixest no longer changes the level or handlers of the root
logger. - Added recipes for fairness and for fixed effects, and sections of the
advanced user guide on groups and fairness, uncertainty, causal effects,
and survival analysis. - Left private classes, methods, and functions out of the API documentation.
0.2.0
- Rebuilt
amosas Automated Modeling for Open Scholarship: a
package for reproducible data science in academic research, built on
chrisjen0.2.0. A study is described in a settings file (or adict),
whichchrisjenturns into a workflow of workers, steps, and techniques. - Added
Dataset, the item that flows through anamosworkflow. It keeps
the data in onepandas.DataFramewith the label, the training and test
rows, the fitted model, its predictions and probabilities, metrics, tables,
figures, fitted tools, and ahistoryof every technique applied. - Added
Operation, the base class of everyamostechnique, and 116
techniques in nine genres, each stored in thechrisjenlibrary under its
snake case name: cleaners (10), describers (6), splitters (4), transformers
(imputers, scalers, encoders, mixers, and reducers: 37), samplers (9),
models (19), metrics (17), evaluators (6), and plots (8). They wrap
scikit-learn, category_encoders, imbalanced-learn, xgboost, lightgbm,
statsmodels, shap, matplotlib, and seaborn. Optional packages are imported
only when they are used, and are installed with extras (such as
amos[all]). - Transformers and samplers learn from the training rows only, keep named
columns, can be limited to somecolumns, and are given the label when
they are fitted. Models do both tasks where they can, search for the best
hyperparameters when asked, and (witholsandglm) report coefficients
with standard errors, p-values, and confidence intervals. Every metric is
also achrisjen.Criteria, so it can be an experiment's criterion. - Added the
Experimentdesign, which tries every combination of
techniques, keeps the best, and adds a table comparing every combination. - Added
amos.Project, which makes data into aDataset, reads "label",
"task", and "seed" from the "general" section of the settings, applies the
workflow to a copy of the data, passes the seed to every tool that takes a
random_state, and exports the report, settings, environment, history,
predictions, tables, and figures. - Added the
Findingsreport. - Added an ROC curve and an importance plot from the README's breast cancer
study to the README, withdocs/scripts/readme_figures.pyto draw them
again. - Added tests that compare
amoswith each package that it wraps, using the
same data, parameters, and seed. - Removed the general-purpose containers, converters, factories, and
registries of 0.1.x. They now live inbunches,camina,holden, and
wonka. - Moved to the
snickerdoodletemplate, based onuvandhatchling, with
ruff, mypy, pre-commit, mkdocs, and GitHub Actions. The README and
documentation examples are run by the unit tests.
0.1.10
- The last release of the earlier, general-purpose
amos, a toolkit of
containers and converters for Python projects.