Hi,

I need to build a rating system for a travel community . It will contain user preferences such as say average time of the aircraft,aircraft age,legroom,number of stops, route quality. These might be modelled as checkboxes on my web page. The user can then select which all criterias he would prefer. So say for instance, the user can prefer to select the legroom ,the aircraft age and the number of stops and choose to ignore the rest. I have historical data for all of these in a backend database. I now have to compute a rating for the trip the user has chosen based on the following preferences. I have tried giving weights to individual parameters like say 0.3 to the average time of the aircraft,0.2 to aircraft age and so on. Then I tried calculating the weighted average of all the parameters. This approach seems to get stuck when the user doesn't select every parameter. So say for instance if the user chooses to leave parameters such as legrrom and number of stops. In the weighted avergae these becomes zero which ultimately brings down the rating of the trip . This is not fair since the user did not want that criteria to be included. can anyone show me a better approach to this problem ,or a mathematical abstraction that can help me .

I suggest you solve this by creating a list of all the parameters that are included on a specific flight. Then you compare this list to the users list, and each match adds to the rating points.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.