OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Onn

Onn is an open-source Python/PyTorch library for online neural-network learning and nonlinear contextual-bandit action selection. Its ONN classifier uses Hedge Backpropagation to adjust hidden-layer use as training proceeds; ONN_THS combines neural-network exploitation with Thompson Sampling exploration and supports selecting actions and updating from feedback.

Independent OpenViST project profile, based on linked sources.

Onn — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Onn when a Python/PyTorch experiment needs online classifier updates or a contextual-bandit workflow that combines nonlinear exploitation with Thompson Sampling exploration.

Who it is for

  • Python developers experimenting with incrementally trained classifiers.
  • Researchers exploring adaptive hidden-layer use in online neural networks.
  • Developers implementing nonlinear contextual-bandit selection and reward-based updates.

Documented uses

  • Train a classifier incrementally on incoming labeled examples and predict classes.
  • Experiment with automatic adjustment of hidden-layer use during online learning.
  • Select an action for a context and update a nonlinear bandit model using feedback.
Before you choose

Requirements & limits

The public GitHub repository lists an Apache-2.0 license. The README documents installation with `pip install onn`.

  • The library provides distinct ONN classification and ONN_THS contextual-bandit workflows.
  • Batch processing is available for experimentation, but the README recommends online use.
  • CUDA use is documented when available; the README cautions that CPU may be faster for very small networks.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Onn and start an incremental classifier

Install the package, initialize a classifier, update it with labeled examples, and request predictions.

Before you start

  • Python environment
  • NumPy
  • PyTorch, as the implementation framework

Steps

  1. Install the package with the command below.

    Documented command
    pip install onn
  2. Import NumPy and ONN from onn.OnlineNeuralNetwork.

  3. Initialize ONN with feature size, maximum hidden layers, neurons per hidden layer, and class count.

  4. Call partial_fit with labeled examples, then call predict with input examples.

Expected outcome

A configured ONN classifier can be incrementally trained and used to produce class predictions.

Guide limitations

  • The README gives a small illustrative example, not a performance guarantee.
  • Batch operation is described as available for experimentation, but online learning is the recommended use.
Source-based practical guide

Use ONN_THS for contextual-bandit selection and updates

Initialize the contextual-bandit model, select an action for a context, and submit the documented update.

Before you start

  • Python environment
  • NumPy
  • PyTorch, as the implementation framework
  • Context input and an application-defined reward signal

Steps

  1. Import NumPy and ONN_THS from onn.OnlineNeuralNetwork.

  2. Initialize it with feature size, maximum hidden layers, neurons per hidden layer, and number of classes.

  3. Call predict with a context to obtain the selected arm and exploration factor.

  4. Update with partial_fit, passing the context, selected arm, and exploration factor as shown in the README.

Expected outcome

The documented example returns an action selection and passes its associated values into an online model update.

Guide limitations

  • The README describes select and reward actions but the short code example does not show a separate reward-value parameter.
  • The repository points to a notebook for fuller examples.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
alison-carrera/onn · Official homepage title · retained in its source language