aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/daemon.py
diff options
context:
space:
mode:
authorXiangrui Meng <meng@databricks.com>2014-11-18 10:35:29 -0800
committerXiangrui Meng <meng@databricks.com>2014-11-18 10:35:41 -0800
commit48d601f0bac33583c345b2ceebd30a639a20db4e (patch)
tree42ca5fdc4f6c8da6e458dca835357cf10d9eb2a8 /python/pyspark/daemon.py
parenta28902f25fc2a685c4a5663e976c1d735265ecb0 (diff)
downloadspark-48d601f0bac33583c345b2ceebd30a639a20db4e.tar.gz
spark-48d601f0bac33583c345b2ceebd30a639a20db4e.tar.bz2
spark-48d601f0bac33583c345b2ceebd30a639a20db4e.zip
[SPARK-4396] allow lookup by index in Python's Rating
In PySpark, ALS can take an RDD of (user, product, rating) tuples as input. However, model.predict outputs an RDD of Rating. So on the input side, users can use r[0], r[1], r[2], while on the output side, users have to use r.user, r.product, r.rating. We should allow lookup by index in Rating by making Rating a namedtuple. davies <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/apache/spark/3261) <!-- Reviewable:end --> Author: Xiangrui Meng <meng@databricks.com> Closes #3261 from mengxr/SPARK-4396 and squashes the following commits: 543aef0 [Xiangrui Meng] use named tuple to implement ALS 0b61bae [Xiangrui Meng] Merge remote-tracking branch 'apache/master' into SPARK-4396 d3bd7d4 [Xiangrui Meng] allow lookup by index in Python's Rating (cherry picked from commit b54c6ab3c54e65238d6766832ea1f3fcd694f2fd) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Diffstat (limited to 'python/pyspark/daemon.py')
0 files changed, 0 insertions, 0 deletions