Package cu.repsystestbed.util

Examples of cu.repsystestbed.util.DefaultArffFeedbackGenerator


    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    TrustGraph trustGraph = new TrustGraph(new TrustEdgeFactory());
   
    // populate the feedback history graph by parsing the feedbacks from a arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    List<Feedback> feedbacks = feedbackGen.generateHardcoded("feedbacks.arff");
   
    // add the feedbacks to the feedback history graph
    for(Feedback f : feedbacks)
    {
      feedbackHistoryGraph.addFeedback(f);
View Full Code Here


    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    TrustGraph trustGraph = new TrustGraph(new TrustEdgeFactory());
   
    // populate the feedback history graph by parsing the feedbacks from a arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
   
    // add the feedbacks to the feedback history graph
    feedbackHistoryGraph.addFeedbacks(feedbacks, true);
   
    // create the algorithms
View Full Code Here

   
    //add rank based trust alg as an observer to the reputation graph
    repGraph.addObserver(trustAlg);
   
    //parse the feedbacks from the arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
   
    //add the feedbacks to the feedback history graph
    feedbackHistoryGraph.addFeedbacks(feedbacks, true)
    feedbackHistoryGraph.notifyObservers(true);
View Full Code Here

  }
 
  public static ArrayList<Feedback> readFeedbacksArff() throws Exception
  {
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
    System.out.println(feedbacks.size());
    return feedbacks;
  }
View Full Code Here

   
    BasicConfigurator.configure();
    //readFeedbacksArff();
    //DefaultArffFeedbackGenerator.writeToArff(readFeedbacksArff(), "output.arff");
   
    DefaultArffFeedbackGenerator feedbackgen = new DefaultArffFeedbackGenerator();
   
    feedbackgen.writeToArff((ArrayList<Feedback>) feedbackgen.generate("feedbackgen.properties"),
        "autofeedbacks.arff");
   
   
  }
View Full Code Here

   
    //create a feedback history graph
    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
   
    //parse the feedbacks from the arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    List<Feedback> feedbacks = feedbackGen.generateHardcoded("feedbacks.arff");
   
    //add the feedbacks to the feedback history graph
    for(Feedback f : feedbacks)
    {
      feedbackHistoryGraph.addFeedback(f);
View Full Code Here

        logger.debug("Graph type is: " + t_graphType);
        logger.debug("Input file is: " + t_graphInputFile);
       
        if(t_graphType.toLowerCase().equals("fhg"))
        {
          DefaultArffFeedbackGenerator gen = new DefaultArffFeedbackGenerator();
          ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) gen.generateHardcoded(t_graphInputFile);
          FeedbackHistoryGraph fhg = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
          fhg.addFeedbacks(feedbacks, false);
          m_storage.put(t_graphName, fhg);
        }
        else if(t_graphType.toLowerCase().equals("rg"))
        {
          ReputationGraphCreator gen = new ReputationGraphCreator();
          ReputationGraph rg = gen.createGraph(t_graphInputFile);
          m_storage.put(t_graphName, rg);
        }
        else if(t_graphType.toLowerCase().equals("tg"))
        {
          TrustGraphCreator gen = new TrustGraphCreator();
          TrustGraph tg = gen.createGraph(t_graphInputFile);
          m_storage.put(t_graphName, tg);
        }
        else
        {
          throw new Exception("Unknown graphType.");
View Full Code Here

TOP

Related Classes of cu.repsystestbed.util.DefaultArffFeedbackGenerator

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.