Skip to main content

Getting Started

Prerequisites

Before you begin, ensure you have:

  • Python installed on your system
  • Poetry package manager (installation instructions at https://python-poetry.org/)
  • Basic understanding of Python and machine learning concepts

Access Preview

At the moment pi_optimal is not publicly accessible as we are closely testing it before the official release. By accessing the preview version, you can:

  • Influence Development: Provide valuable feedback that shapes the final release.
  • Exclusive Features: Experience new functionalities before they are publicly available.
  • Community Engagement: Join a dedicated group of early adopters and collaborate directly with our development team.
  • Early Adoption: Gain a competitive edge by integrating advanced RL capabilities into your projects sooner.

Don't miss out on this chance to make a significant impact and ensure pi_optimal meets your needs perfectly.

Installation

  1. Clone the repository:
git clone https://github.com/pi-optimal/pi-optimal.git
  1. Navigate to the project directory:
cd pi_optimal
  1. Install dependencies using Poetry:
poetry install

Quick Start Example

Here's a minimal example to help you understand the basic workflow of pi_optimal:

import pandas as pd
import pi_optimal as po

# 1. Load your time-series data
data = pd.read_csv('your_data.csv')

# 2. Create a TimeseriesDataset
dataset = po.datasets.TimeseriesDataset(
data,
state_columns=['state_1', 'state_2'], # Your state variables
action_columns=['action'], # Your action variables
reward_column='reward', # Your reward metric
timestep_column='timestamp', # Time column
unit_index='id', # Unique identifier for each unit
lookback_timesteps=8 # Number of past steps to consider
)

# 3. Initialize and train an agent
agent = po.Agent(
dataset=dataset,
type="mpc-continuous", # Agent type
config={"uncertainty_weight": 0.5} # Configuration parameters
)
agent.train()

# 4. Make predictions
predictions = agent.predict(new_data)

Key Components

  • TimeseriesDataset: Handles your time-series data and prepares it for the RL pipeline
  • Agent: The core component that trains on your data and makes predictions
  • State Columns: Variables that describe your system's current state
  • Action Columns: Variables that represent possible actions
  • Reward Column: The metric you want to optimize

Next Steps

  1. Explore the tutorials for detailed API references
  2. Join our Slack community for help and discussions
  3. Try implementing a simple use case with your own data

Getting Help

If you run into issues:

  • Check our documentation
  • Join our Slack community
  • Open an issue on GitHub
  • Review example notebooks for common patterns

This guide should help new users get started with pi_optimal. Would you like me to expand on any particular section or add more specific details about certain features?