Coclustering¶

class
surprise.prediction_algorithms.co_clustering.
CoClustering
¶ Bases:
surprise.prediction_algorithms.algo_base.AlgoBase
A collaborative filtering algorithm based on coclustering.
This is a straighforward implementation of [GM05].
Basically, users and items are assigned some clusters \(C_u\), \(C_i\), and some coclusters \(C_{ui}\).
The prediction \(\hat{r}_{ui}\) is set as:
\[\hat{r}_{ui} = \overline{C_{ui}} + (\mu_u  \overline{C_u}) + (\mu_i  \overline{C_i}),\]where \(\overline{C_{ui}}\) is the average rating of cocluster \(C_{ui}\), \(\overline{C_u}\) is the average rating of \(u\)‘s cluster, and \(\overline{C_i}\) is the averate rating of \(i\)‘s cluster. If the user is unknown, the prediction is \(\hat{r}_{ui} = \mu_i\). If the item is unkown, the prediction is \(\hat{r}_{ui} = \mu_u\). If both the user and the item are unknown, the prediction is \(\hat{r}_{ui} = \mu\).
Clusters are assigned using a straightforward optimization method, much like kmeans.
Parameters:  n_cltr_u (int) – Number of user clusters. Default is
3
.  n_cltr_i (int) – Number of item clusters. Default is
3
.  n_epochs (int) – Number of iteration of the optimization loop. Default is
20
.  verbose (bool) – If True, the current epoch will be printed. Default is
False
.
 n_cltr_u (int) – Number of user clusters. Default is