コード例 #1
0
  /**
   * Data process.
   *
   * @param positive the positive
   * @param negative the negative
   * @return the vector signature[][]
   * @throws ClassifierException the classifier exception
   */
  protected DefaultVectorSignature[][] dataProcess(
      DefaultVectorSignature[] positive, DefaultVectorSignature[] negative)
      throws ClassifierException {
    log("Launching DataProcessor for learn data");
    DefaultVectorSignature[][] data = new DefaultVectorSignature[2][];

    try {
      dataProcessor.estimateParameters(positive, negative);
      data[0] = dataProcessor.apply(positive);
      data[1] = dataProcessor.apply(negative);
      learnDataProcessed = true;
    } catch (SignatureException e) {
      throw new ClassifierException(e);
    }

    return data;
  }