Metadata-Version: 2.2
Name: asf-lib
Version: 0.0.1.16
Summary: Under construction! Algorithm selection framework
Author-email: Hadar Shavit <shavit@aim.rwth-aachen.de>
Maintainer-email: Hadar Shavit <shavit@aim.rwth-aachen.de>
License: MIT License
        
        Copyright (c) 2024 Hadar Shavit
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scikit-learn
Requires-Dist: pandas
Requires-Dist: xgboost
Provides-Extra: aspeed
Requires-Dist: clingo; extra == "aspeed"
Provides-Extra: aslib
Requires-Dist: pyyaml; extra == "aslib"
Provides-Extra: nn
Requires-Dist: torch; extra == "nn"

[![PyPI - Version](https://img.shields.io/pypi/v/asf-lib)](https://pypi.org/project/asf-lib/)
[![Python versions](https://img.shields.io/pypi/pyversions/asf-lib)](https://pypi.org/project/asf-lib/)
[![License](https://img.shields.io/pypi/l/asf-lib?color=informational)](LICENSE)
[![Python application](https://github.com/hadarshavit/asf/actions/workflows/python-app.yml/badge.svg)](https://github.com/hadarshavit/asf/actions/workflows/python-app.yml)

# Algorithm Selection Framework (ASF)

ASF is a powerful library for algorithm selection and performance prediction. It allows users to easily create and use algorithm selectors with minimal code.

> NOTE: ASF is still under construction (early alpha). Therefore, not only the API can change, but there might be some bugs in the implementations of the selectors. For the common methods (multi class classification, pairwise regression / classification as well as simple ranking) we checked the performance and the implementation and they can be safely used. We will release in the near future a benchmark of all methods on ASlib scenarios which will validate the performance.

## Features

- Easy-to-use API for creating algorithm selectors
- Supports various selection models including pairwise classifiers, multi-class classifiers, and performance models
- Integration with popular machine learning libraries like scikit-learn

## Quick Start

You can create an algorithm selector with just 2 lines of code. Here is an example using the `PairwiseClassifier`:

```python
from asf.selectors import PairwiseClassifier
from sklearn.ensemble import RandomForestClassifier

# Create a PairwiseClassifier
selector = PairwiseClassifier(model_class=RandomForestClassifier, metadata=your_metadata)

# Fit the selector with feature and performance data
selector.fit(dummy_features, dummy_performance)

# Predict the best algorithm for new instances
predictions = selector.predict(new_features)
```

## Future Features

In the future, ASF will include more features such as:

- Empirical performance prediction
- Feature selection
- Support for ASlib scenarios
- And more!

## Installation

To install ASF, use pip:
```python
pip install asf-lib
```

## Documentation

For detailed documentation and examples, please refer to the official documentation.

## Contributing

We welcome contributions! Please see our contributing guidelines for more details.

## License

ASF is licensed under the MIT License. See the LICENSE file for more details.
