A unified AI library that brings together classical Machine Learning, Reinforcement Learning, and Large Language Models under a consistent and simple interface.
Project description
scikit-ai
| Category | Tools |
|---|---|
| Development | |
| Package | |
| Documentation | |
| Communication |
Introduction
A unified AI library that brings together classical Machine Learning, Reinforcement Learning, and Large Language Models under a consistent and simple interface.
It mimics the simplicity of scikit-learn’s API and integrates with its ecosystem, while also supporting libraries like TorchRL, oumi, and others.
Installation
For user installation, scikit-ai is currently available on the PyPi's repository, and you can
install it via pip:
pip install scikit-ai
Development installation requires to clone the repository and then use PDM to install the project as well as the main and development dependencies:
git clone https://github.com/georgedouzas/scikit-ai.git
cd scikit-ai
pdm install
Usage
We aim to provide a simple and user-friendly API for working with AI models and functionalities.
Classification
Let’s start with a basic text classification example:
X = ['This is a positive review.', 'This is a negative review.']
y = [1, 0]
Now, create a k-shot classifier:
from skai.llm import OpenAIClassifier
clf = OpenAIClassifier()
clf.fit(X, y)
clf.predict([
'I absolutely loved this movie!',
'The product was terrible and broke immediately.'
])
By default, the classifier uses reasonable k-shot settings. You can inspect them:
Number of examples used in the prompt:
print(clf.k_shot_)
Instructions given to the model:
print(clf.instructions_)
The complete prompt sent to the language model:
print(clf.prompt_)
You can also customize the classifier in detail by adjusting its parameters. For more options and examples, please consult the full API documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scikit-ai-0.1.0.tar.gz.
File metadata
- Download URL: scikit-ai-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c620207630d470fee3de9f70eb2653440f54bfb52b644916cf3d0b25be7e9a1
|
|
| MD5 |
30d1ac05797b2b30e9a9c8dd161d2307
|
|
| BLAKE2b-256 |
2d0f15ded0ecd86a2aa54eb421afac3930cc31735193acce87e57e701fe5ddb5
|
File details
Details for the file scikit_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scikit_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6136e2a699d9c594659eee3461a877d80a0c6ef35fb6cffe6b08b5e6fb64f7a
|
|
| MD5 |
fb9dd63f812cfc5f3febcad5c52caea6
|
|
| BLAKE2b-256 |
43f6d730005cd3f8a483779ff71abd84bbd0ad2de7dfcc8b9c7f10e22ab000c1
|