Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve data on non-active items for PopModel #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chEbba
Copy link

@chEbba chEbba commented Jan 12, 2016

Model:

  • 100 items (1-100) with properties
  • 100 main events.
  • Events during last days (backfillField.duration) only for top 10 Items (91-100)
  • Engine with "recsModel": "all"

Training:
https://github.com/PredictionIO/template-scala-parallel-universal-recommendation/blob/v0.2.3/src/main/scala/URAlgorithm.scala#L152-L168

  • As we have "recsModel": "all" (popular=true) we calculate PopModel
  • PopModel using events only for backfillField.duration, so we got pop results only for items 91-100
  • Then we combine data form allFields with popModel
      val pm = if (pms._1.nonEmpty && pms._2.nonEmpty) {
          val newPM = pms._1.head.fields + (backfillFieldName -> JDouble(pms._2.head))
          PropertyMap(newPM, pms._1.head.firstUpdated, DateTime.now())
        } else if (pms._2.nonEmpty) PropertyMap(Map(backfillFieldName -> JDouble(pms._2.head)), DateTime.now(), DateTime.now())
        else PropertyMap( Map.empty[String, JValue], DateTime.now, DateTime.now) // some error????
  • As we don't have popularity for items 1-90 we get empty properties for all that items

Query:

  • If we use date filters we will select only from items 91-100 (as all other items missed date properties)
  • Boost/filter by fields works only on items 91-100

Solution:

  • Preserve data on non-active items

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.

1 participant