prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Advanced explanations #99

Closed prmr closed 10 years ago

prmr commented 10 years ago

Show a barplot of the attribute values (or an ordered list for categorical attributes) when the user selects (somehow) the attribute in the ranked product list.

asutcl commented 10 years ago

If we have time I think it would be beneficial to first do a few mock ups of different ways to present these explanations and then show them to a couple of our friends and ask them what they think is most informative.

We would have to have these mock ups (between 2 and 3) by Thursday or Friday, and then we could all ask one or two people to look at them and just post their more relevant comments. That way we can make more informed decisions about what information is best to display.

priyasidhaye commented 10 years ago

Sure. I was looking at making the directions and scores visible to the explanations and it can be done pretty easily. So once we know how it should look we can work on the display part of it

On Wed, Apr 9, 2014 at 11:01 AM, asutcl notifications@github.com wrote:

If we have time I think it would be beneficial to first do a few mock ups of different ways to present these explanations and then show them to a couple of our friends and ask them what they think is most informative.

We would have to have these mock ups (between 2 and 3) by Thursday or Friday, and then we could all ask one or two people to look at them and just post their more relevant comments. That way we can make more informed decisions about what information is best to display.

Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/99#issuecomment-39974284 .

asutcl commented 10 years ago

I have made a few mockups that I have posted below. I was inspired by the website I found. #109 Comments would be appreciated. If there are things we like in them I would be willing to work on them.

Just a brief explanation:

creco creco-more

nishanthtgwda commented 10 years ago

I think after the discussion with Andrew, here is how the expected display should be looking :

  1. Checkboxes replaced by sliders
  2. By default shows the top 3 attributes bar graph and shows the highlighted position of the product in the bar graph.
  3. Roll over on the explanations shows the list of all the attributes of the product with all the values according to their ranks. (Similar to the one on the webiste)

Please beat on this and comment on things which can be improved.

nishanthtgwda commented 10 years ago

The detailed explanations (rolling over on the text), shows the detailed list of all attributes for the product with respect to their ranks. Only attributes which have a rank or are non-boolean have their details in the Detailed explanations. What attributes have a low value can be gauged by looking at relative comparisons with others. The details pop up when user rolls over the text. (next to the product name on the right side). Merged with the master branch. Also I have added a dependency, please refresh your dependencies.

@MariamN : I have used a delimited of "|||" for parsing the detailed explanations as the user clicked explanations are also displayed concurrently. Both of them have a JSON format though.

asutcl commented 10 years ago

@nishanth1991 Are you still working on some things? I was going to look at in line explanations (name and visuals) and I can also look into the bar charts. Let me know if you are already working on these so we don't do the same work twice.

priyasidhaye commented 10 years ago

I started trying line explanations, since nishanth is taking care of the graphs.

asutcl commented 10 years ago

Shoots, I've got something for inline, it's not perfect yet but it's not far. Its on a seperate branch though so it doesn't matter. Maybe it's better to have two slightly different versions we can then pick the one that works/looks best once everything is in.

asutcl commented 10 years ago

So I've been looking at it for a while and to add the sliders in the right way would require quite a bit of re-factoring. The GSON call on the front end string currently builds three lists one with the ids one with names and a third with values. Ideally this call should extract a list of object (triples) where each object contains a name, an id and a value. This way we can keep tract of which user score (from slider) goes with which attribute. This implies changes in the UserFeatureModel, the SiteController, the UserFacade, the ProductRanker, the RankingExplanation and the RankingExplanationInstance classes.

I suggest we simply put indications of the correlation score next to the attributes, for now.

That being said I think a change would allow is to clean up a lot of code. If everyone agrees with me I can propagate these changes through the logic and clean out a lot of things. I am just not sure how the response is passed to the 'UserFeatureModel`, so someone would need to do that first.

enewe101 commented 10 years ago

Hey everyone, I've just come out of finals! So I'm catching up. I see that we are ditching the slider idea? It seems to complicated eh? Maybe for the best.

Right now I'm trying to figure out what to do because my original plan was to work on #102, but @ceipher has this one, and maybe he's best suited for it anyway. There seems to be a lot of work to do with this issue, but there are also a lot of cooks! I would love to know if there is some way that I can bolster the effort here. Meanwhile, I'll look for something else to work on.

By the way, for plotting, I have previously had lots of luck using this JS library: http://www.flotcharts.org/ I recommend you have a look @priyasidhaye !

enewe101 commented 10 years ago

I have a question -- I'm not sure who's in the best position to answer this though.

In the ConcreteServiceFacade.sendCurrentFeatureList(), around line 185, we have the following line:

userScoredFeaturesSpecs = sortFeatures(userScoredFeaturesSpecs);

What is the purpose of this? Why sort the features before using them to rank the products? I can't see where this has any impact?

The reason I ask is that I'm thinking about trying to bring in the sliders. I know, given what @asutcl said this might be a fool's errand! But it's a very enticing goal. It would be sweet. I do see that this change has to percolate through several classes, but some of the equipment was anticipated.

One thing is that it would interact with the fact that we already weight attribute scores based on the degree of correlation. So this would introduce also weighting based on the slider position. That doesn't strike me as problematic. Just noteworthy.

So I'm seriously considering attempting to add sliders. Call for thoughts -- what do you think? Is this a bad idea, or would it interact badly with other ongoing dev?

BTW, nice work on the graphs (@nishanth1991 I think?) Looks good!

asutcl commented 10 years ago

I think sliders would be cool, and I wanted to start working on them but when I looked at how to do that I saw a bit of the same issues you are posting here.

My main worry is that the values right now are not coupled with any of the ids. @MariamN emailed me to tell me she was working on some code in that area.

For this reason I stashed my changes but one idea is to have a wrapper around the ScoredAttributes that has a userRating and then use this user rating to produce score.

As I said though the UserModel should hold logical links between values and attribute ids that are more robust than just having the same index in two different arrays, which is what I think it is right now.

asutcl commented 10 years ago

I think @MariamN is working on the sliders right now/

nishanthtgwda commented 10 years ago

5a25be916eb3c1835e1b0c2475050073397f2a4c Committed the codes for the graph display . [tmp-master branch] Please check the tmp-master branch for the bar-graph display. All the values are displayed. with varying heights as per the rank with the current product highlighted in the rank. Roll over on the current product or the other products on the bar graph will give detailed information about it. Clicking on any of the bars will redirect to the main URL page. Currently the first 3 top attributes bar graph are being displayed as per @asutcl mockup's . If the current product does not have any value/rank for the attribute, no information tag is displayed. I am not sure how the sliders will be integrated and how the existing explanation(progress bars) will be replaced, so I have concatenated with the existing stuff present.

@enewe101 : Usage of other library graph tools reduced my flexibility options a bit regarding roll over and stuff and hence I decided to do my own graphs.

Please beat on it and if no one has a problem I will integrate my code into master tomorrow afternoon.

nishanthtgwda commented 10 years ago

Note : The graph generation takes a bit of time for large category search results notably smartphones and Laptop, but works fine in smaller category results

enewe101 commented 10 years ago

@nishanth1991 Those graphs are hot! I really like the context it gives you, and the way that you can see the competitors by rolling over the bars!

One funny glitch: clicking on a bar opens up a billion tabs in firefox.

I can see that the top 3 attributes get graphs, no matter what the attributes the user has clicked (which you mentioned of course) --- is it feasible to also make the the user-chosen attributes display with the same graph you've made for the top 3? At the moment, there's a lot of competing modalities for displaying the same info.

enewe101 commented 10 years ago

@asutcl , @MariamN , let's move the discussion of sliders to its own issue, since this issue is starting to look like a general messaging board! I'm opening an issue, for it and I'm posting an idea I had there, so have a look!

asutcl commented 10 years ago

I cleaned up the interface a bit. Since graphs don't all load at start up now it is slightly faster on load up. Although I think it will be much faster once we have a cut off point for the products.

I saw there had been some changes to the .project and .classpath files when I merged tmp-master and into interface_work_asutcl, that was branched off the latest master. I was not able not to commit these after the merge through egit, so I haven't merged back into anywhere.

If anyone can try out my branch (interface_work_asutcl) and let me know if things run well, they do on my computer.

enewe101 commented 10 years ago

Hey, I just tried it. The graphs size and placement is really slick!

I'm having an issue with the autocomplete though -- I see a bunch of json instead of the expected completion, maybe something got lost in the process there?

As you mentioned I am getting that the .classpath, .project, and .settings/org.eclipse.jdt.core.prefs are different.

I know why -- remember after milestone 0.4 we noticed I had committed .classpath etc? Well that got solved on master, but I guess not on tmp-master. I just pulled the .classpath etc files over from master into interface_work_asutcl, so that should solve the issue. I've pushed that change to origin/interface_work_asutcl, so you could just pull on that branch.

I didin't go so far as to merge straight to master, because there's that issue with auto-complete.

asutcl commented 10 years ago

I had that issue also after I merged the master into the branch.,

I did a compare with the master and nothing seemed off with the auto-complete. When I stopped it and relaunched it, it started working so I am stumped on this one. I don't know why it didn't work and I don't know why it started working again.

On 17 April 2014 11:59, enewe101 notifications@github.com wrote:

Hey, I just tried it. The graphs size and placement is really slick!

I'm having an issue with the autocomplete though -- I see a bunch of json instead of the expected completion, maybe something got lost in the process there?

As you mentioned I am getting that the .classpath, .project, and .settings/org.eclipse.jdt.core.prefs are different.

I know why -- remember after milestone 0.4 we noticed I had committed .classpath etc? Well that got solved on master, but I guess not on tmp-master. I just pulled the .classpath etc files over from master into interface_work_asutcl, so that should solve the issue. I've pushed that change to origin/interface_work_asutcl, so you could just pull on that branch.

I didin't go so far as to merge straight to master, because there's that issue with auto-complete.

— Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/99#issuecomment-40730551 .

nishanthtgwda commented 10 years ago

Looking into the issue now.

nishanthtgwda commented 10 years ago

Ok I am not really sure of whats happening wrong. Can anyone give any example of where they are experiencing errors?

enewe101 commented 10 years ago

I will post in one sec. I just need to do one thing, and I want to re-pull, re-build and try it to make sure I'm not sending you bad info!

On Thu, Apr 17, 2014 at 12:12 PM, nishanth1991 notifications@github.comwrote:

Ok I am not really sure of whats happening wrong. Can anyone give any example of where they are experiencing errors?

— Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/99#issuecomment-40732046 .

enewe101 commented 10 years ago

Sorry for the delay -- just juggling this with planning a family get together.

Alright, I re-pulled, rebuilt, reran, and still get the problem. Here's how:

enewe101 commented 10 years ago

Moving the bug with autocomplete to its own issue (#113)

MariamN commented 10 years ago

Hi Nishanth, I'm not sure why are you using the delimiter (III) when sending the explanations. I think it's better to format it as json object. Is there any reason why you chose not to? Do you want me to convert it?

On Apr 17, 2014, at 3:18 PM, enewe101 notifications@github.com wrote:

Moving the bug with autocomplete to its own issue (#113)

— Reply to this email directly or view it on GitHub.

nishanthtgwda commented 10 years ago

Hello Mariam, When we were working at the beginning, the response to the ajax request was a json string with explanations pertaining to only the checked boxes. But since in the graph generation I needed the explanations of all attributes, I inserted a delimiter so that the first part is not altered from the second part(the complete explanations json) from which the graphs were constructed.

Once the sliders come in, I dont think the first part of JSON will be required and only total JSON array will be returned . I think you can convert it appropriately, so as to suit the slider display.

priyasidhaye commented 10 years ago

For the one line explanations, I used the scored attributes and their values to generate a string. I realized a lot of products don't have descriptions, and the ones that do mostly list the attributes too. My code is in the Oneline_Explanation branch. Does it look okay? Do we need to also add stuff from the description if it is present?

On Thu, Apr 17, 2014 at 5:09 PM, nishanth1991 notifications@github.comwrote:

Hello Mariam, When we were working at the beginning, the response to the ajax request was a json string with explanations pertaining to only the checked boxes. But since in the graph generation I needed the explanations of all attributes, I inserted a delimiter so that the first part is not altered from the second part(the complete explanations json) from which the graphs were constructed.

Once the sliders come in, I dont think the first part of JSON will be required and only total JSON array will be returned . I think you can convert it appropriately, so as to suit the slider display.

— Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/99#issuecomment-40763063 .

MariamN commented 10 years ago

@nishanth1991 I just pushed the sliders code to branch issue101. I integrated it with your explanation code. Can you please check it out and double check to see if the explanations part are behaving the way they are supposed to.

nishanthtgwda commented 10 years ago

@MariamN : Yup checked it out, and it behaves perfectly. No problems on the detailed explanations.

asutcl commented 10 years ago

This seems to be working, and since no one commented on the display I figure everyone is ok with it so I will go ahead and close this.