Skip to content

Commit

Permalink
[SPARK-29269][PYTHON][ML] Pyspark ALSModel support getters/setters
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Add getters/setters in Pyspark ALSModel.

### Why are the changes needed?
To keep parity between python and scala.

### Does this PR introduce any user-facing change?
Yes.
add the following getters/setters to ALSModel
```
get/setUserCol
get/setItemCol
get/setColdStartStrategy
get/setPredictionCol
```

### How was this patch tested?
add doctest

Closes #25947 from huaxingao/spark-29269.

Authored-by: Huaxin Gao <huaxing@us.ibm.com>
Signed-off-by: zhengruifeng <ruifengz@foxmail.com>
  • Loading branch information
huaxingao authored and zhengruifeng committed Oct 8, 2019
1 parent 7d80aa5 commit ffddfc8
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private[recommendation] trait ALSModelParams extends Params with HasPredictionCo
* Common params for ALS.
*/
private[recommendation] trait ALSParams extends ALSModelParams with HasMaxIter with HasRegParam
with HasPredictionCol with HasCheckpointInterval with HasSeed {
with HasCheckpointInterval with HasSeed {

/**
* Param for rank of the matrix factorization (positive).
Expand Down

0 comments on commit ffddfc8

Please sign in to comment.