Skip to content

Instantly share code, notes, and snippets.

/**
* With `authors` schema: { _id, name } and `books` schema: { _id, name, authorId },
* select all authors with all their books.
*/
// Simple way
db.authors.aggregate([
{
$lookup: {
from: "books",
@filipkrw
filipkrw / ranking.py
Created March 27, 2022 12:53 — forked from agramfort/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer.
Authors: Fabian Pedregosa <[email protected]>
Alexandre Gramfort <[email protected]>
"""