Package com.rapidminer.example

Examples of com.rapidminer.example.Attribute


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


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

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

                      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>();
           
            ArrayList<Integer> r_users=null;
            ArrayList<Integer> r_items=null;
            ArrayList<Double> ratings=null;
           
             Attribute pred = AttributeFactory.createAttribute("prediction",
                Ontology.REAL);
         
             if(!attributes.contains(pred)){
            attributes.addRegular(pred);
            ExampleTable a=exampleSet.getExampleTable();
View Full Code Here

                      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();

            SparseBooleanMatrix mat=new SparseBooleanMatrix();
View Full Code Here

          
           if (exampleSet.getAttributes().getLabel() == null) {
                    throw new UserError(this, 105);
                }
             
               Attribute m1 = AttributeFactory.createAttribute("RMSE", Ontology.REAL);
               Attribute m2 = AttributeFactory.createAttribute("MAE", Ontology.REAL);
               Attribute m3 = AttributeFactory.createAttribute("NMAE", Ontology.REAL);
             
              List<Attribute> attr=new ArrayList<Attribute>();
              attr.add(m1); attr.add(m2); attr.add(m3);
              MemoryExampleTable a=new MemoryExampleTable(attr);
             
View Full Code Here

     
      this.dim1=data.size();
      this.dim2=data.getAttributes().size();
      this.data = new double[this.dim1 * this.dim2];
     
      Attribute source=data.getAttributes().get("user_id");
      String newName = "id(" + source.getName() + ")";
      Attribute user = AttributeFactory.createAttribute(newName, Ontology.INTEGER);
      user.setTableIndex(source.getTableIndex());
      source=data.getAttributes().get("item_id");
      newName = "id(" + source.getName() + ")";
      Attribute item = AttributeFactory.createAttribute(newName, Ontology.INTEGER);
      item.setTableIndex(source.getTableIndex());
      source=data.getAttributes().get("rating");
      newName = "rating";
      Attribute rating = AttributeFactory.createAttribute(newName, Ontology.REAL);
      rating.setTableIndex(source.getTableIndex());
      int i=0,j=0;
     
     
    for (Example example : data) {
     
View Full Code Here

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

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

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

TOP

Related Classes of com.rapidminer.example.Attribute

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.