Learn R Programming

rrecsys (version 0.9.5.4)

defineData: Define dataset.

Description

Defines your dataset, if either it is implicit or explicit.

Usage

defineData(data, binary = FALSE, minimum = 1, maximum = 5, 
  halfStar = FALSE, goodRating = 0.5)

Arguments

data

the dataset, class "matrix".

binary

class "logical", defines if the item dataset consists of binary (i.e. 0/1) or non-binary ratings. Deafault value FALSE.

minimum

class "numeric", defines the minimal value present in the dataset. Deafault value 1.

maximum

class "numeric", defines the maximal value present in the dataset. Deafault value 5.

halfStar

object of class "logical", if TRUE the range of ratings in the dataset contains as well half star values. Deafault value FALSE.

goodRating

class "numeric", in case binary is TRUE, goodRating defines the threshold value for binarizing the dataset (i.e. any rating value >= goodRating will be transformed to 1 and all other values to 0(corresponding to a not rated item). Deafault value 0.5.

Value

Returns an object of class "dataSet".

See Also

See Also as dataSet-class.

Examples

Run this code
# NOT RUN {
data(mlLatest100k)

a <- defineData(mlLatest100k)

b <- defineData(mlLatest100k, TRUE, goodRating = 3)

# }

Run the code above in your browser using DataLab