Package com.rapidminer.data

Examples of com.rapidminer.data.Ratings


   
    ExampleSet exampleSet = exampleSetInput.getData();
       
        IEntityMapping user_mapping=new EntityMapping();
        IEntityMapping item_mapping=new EntityMapping();
        IRatings training_data=new Ratings();
       
      if (exampleSet.getAttributes().getSpecial("user identification") == null) {
                throw new UserError(this,105);
            }
       
       if (exampleSet.getAttributes().getSpecial("item identification") == null) {
                throw new UserError(this, 105);
            }
      
       if (exampleSet.getAttributes().getLabel() == null) {
                throw new UserError(this, 105);
            }
      
       Attributes Att = exampleSet.getAttributes();
       AttributeRole ur=Att.getRole("user identification");
       Attribute u=ur.getAttribute();
       AttributeRole ir=Att.getRole("item identification");
       Attribute i=ir.getAttribute();
       Attribute ui=Att.getLabel();
       
        for (Example example : exampleSet) {
         
          double j=example.getValue(u);
          int uid=user_mapping.ToInternalID((int) j);

          j=example.getValue(i);
          int iid=item_mapping.ToInternalID((int) j);

          double r=example.getValue(ui);
          training_data.Add(uid, iid, r);
        }
        
       
         BiPolarSlopeOne recommendAlg=new BiPolarSlopeOne();
       
View Full Code Here


   
    ExampleSet exampleSet = exampleSetInput.getData();
       
        IEntityMapping user_mapping=new EntityMapping();
         IEntityMapping item_mapping=new EntityMapping();
        IRatings training_data=new Ratings();
       
       if (exampleSet.getAttributes().getSpecial("user identification") == null) {
                throw new UserError(this,105);
            }
       
       if (exampleSet.getAttributes().getSpecial("item identification") == null) {
                throw new UserError(this, 105);
            }
      
       if (exampleSet.getAttributes().getLabel() == null) {
                throw new UserError(this, 105);
            }
      
       Attributes Att = exampleSet.getAttributes();
       AttributeRole ur=Att.getRole("user identification");
       Attribute u=ur.getAttribute();
       AttributeRole ir=Att.getRole("item identification");
       Attribute i=ir.getAttribute();
       Attribute ui=Att.getLabel();
       
        for (Example example : exampleSet) {
         
          double j=example.getValue(u);
          int uid=user_mapping.ToInternalID((int) j);

          j=example.getValue(i);
          int iid=item_mapping.ToInternalID((int) j);

          double r=example.getValue(ui);
          training_data.Add(uid, iid, r);
         
        }
            
        UserItemBaseline recommendAlg=new UserItemBaseline();
 
View Full Code Here

TOP

Related Classes of com.rapidminer.data.Ratings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.