Package ca.nengo.math.impl

Examples of ca.nengo.math.impl.LinearCurveFitter.fit()


    for (int i=0; i<values[0].length; i++) {
      values[0][i] = -9 + i * 2;
      values[1][i] = target.map(new float[]{values[0][i]});
    }
   
    Function fitted = lcf.fit(values[0], values[1]);
   
//    Plotter.plot(target, -10, 0.1f, 10, "target");
//    Plotter.plot(fitted, -10, 0.5f, 10, "fitted");
   
    float targetVal = 0f;
View Full Code Here


      countSpikes(myCurrents[i], dt, myTransientTime);
      rates[i] = countSpikes(myCurrents[i], dt, simTime) / simTime;
    }

    CurveFitter cf = new LinearCurveFitter();
    Function result = cf.fit(myCurrents, rates);
    myConstantRateFunction = result;
    myConstantRateFunctionOK = true;
    myMode = mode;
  }
View Full Code Here

      reset(false);
//      Plotter.plot(output, "simulation "+i);
      rt[i] = getRefreactoryTime(Vm[i]);
    }

    Function result = fitter.fit(current, Vm);
//    Plotter.plot(result, 0, .1f, 60, "current -> Vm");
//    Plotter.plot(current, rt, "current -> rt");
    return result;
  }
View Full Code Here

        //make the interpolated distortion functions (note these are normalized to radius 1; we map this online in case radius changes) ...
        LinearCurveFitter cf = new LinearCurveFitter();
        myInterpFunctions = new Function[myOrigin.getDimensions()];
        for (int i = 0; i < myInterpFunctions.length; i++) {
            myInterpFunctions[i] = cf.fit(r, difference[i]);
        }
    }

    private float[][] setNoise(DecodedOrigin origin) throws SimulationException {
        int nSamples = 500;
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.