Hierarchical classes modeling of rating data