コード例 #1
0
 public double swaErrorObsNormed() {
   PatternFeature feature = expSpikePatternData.getSwa();
   // double minError = 0;
   // double maxError = expSpikePatternData.getCurrentDuration();
   double error =
       patternClassifier.getDynamicFeatWeightMatrix().get(PatternFeatureID.swa)
           * NormalizedErrorObsNormed(feature, modelSpikePattern.getSwa());
   displayRoutine(PatternFeatureID.swa, feature, modelSpikePattern.getSwa(), error);
   return error;
 }
コード例 #2
0
  public SpikePatternEvaluatorV2(
      SpikePatternAdapting modelSpikePattern,
      InputSpikePatternConstraint expSpikePatternData,
      double[] patternRepWeights,
      double modelVmin,
      double modelVr,
      double modelVt,
      boolean display,
      boolean displayOnlyClass,
      boolean externalSimUsed) {
    this.modelSpikePattern = modelSpikePattern;
    this.expSpikePatternData = expSpikePatternData;
    this.patternRepairWeights = patternRepWeights;
    this.modelVmin = modelVmin;
    this.modelVr = modelVr;
    this.modelVt = modelVt;
    this.display = display;

    /*if(display){
    	StatAnalyzer.display_stats = true;
    }*/
    patternClassifier = new SpikePatternClassifier(modelSpikePattern);
    if (externalSimUsed) { // HACK!!! no voltage for swa
      modelSpikePattern.setSwa(1);
    } else {
      modelSpikePattern.setSwa(measureSWA());
    }

    double swa = modelSpikePattern.getSwa(); // 1;//

    patternClassifier.classifySpikePattern(swa, true); // 1);//
    if (display || displayOnlyClass) {
      patternClassifier.getSpikePatternClass().display();
    }

    if (!ECJStarterV2.TURN_OFF_CLASSIFIER) {
      patternClassifier.determineWeightsForFeatures(expSpikePatternData.getSpikePatternClass());
    } else {
      patternClassifier.populateNullWeights();
    }
  }