org.apache.commons.math.optimization.fitting.PolynomialFitter Java Examples

The following examples show how to use org.apache.commons.math.optimization.fitting.PolynomialFitter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RegressionInfo.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
private PolynomialFunction getPolynomialFunction() {
  Collections.sort(data, new RTs());
  PolynomialFitter fitter = new PolynomialFitter(3, new GaussNewtonOptimizer(true));
  for (RTs rt : data) {
    fitter.addObservedPoint(1, rt.RT, rt.RT2);
  }
  try {
    return fitter.fit();

  } catch (Exception ex) {
    return null;
  }
}
 
Example #2
Source File: RegressionInfo.java    From mzmine2 with GNU General Public License v2.0 5 votes vote down vote up
private PolynomialFunction getPolynomialFunction() {
  Collections.sort(data, new RTs());
  PolynomialFitter fitter = new PolynomialFitter(3, new GaussNewtonOptimizer(true));
  for (RTs rt : data) {
    fitter.addObservedPoint(1, rt.RT, rt.RT2);
  }
  try {
    return fitter.fit();

  } catch (Exception ex) {
    return null;
  }
}
 
Example #3
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #4
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #5
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #6
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #7
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #8
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #9
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}
 
Example #10
Source File: SmoothingPolynomialBicubicSplineInterpolator.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * @param xDegree Degree of the polynomial fitting functions along the
 * x-dimension.
 * @param yDegree Degree of the polynomial fitting functions along the
 * y-dimension.
 */
public SmoothingPolynomialBicubicSplineInterpolator(int xDegree,
                                                    int yDegree) {
    xFitter = new PolynomialFitter(xDegree, new GaussNewtonOptimizer(false));
    yFitter = new PolynomialFitter(yDegree, new GaussNewtonOptimizer(false));
}