Examples of EigenTrust


Examples of cu.repsystestbed.algorithms.examples.EigenTrust

    {
      feedbackHistoryGraph.addFeedback(f);
    }
   
    // create the algorithms
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.EigenTrust");
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.RankbasedTrustAlg");
   
    // create the work flow and add the items
    Workflow workflow = new Workflow();
    workflow.addItem(feedbackHistoryGraph);
View Full Code Here

Examples of cu.repsystestbed.algorithms.examples.EigenTrust

   
    // add the feedbacks to the feedback history graph
    feedbackHistoryGraph.addFeedbacks(feedbacks, true);
   
    // create the algorithms
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.EigenTrust");
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.RankbasedTrustAlg");
   
    // create the work flow and add the items
    Workflow workflow = new Workflow();
    workflow.addItem(feedbackHistoryGraph);
View Full Code Here

Examples of cu.repsystestbed.algorithms.examples.EigenTrust

    workflow2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    workflow2.setSize(400, 320);
    workflow2.setVisible(true);
   
    //eigentrust needs to use the feedback history graph
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.EigenTrust");
    repAlg.setGraph2Listen(feedbackHistoryGraph);
    repAlg.setGraph2Output(repGraph);
   
    //add eigentrust as an observer to the feedback history graph
    feedbackHistoryGraph.addObserver(repAlg);
   
    //rank based trust alg needs to use the reputation graph
View Full Code Here

Examples of cu.repsystestbed.algorithms.examples.EigenTrust

  public static void main(String[] args) throws Exception
  {
    BasicConfigurator.configure();
   
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.EigenTrust");
    //initialize the eigentrust parameters
//    repAlg.setIterations(10);
//    repAlg.setThreshold2Satisfy(0.7);
   
    //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);
    }
   
    //eigentrust needs to use the feedback history graph
    repAlg.setGraph2Listen(feedbackHistoryGraph);
   
    //add eigentrust as an observer to the feedback history graph
    feedbackHistoryGraph.addObserver(repAlg);
   
    //make eigentrust calculate the reputation of all the agents
    feedbackHistoryGraph.notifyObservers(false);
   
    ReputationGraph repGraph = (ReputationGraph) repAlg.getGraph2Output();
    //TODO display the reputation graph.
   
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.RankbasedTrustAlg");
    trustAlg.setRatio(0.7);
    trustAlg.setGraph2Listen(repGraph);
View Full Code Here

Examples of cu.repsystestbed.algorithms.examples.EigenTrust

  {
    BasicConfigurator.configure();
   
    Hashtable<String, Object> storage = new Hashtable<String, Object>();
    storage.put("fhg", new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory()));
    storage.put("et", new EigenTrust());
    storage.put("rg", new ReputationGraph(new ReputationEdgeFactory()));
    storage.put("as", new Appleseed());
    storage.put("rk", new RankbasedTrustAlg());
    storage.put("tg", new TrustGraph(new TrustEdgeFactory()));
   
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.