Skip to main content
This guide walks you through installing OuterProduct, authenticating, and training your first model, taking raw CSV to feature-level explanations in under ten lines of Python. Before you begin, make sure you have Python 3.12 or newer and an OuterProduct API key from console.outerproduct.com.

Putting it all together

Here is the complete working example:
import outerproduct as op

op.init()  # reads OUTERPRODUCT_API_KEY from environment

dataset = op.LocalDataset.from_csv("customers.csv").upload()
model = op.reasoning.fit(dataset, task=op.Binclass(label_column="churn")).wait()

test_dataset = op.LocalDataset.from_csv("customers_test.csv").upload()
predictions = model.predict(test_dataset)
reasoning = model.explain(test_dataset)

print(reasoning.feature_names)
print(reasoning.attributions.shape)  # (n_samples, n_features)
Use op.Regression(label_column=...) for continuous targets or op.Multiclass(label_column=...) for multi-class classification. The label_column must match a column name in your CSV exactly.

What’s next

Full Workflow Guide

Explore the complete model lifecycle with branching examples.

Training Options

Control model types, evaluation metrics, and search strategy.

Explanations

Dive into local attributions, global importance, and decision rules.