Examples of ExampleSet


Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
   
    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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {

    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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

    }

    @Override
    public void doWork() throws OperatorException {
     
      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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
   
        ExampleSet exampleSet = exampleSetInput.getData();
        Attributes attributes = exampleSet.getAttributes()
        boolean OU = getParameterAsBoolean("Online updates");
       

             if (exampleSet.getAttributes().getSpecial("user identification") == null) {
                      throw new UserError(this,105);
                  }
             
             if (exampleSet.getAttributes().getSpecial("item identification") == 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 label=null;
            
              if(OU==true){
                if(Att.getLabel()!=null)
                  label=Att.getLabel();
              }
       
            RatingPredictor model = exampleSetInput1.getData();
   
            ExampleSet out=exampleSet;
           
            ArrayList<Integer> new_users=new ArrayList<Integer>();
            ArrayList<Integer> new_items=new ArrayList<Integer>();
            com.rapidminer.data.CompactHashSet<Integer> s2=new com.rapidminer.data.CompactHashSet<Integer>();
            com.rapidminer.data.CompactHashSet<Integer> s3=new com.rapidminer.data.CompactHashSet<Integer>();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

      }

      @Override
      public void doWork() throws OperatorException {
       
        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();
            Attributes aatr = attribute_set.getAttributes();
            AttributeRole ar=aatr.getRole("attribute identification");
            Attribute at=ar.getAttribute();

            ur=aatr.getRole("user identification");
            i=ur.getAttribute();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
       
        ExampleSet exampleSet = exampleSetInput1.getData();
        Attributes attributes = exampleSet.getAttributes();
       
        for(Attribute a : attributes)
          System.out.println(a.toString());
           
        System.out.println(exampleSet.size());
            System.out.println(attributes.size());
           
           
            ExampleSet  predicted= exampleSetInput1.getData();
           
           
            if (exampleSet.getAttributes().getSpecial("user identification") == null) {
                    throw new UserError(this,105);
                }
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
   
    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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
   
    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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

  }

  @Override
  public void doWork() throws OperatorException {
   
    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();
View Full Code Here

Examples of com.rapidminer.example.ExampleSet

    }

    @Override
    public void doWork() throws OperatorException {
     
      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();
         
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.