Ranking, Scoring and Decisions with XGBoost
Improve AI is a machine learning platform that leverages the capabilities of XGBoost to efficiently score and rank items using a reward-based training approach.
Scoring and ranking lie at the heart of recommendation systems, personalization, query re-ranking, automated decisions, and multi-variate optimization.
Although XGBoost is proficient at estimating values, Improve AI augments it in several ways:
- Score or rank any JSON-encodable object in Python, Swift, or Java without additional feature encoding
- Smartly balance exploration vs exploitation using Thompson Sampling
- Train updated models with intuitive reward-based learning
- On-device scoring and ranking for iOS and Android apps
Simple APIs
With Swift, Python, or Java, create a list of JSON encodable items and simply call Ranker.rank(items).
For instance, in an iOS bedtime story app, you may have a list of Story objects:
struct Story: Codable {
var title: String
var author: String
var pageCount: Int
}
To obtain a ranked list of stories, use just one line of code:
let rankedStories = try Ranker(modelUrl).rank(stories)
Simple Training
Easily train your rankers using reinforcement learning.
First, track when an item is used:
let tracker = RewardTracker("stories", trackUrl)
let rewardId = tracker.track(story, from: rankedStories)
Later, if a positive outcome occurs, provide a reward:
if (purchased) {
tracker.addReward(profit, rewardId)
}
Reinforcement learning uses positive rewards for favorable outcomes (a “carrot”) and negative rewards for undesirable outcomes (a “stick”). By assigning rewards based on business metrics, such as revenue or conversions, the system optimizes these metrics over time.
Contextual Ranking & Scoring
Improve AI turns XGBoost into a contextual multi-armed bandit, meaning that context is considered when making ranking or scoring decisions.
Often, the choice of the best variant depends on the context that the decision is made within. Let’s take the example of greetings for different times of the day:
greetings = ["Good Morning",
"Good Afternoon",
"Good Evening",
"Buenos Días",
"Buenas Tardes",
"Buenas Noches"]
rank() also considers the context of each decision. The context can be any JSON-encodable data structure.
ranked = ranker.rank(items=greetings,
context={ "day_time": 12.0,
"language": "en" })
greeting = ranked[0]
Trained with appropriate rewards, Improve AI would learn from scratch which greeting is best for each time of day and language.
Proven Performance
Improve AI is a production ready implementation of a contextual multi-armed bandit algorithm, developed through years of iteration. By merging Thompson Sampling with XGBoost, it provides a learning system that is both fast and flexible. Thompson Sampling maintains equilibrium between exploring novel possibilities and capitalizing on established options, while XGBoost ensures cost-effective, high-performance training for updated models.
Get Started Today
Improve AI is available now for Python, Swift, and Java. Check out the Quick-Start Guide for more information.
Thank you for your efforts to improve the world a little bit today.
Recent Posts
Improve AI 8.0 - Contextual Multi-Armed Bandit Platform for Scoring, Ranking & Decisions
We’re thrilled to introduce Improve AI 8.0, a modern, free, production-ready contextual multi-armed bandit platform that quickly scores and ranks items using...
Simple Re-Ranking of SQL Queries with Machine Learning
In this tutorial, we will demonstrate how to use the Scorer and RewardTracker classes to update a ‘score’ column for a number of products in a ‘products’ tab...
Making Decisions with Ranker
In this tutorial, we’ll walk through how to use the Ranker class to make decisions, specifically choosing a discount to offer from a list of discounts. We’ll...
Optimize Any Python, Swift, or Java Object with Reinforcement Learning
Improve AI is a machine learning platform for making apps self-improving, meaning they optimize their own data structures and variables to improve revenue an...
Self Improving Apps: The Origin of a Radical Idea
I’ve been working on Improve AI for many years, but by 2017 the idea had begun to gel enough that I was ready to talk about it.
Improve AI - Easily Optimize Your App with Reinforcement Learning
Optimize and personalize your apps with fast AI decisions that get smarter over time. Decisions are made immediately, on-device, with no network latency. Th...
The NEW 20 lines of code that will beat A/B testing every time
In 2012, Steve Hanov wrote the popular and controversial blog post “20 lines of code that will beat A/B testing every time” that brought the previously acade...