OpenAPI 1.0

com.aquafold.openapi.math
Interface AQCurve


public interface AQCurve


Method Summary
 double[] deTrend(double[] x, double[] y)
          Removes linear trend from incoming data set
 double interpolate(double[] x, double[] y, double value)
          Interpolates data point at incoming value using natural cubic splines [link]
 double interpolate(double[] x, double[] y, double value, String method)
          Interpolates data point at incoming value based on user-chosen method [link]
 double[][] kaplanMeier(double[] times, double[] censor)
          Returns KaplanMeier estimator / survival curve and unique event times.
 double logRankTest(double[] time1, double[] censor1, double[] time2, double[] censor2)
          Performs logRank test on two populations of survival data.
 double[] sgFilter(double[] x, int nl, int nr, int order)
          Returns data smoothed via least-squares polynomial of user-defined order and window of user-defined width.
 double[] sGolay(int left, int right, int order)
          Calculates SG coefficients [link]
 double[] smooth(double[] in, int span)
          Smoothes incoming data set via centered running mean of given window length [link]
 

Method Detail

smooth

double[] smooth(double[] in,
                int span)
Smoothes incoming data set via centered running mean of given window length [link]

Parameters:
in - a double precision array.
span - integer
Returns:
double precision array
Throws:
IllegalArgumentException - if the incoming array is empty

sGolay

double[] sGolay(int left,
                int right,
                int order)
Calculates SG coefficients [link]

Parameters:
left - , number of points to left of point
right - , number of points to right of point (window is of length nl + nr +1)
order - , order of polynomial used for smoothing
Returns:
double precision value
Throws:
IllegalArgumentException - if the incoming array is empty

sgFilter

double[] sgFilter(double[] x,
                  int nl,
                  int nr,
                  int order)
Returns data smoothed via least-squares polynomial of user-defined order and window of user-defined width. [link]

Parameters:
x - a double precision array.
nl - , number of points to left of point
nr - , number of points to right of point (window is of length nl + nr +1)
order - , order of polynomial used for smoothing
Returns:
double precision value
Throws:
IllegalArgumentException - if the incoming array is empty

deTrend

double[] deTrend(double[] x,
                 double[] y)
Removes linear trend from incoming data set

Parameters:
x - a double precision array.
y - a double precision array.
Returns:
double precision array
Throws:
IllegalArgumentException - if the incoming array is empty

kaplanMeier

double[][] kaplanMeier(double[] times,
                       double[] censor)
Returns KaplanMeier estimator / survival curve and unique event times. Calculates relative proportion of survivors in a sample group, accounting for coincident times and censored data. [link]

Parameters:
times - a double precision array. (survival times)
censor - a double precision array
  • 1 indicates active subject
  • 0 indicates censored subject
Returns:
2xN double precision array
  • out[0] = array of survival times
  • out[1] = survival curve
Throws:
IllegalArgumentException - if the incoming array is empty

logRankTest

double logRankTest(double[] time1,
                   double[] censor1,
                   double[] time2,
                   double[] censor2)
Performs logRank test on two populations of survival data. Tests hypothesis that two survival sets came from the same population. [link]

Parameters:
time1 - a double precision array.
time2 - a double precision array.
censor1 - a double precision array.
censor2 - a double precision array
Returns:
a double precision array.
Throws:
IllegalArgumentException - if the incoming array is empty

interpolate

double interpolate(double[] x,
                   double[] y,
                   double value)
Interpolates data point at incoming value using natural cubic splines [link]

Parameters:
x - a double precision array.
y - a double precision array.
value - a double precision value at which to interpolate
Returns:
double precision value
Throws:
IllegalArgumentException - if the incoming array is empty

interpolate

double interpolate(double[] x,
                   double[] y,
                   double value,
                   String method)
Interpolates data point at incoming value based on user-chosen method [link]

Parameters:
x - a double precision array.
y - a double precision array.
value - a double precision value at which to interpolate
method - , a String indicating interpolation method
  • "spline", natural cubic splines [link]
  • "loess", local regression [link]
  • "divided", divided difference [link]
Returns:
double precision value
Throws:
IllegalArgumentException - if the incoming array is empty

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.