Skip to content

Conversation

@yanboliang
Copy link
Contributor

For some implicit dataset, ratings may not exist in the training data. In this case, we can assume all observed pairs to be positive and treat their ratings as 1. This should happen when users set ratingCol to an empty string.

@SparkQA
Copy link

SparkQA commented Sep 29, 2015

Test build #43078 has finished for PR 8937 at commit 5643680.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be easier to define the rating col first:

val r = if ($(ratingCol) != "") col($(ratingCol)).cast(FloatType) else lit(1.0f)
val ratings = dataset.select(..., ..., r).map { row =>
  ...
}

@SparkQA
Copy link

SparkQA commented Sep 30, 2015

Test build #43115 has finished for PR 8937 at commit 9162a22.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 30, 2015

LGTM. Merged into master. Thanks!

@asfgit asfgit closed this in 2931e89 Sep 30, 2015
@yanboliang yanboliang deleted the spark-10736 branch May 5, 2016 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants