Skip to main content

scikit-ai

ci doc

Category Tools
Development black ruff mypy docformatter
Package version pythonversion downloads
Documentation mkdocs
Communication gitter discussions

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.

Release files for scikit-ai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scikit-ai 0.1.0
File Size Uploaded
scikit-ai-0.1.0.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scikit-ai 0.1.0
File Interpreter ABI Platform
scikit_ai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / scikit-ai-0.1.0.tar.gz

Download URL scikit-ai-0.1.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c620207630d470fee3de9f70eb2653440f54bfb52b644916cf3d0b25be7e9a1
BLAKE2b-256 checksum
How to use checksums
2d0f15ded0ecd86a2aa54eb421afac3930cc31735193acce87e57e701fe5ddb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / scikit_ai-0.1.0-py3-none-any.whl

Download URL scikit_ai-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6136e2a699d9c594659eee3461a877d80a0c6ef35fb6cffe6b08b5e6fb64f7a
BLAKE2b-256 checksum
How to use checksums
43f6d730005cd3f8a483779ff71abd84bbd0ad2de7dfcc8b9c7f10e22ab000c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page