Examples of IRatings


Examples of com.rapidminer.data.IRatings

   
    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);
         
        }
       
     
         System.out.println(training_data.GetMaxItemID()+" "+training_data.GetMaxUserID());
       
        
        Random recommendAlg=new Random();
 
         recommendAlg.user_mapping=user_mapping;
View Full Code Here

Examples of com.rapidminer.data.IRatings

    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);
         
        }
       
       
         int correlationMode = getParameterAsInt("Correlation mode");
View Full Code Here

Examples of com.rapidminer.data.IRatings

     
      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);
          }
         
             
           FactorWisedMatrixFactorization recommendAlg=new FactorWisedMatrixFactorization();
         
View Full Code Here

Examples of com.rapidminer.data.IRatings

        ExampleSet exampleSet = exampleSetInput.getData();
           
            IEntityMapping user_mapping=new EntityMapping();
            IEntityMapping item_mapping=new EntityMapping();
            IEntityMapping attr_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);
             
            }
           
           
            ExampleSet attribute_set=exampleSetInput1.getData();
View Full Code Here

Examples of com.rapidminer.data.IRatings

   
    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);
         
        }
       
     
         System.out.println(training_data.GetMaxItemID()+" "+training_data.GetMaxUserID());
       
        
         int correlationMode = getParameterAsInt("Correlation mode");
         _itemKnn recommendAlg;
        
View Full Code Here

Examples of com.rapidminer.data.IRatings

     
      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);
           
          }
         
         
          ExampleSet attribute_set=exampleSetInput1.getData();
         
          if (attribute_set.getAttributes().getSpecial("item identification") == null) {
                  throw new UserError(this,105);
              }
         
            if (attribute_set.getAttributes().getSpecial("attribute identification") == null) {
                  throw new UserError(this, 105);
              }
        
         
          Attributes aatr = attribute_set.getAttributes();
          AttributeRole ar=aatr.getRole("attribute identification");
          Attribute at=ar.getAttribute();
          ir=aatr.getRole("item identification");
          i=ir.getAttribute();
         
          SparseBooleanMatrix mat=new SparseBooleanMatrix();
       
         
            for (Example example : attribute_set) {
           
            double j;

            j=example.getValue(i);
            int iid=item_mapping.ToInternalID((int) j);
           
            j=example.getValue(at);
            int aid=(int)j;
            mat.setLocation(iid, aid, true);
          }
         
            System.out.println();
           System.out.println(training_data.GetMaxItemID()+" "+training_data.GetMaxUserID());
          
           ItemAttributeKnn recommendAlg=new ItemAttributeKnn();
         
          
           int K=getParameterAsInt("k");
View Full Code Here

Examples of com.rapidminer.data.IRatings

   
    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);
         
        }
       
        
        GlobalAverage recommendAlg=new GlobalAverage();
View Full Code Here

Examples of com.rapidminer.data.IRatings

   
    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);
       
        }
   
         MatrixFactorization recommendAlg=new MatrixFactorization();
        
View Full Code Here

Examples of com.rapidminer.data.IRatings

   
    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);
         
        }
       
          
         _slopeOne recommendAlg=new _slopeOne();
View Full Code Here

Examples of com.rapidminer.data.IRatings

   
    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);
        }
       
       
         boolean factorizationMode = getParameterAsBoolean("MAE optimized");
        
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.