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.)
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
# Load LLM via LangChain. (GPT-4 recommended)
llm_model = OpenAI(temperature=0, model_name = 'gpt-4-0613')
params = {
'columns_name': True,
'objective': 'classification',
}
iblm = IBLModel(llm_model = llm_model, params=params)
- 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.
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.