company logo

ObjectRating - Create list of rating objects

The class provides services for creating rating object lists. A rating object list provides "most similar objects" by measuring similarities between objects. Objects are considered as similar, when they are member of the same collection. This is a typical issue e.g. in keyword search.

Object rating requires, that objects are associated with collections (i.e. all object referring to a specific keyword belong to the collection of objects referring to this keyword: objects referring to car may form the car collection, and objects referring to house may form the house collection). The same way, one may also identify objects having the same value for a certain attribute (e.g. hair color red creates a "red haired object" collection.)

Object rating requires that those category collections have been created in advance. Usually, this is not a big deal, since intending object rating allows creating category collections when creating or updating object instances or by using indexing services.

Keeping in mind, that properties to be compared for detecting similar object instances are represented in category collections, detecting similar objects for a number of rating properties is just a matter of counting and weighting the appearance of object instances in the category collections. In other words: objects matching optimal are those appearing in all category collections. Each matching property (or category collection) can be associated with a weight (default is 1). The score of an object instance is counted with the weight for each category collection that contains the object instance.

Object rating services can be used in different ways. You may create a result collection containing objects ordered by matching weight (Evaluate). By limiting the number of matching objects one may improve performance of the operation. In general, is is suggested to limit the expected result count.

You may also create a "virtual collection", which returns the instances one after the other in the required order (Next). This is a good strategy for one-way processes, i.e. processes iterating ones through the result collection.

In any case, you need to prepare the rating object by using the constructor or the AddCollection() function.

  ObjectRating      or(phlist,5);

  if ( !or.Evalueate(200) )

    or.Fill(temp_ph);

Attributes
    Functions