Package com.jgaap.generics

Examples of com.jgaap.generics.AnalysisDriver


    }
    return builder.build();
  }
 
  public static AnalysisDriver getAnalysisDriver(String action) throws Exception{
    AnalysisDriver analysisDriver;
    String[] tmp = action.split("\\|", 2);
    action = tmp[0].trim().toLowerCase();
    if(analysisDrivers.containsKey(action)){
      analysisDriver = analysisDrivers.get(action).getClass().newInstance();
    }else{
      throw new Exception("Analysis Driver "+action+" not found!");
    }
    if(tmp.length > 1){
      analysisDriver.setParameters(tmp[1]);
    }
    return analysisDriver;
  }
View Full Code Here


            for(String culler : cullers) {
              experiment.addEventCuller(culler.trim(), eventDriver);
            }
          }
        }
        AnalysisDriver analysisDriver = experiment.addAnalysisDriver(analysis);
        if (!distance.isEmpty()) {
          experiment.addDistanceFunction(distance, analysisDriver);
        }
        experiment.execute();
        List<Document> resultDocuments;
View Full Code Here

      }
      String analysis = cmd.getOptionValue('a');
      if (analysis == null) {
        throw new Exception("No AnalysisDriver specified");
      }
      AnalysisDriver analysisDriver = api.addAnalysisDriver(analysis);
      String distanceFunction = cmd.getOptionValue('d');
      if (distanceFunction != null) {
        api.addDistanceFunction(distanceFunction, analysisDriver);
      }
      api.execute();
View Full Code Here

   * @param action - the unique identifier for a AnalysisDriver (alternately a DistanceFunction)
   * @return - a reference to the generated Analysis Driver
   * @throws Exception - If the AnalysisDriver cannot be found or if it cannot be instanced
   */
  public AnalysisDriver addAnalysisDriver(String action) throws Exception {
    AnalysisDriver analysisDriver = AnalysisDrivers.getAnalysisDriver(action);
    return addAnalysisDriver(analysisDriver);
  }
View Full Code Here

    knowns.add(knownDocument2);
   
    Document unknownDocument = new Document();
    unknownDocument.addEventSet(null, unknown);
   
    AnalysisDriver analysisDriver = new MahalanobisDistance();
    analysisDriver.train(knowns);
    List<Pair<String, Double>> t = analysisDriver.analyze(unknownDocument);
    for(Pair<String, Double> element : t){
      System.out.println(element.toString());
    }
    String r = t.get(0).getFirst();
View Full Code Here

    ReviewPanel_ProcessButton.setEnabled(OK);
  }

  private void AddAnalysisMethodSelection() {
    try {
      AnalysisDriver temp = JGAAP_API
          .addAnalysisDriver(AnalysisMethodPanel_AnalysisMethodsListBox
              .getSelectedValue().toString());
      if (temp instanceof NeighborAnalysisDriver) {
        JGAAP_API.addDistanceFunction(
            AnalysisMethodPanel_DistanceFunctionsListBox
View Full Code Here

  }// GEN-LAST:event_AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseMoved

  private void AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseClicked(
      java.awt.event.MouseEvent evt) {// GEN-FIRST:event_AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseClicked
    if (!SelectedAnalysisDriverList.isEmpty()) {
      AnalysisDriver temp = SelectedAnalysisDriverList
          .get(AnalysisMethodPanel_SelectedAnalysisMethodsListBox
              .getSelectedIndex());
      AnalysisMethodPanel_AMParametersPanel.removeAll();
      AnalysisMethodPanel_DFParametersPanel.removeAll();
      AnalysisMethodPanel_AMParametersPanel.setLayout(temp
          .getGUILayout(AnalysisMethodPanel_AMParametersPanel));
      if (temp instanceof NeighborAnalysisDriver) {
        AnalysisMethodPanel_DFParametersPanel
            .setLayout(((NeighborAnalysisDriver) temp)
                .getDistanceFunction().getGUILayout(
                    AnalysisMethodPanel_DFParametersPanel));
      }
      AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setText(temp
          .longDescription());
      if (temp instanceof NeighborAnalysisDriver) {
        AnalysisMethodPanel_DistanceFunctionDescriptionTextBox
            .setText(((NeighborAnalysisDriver) temp)
                .getDistanceFunction().longDescription());
View Full Code Here

TOP

Related Classes of com.jgaap.generics.AnalysisDriver

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.