Skip to content

Instantly share code, notes, and snippets.

@andrewclegg
andrewclegg / cf.py
Created December 29, 2011 11:48 — forked from diogojc/cf.py
Regression based collaborative filtering
import numpy as np
from scipy.optimize import fmin_cg
def cost(p, Y, R, alpha):
"""
Calculates collaborative filtering cost function.
Arguments