Coder Social home page Coder Social logo

alosi's Introduction

alosi

pypi

About

alosi is a Python package providing utilities for building and interacting with, components of the ALOSI adaptive learning architecture. These include:

  • Recommendation engine core utilities
  • Engine API
  • Bridge API

Setup

Install using pip:

pip install alosi

Or to install as an editable project:

git clone https://github.com/harvard-vpal/alosi
pip install -e ./alosi

Getting started

Recommendation Engine module

Implementing a recommendation engine

You'll need to subclass BaseAdaptiveEngine and implement all the empty methods. For example:

import numpy as np
from alosi.engine import BaseAdaptiveEngine

class LocalAdaptiveEngine(BaseAdaptiveEngine):

    def __init__(self):
        self.Scores = np.array([
            [0, 0, 1.0],
            [0, 1, 0.7],
        ])
        self.Mastery = np.array([
            [0.1, 0.2],
            [0.3, 0.5],
        ])
        self.MasteryPrior = np.array([0.1, 0.1])

    def get_guess(self, activity_id=None):
        GUESS = np.array([
            [0.1, 0.2],
            [0.3, 0.4],
            [0.5, 0.6]
        ])
        if activity_id is not None:
            return GUESS[activity_id]
        else:
            return GUESS
    
    # implement more methods here ...
...

# Usage

# instantiate a new engine subclass instance
engine = LocalAdaptiveEngine()

# Recommend an activity
engine.recommend(learner_id=1)

# Perform learner mastery Bayesian update for a new score
engine.update_from_score(learner_id=0, activity_id=0, score=0.5)

# Perform estimation and update guess/slip/transit matrices and prior mastery:
engine.train()

See the full example in examples/example_engine.py

Engine API module

Under construction

Bridge API module

Under construction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.