Skip to main content

Inductive-bias Learning

Project description

IBLM:Inductive-bias Learning Models

What is IBL?

IBL (Inductive-bias Learning) is a new machine learning modeling method that uses LLM to infer the structure of the model itself from the data set and outputs it as Python code. The learned model (code model) can be used as a machine learning model to predict a new dataset.In this repository, you can try different learning methods with IBL.(Currently only binary classification with simple methods is available.)

ibl

How to Use

Setting

  • Installation
pip install iblm
  • OpenAI API key settings
os.environ["OPENAI_API_KEY"] = "OPENAI_API_KEY"

Binary classification

Currently, only small amounts of data can be executed. The same seed value may or may not generate a successful code model.

  • Model Definition
from iblm import IBLModel

# 回帰タスク -> objective="regression"
# 二値分類 -> "binary"
# 多値分類 -> "multiclass"

### IBLModel呼び出し
# OPENAI_API
os.environ["OPENAI_API_KEY"] = "xxx"

iblm = ibl.IBLModel(api_type="openai", model_name="gpt-4-0125-preview", objective="binary")

# AZURE_OPENAI_API
os.environ["AZURE_OPENAI_KEY"] = "xxx"
os.environ["AZURE_OPENAI_ENDPOINT"] = "xxx"
os.environ["OPENAI_API_VERSION"] = "xxx"

iblm = IBLModel(api_type="azure", model_name="gpt-4-0125-preview", objective="binary")
  • Model Learning
model = iblm.fit(x_train, y_train)
  • Model Predictions
y_proba = iblm.predict(x_test)

Notebooks

Use the link below to try it out immediately on Google colab.

  • Binary classification
    • Titanic dataset:Open In Colab
    • Moon dataset:Open In Colab

Supported Models

Currently, the recommended model is GPT-4

Contributor

Cite

If you find this repo helpful, please cite the following papers:

@article{tanaka2023inductive,
  title={Inductive-bias Learning: Generating Code Models with Large Language Model},
  author={Tanaka, Toma and Emoto, Naofumi and Yumibayashi, Tsukasa},
  journal={arXiv preprint arXiv:2308.09890},
  year={2023}
}

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

iblm-0.3.25.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

iblm-0.3.25-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page