-
Notifications
You must be signed in to change notification settings - Fork 21
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
commit to Universal recommender #13
base: master
Are you sure you want to change the base?
Conversation
priceRange: Option[PriceRange] = None,// optional before and after filter applied to a date field | ||
blacklistItems: Option[List[String]] = None, | ||
blacklistCategory: Option[List[String]] = None, | ||
blacklistBrand: Option[List[String]] = None) | ||
extends Serializable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to be able to specify a filter like we do with properties, which include the property name so they can be used for any property not just Category or Brand. I suggest an addition to the field definition, perhaps a bias enumeration, like
"bias": {
"type": "not"
}
"bias": {
"value": -1 // for filter
}
the type and value would not be used together.
by default the type is None, which means current behavior.
This will allow any number of fields to be set for any named property. Likewise this could be put in the engine.json for global application or into the query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Pat
Just read your suggestions. Will work on it.
Once completed will send you PR
Some good work but we need to work with any property name not just Category or Brand, all properties are defined by the JSON in the $set so any name will work. Therefor the "field" in engine.json and the query will apply to them. So perhaps an extension of the "field" definition is the best way to handle categorical property exclusions. Likewise for the numerical range, this needs to be renamable for times when it does not apply to "price" |
Hi Pat Any suggestion on return Item properties along with Item score in recommendation result? |
These changes seem rather ambitious maybe create a new one for returning item properties against the master? That change is fairly simple but getting these working in a general way without hardcoded names will be more work. The item properties are returned from Elasticsearch but not used to create the result list. You could change the PredictedResults to include more data along with the score. It should be an Option controlled by a flag in the query or engine.json. Something like |
Thanks for response Pat. Working on this |
Features included -
Aggregate query for above features is -
curl -H "Content-Type: application/json" -d '{ "user": "u1", "num": 4,"includeItems" : ["Iphone 4","Nexus"], "blacklistCategory" :["c1"] , "blacklistBrand": ["b1"],"blacklistItems" :["i1"]}' http://localhost:8000/queries.json
We are working on code to make it more generic.