pyspark.mllib.recommendation.
Rating
Represents a (user, product, rating) tuple.
New in version 1.2.0.
Examples
>>> r = Rating(1, 2, 5.0) >>> (r.user, r.product, r.rating) (1, 2, 5.0) >>> (r[0], r[1], r[2]) (1, 2, 5.0)
Methods
count(value, /)
count
Return number of occurrences of value.
index(value[, start, stop])
index
Return first index of value.
Attributes
product
Alias for field number 1
rating
Alias for field number 2
user
Alias for field number 0
Methods Documentation
Raises ValueError if the value is not present.
Attributes Documentation