sparseDataSet-class {rrecsys} | R Documentation |
Dataset class for tuples (user, item, rating).
Description
Container for a sparse dataset that distinguishes between binary and non-binary feedback datasets. Data are stored as tuples (user, item, rating). Extends _ds
.
Slots
data
:the dataset, class
"matrix"
.binary
:class
"logical"
, determines if the item dataset contains binary (i.e. 1/0) or non-binary ratings.minimum
:class
"numeric"
, defines the minimal value present in the dataset.maximum
:class
"numeric"
, defines the maximal value present in the dataset.intScale
:object of class
"logical"
, if TRUE the range of ratings in the dataset contains as well half star values.userID
:class
"numeric"
, array containing all user IDs.itemID
:class
"numeric"
, array containing all item IDs.userPointers
:class
"list"
, pointer to all users position in the dataset.itemPointers
:class
"list"
, pointer to all items position in the dataset.
Methods
- nrow
signature(object = "sparseDataSet"): number of rows of the dataset.
- ncol
signature(object = "sparseDataSet"): number of columns of the dataset.
- dim
signature(object = "sparseDataSet"): returns the dimensions of the dataset.
- rowRatings
signature(object = "sparseDataSet"): returns the number of ratings on each row.
- colRatings
signature(object = "sparseDataSet"): returns the number of ratings on each column.
- numRatings
signature(object = "sparseDataSet"): returns the total number of ratings.
- [
signature(x = "sparseDataSet", i = "ANY", j = "ANY", drop = "ANY")): returns a subset of the dataset.
- coerce
signature(from = "sparseDataSet", to = "matrix")
- rowAverages
signature(object = "sparseDataSet"): returns the average rating on each row.
- colAverages
signature(object = "sparseDataSet"): returns the average rating on each column.