A Python package for feature selection tailored to chemical and related scientific problems. This project is part of the broader NaviCat platform.
- Python 3.12 or higher
- uv (recommended) or pip
- numpy
- scipy
- pandas
- scikit-learn
- matplotlib
- joblib
See pyproject.toml for complete dependency specifications. Most of the dependencies are installed with reafs.
With uv:
uv add reafsWith pip:
pip install reafsfrom sklearn.linear_model import BayesianRidge
from reafs.datasets import from_dataset
from reafs.feature_selection import BeamSequential
from reafs.cross_validation import LeaveOneMoreOut
from reafs.metrics import TestScore
# Load a dataset
data = from_dataset("lau2021", i_target=0, direction=1)
# Create a feature selector
selector = BeamSequential(
estimator=BayesianRidge(),
tol=1e-3,
scoring=TestScore(
cv=LeaveOneMoreOut(n_repeats=5),
scoring="neg_mean_squared_error"
),
n_candidates=10,
n_jobs=-1,
)
# Use in your workflow
selector.fit(data.X, data.y)
selected_features = selector.get_support()__init__.py: Package entrypoint and workflow helpers.cross_validation.py: Custom cross-validator classes.datasets.py: Helpers to load project CSV datasets.feature_selection.py: Implementations of feature selector classes and related transformers.metrics.py: Collection of custom scoring functions and metric callables for evaluation.pipeline.py: Small utilities for naming and constructing pipeline objects.settings.py: Preconfigured estimators, evaluators, and challenge/evaluation helpers.test.py: Minimal example demonstrating selector configuration and usage.utils.py: Miscellaneous numerical utilities and helper functions used across the package.visualization.py: Plotting helpers.
This project was created as part of NCCR Catalysis (grant number 225147), a National Centre of Competence in Research funded by the Swiss National Science Foundation.
Lau, S. H., Borden, M. A., Steiman, T. J., Wang, L. S., Parasram, M., & Doyle, A. G. J. Am. Chem. Soc., 2021, 15873. https://doi.org/10.1021/jacs.1c08105
Cammarota, R. C., Liu, W., Bacsa, J., Davies, H. M. L., & Sigman, M. S. J. Am. Chem. Soc., 2022, 1881. https://doi.org/10.1021/jacs.1c12198
Gallarati, S., Laplaza, R., & Corminboeuf, C. Org. Chem. Front., 2022, 4041. https://doi.org/10.1039/D2QO00550F
Haas, B. C., Goetz, A. E., Bahamonde, A., McWilliams, J. C., & Sigman, M. S. Proc. Natl. Acad. Sci. U.S.A., 2022, e2118451119. https://doi.org/10.1073/pnas.2118451119
Dotson, J. J., van Dijk, L., Timmerman, J. C., Grosslight, S., Walroth, R. C., Gosselin, F., Püntener, K., Mack, K. A., & Sigman, M. S. J. Am. Chem. Soc., 2023, 110. https://doi.org/10.1021/jacs.2c08513
Wang, Y.-Z., Wang, Z.-H., Eshel, I. L., Sun, B., Liu, D., Gu, Y.-C., Milo, A., & Mei, T.-S. Nat. Commun., 2023, 2322. https://doi.org/10.1038/s41467-023-37965-0
Gallarati, S., van Gerwen, P., Laplaza, R., Brey, L., Makaveev, A., & Corminboeuf, C. Chem. Sci, 2024, 3640. https://doi.org/10.1039/D3SC06208B
Schoepfer, A. A., Laplaza, R., Wodrich, M. D., Waser, J., & Corminboeuf, C. ACS Catal., 2024, 9302. https://doi.org/10.1021/acscatal.4c02452
Souza, L. W., Miller, B. R., Cammarota, R. C., Lo, A., Lopez, I., Shiue, Y.-S., Bergstrom, B. D., Dishman, S. N., Fettinger, J. C., Sigman, M. S., & Shaw, J. T. ACS Catal., 2024, 104. https://doi.org/10.1021/acscatal.3c04256
