romspline/random_seeds.py
def _randomSeeds(x, y, seeds, tol=1e-6, rel=False, deg=5):
  """Build reduced-order splines from an arbitrary seed for the greedy algorithm.
  See RandomSeeds for further details.
  
  Input
  -----
    x     -- samples
    y     -- data to be downsampled
    seeds -- list of integers specifying the array indexes of
             the samples used to seed the greedy algorithm
    tol   -- L-infinity error tolerance for reduced-order spline 
             (default 1e-6)
    rel   -- L-infinity error tolerance is relative to max abs of data?
             (default False)
    deg   -- degree of interpolating polynomials 
             (default 5)
  """
  # Sort the seeds as a precaution
  seeds = np.sort(seeds)
  
  # Build spline
  spline = greedy.ReducedOrderSpline(x, y, tol=tol, rel=rel, deg=deg, seeds=seeds)
  
  # Return last greedy error, size, seeds, and reduced data samples
  return spline.errors[-1], spline.size, seeds, spline.X
Build reduced-order splines from an arbitrary seed for the greedy algorithm.
  See RandomSeeds for further details.
  
  Input
  -----
    x     -- samples
    y     -- data to be downsampled
    seeds -- list of integers specifying the array indexes of
             the samples used to seed the greedy algorithm
    tol   -- L-infinity error tolerance for reduced-order spline 
             (default 1e-6)
    rel   -- L-infinity error tolerance is relative to max abs of data?
             (default False)
    deg   -- degree of interpolating polynomials 
             (default 5)
  
Build reduced-order splines from an arbitrary seed for the greedy algorithm.
See RandomSeeds for further details.

Input


Build reduced - order splines from an arbitrary seed for the greedy algorithm . See RandomSeeds for further details . Input
def _randomSeeds(x, y, seeds, tol=1e-6, rel=False, deg=5):
  seeds = np.sort(seeds)
  spline = greedy.ReducedOrderSpline(x, y, tol=tol, rel=rel, deg=deg, seeds=seeds)
  return spline.errors[-1], spline.size, seeds, spline.X
def _randomSeeds ( x , y , seeds , tol = 1e-6 , rel = False , deg = 5 ) : seeds = np . sort ( seeds ) spline = greedy . ReducedOrderSpline ( x , y , tol = tol , rel = rel , deg = deg , seeds = seeds ) return spline . errors [ - 1 ] , spline . size , seeds , spline . X
Build reduced-order splines from an arbitrary seed for the greedy algorithm.
Build reduced - order splines from an arbitrary seed for the greedy algorithm .
"""Build reduced-order splines from an arbitrary seed for the greedy algorithm.
  See RandomSeeds for further details.
  
  Input
  -----
    x     -- samples
    y     -- data to be downsampled
    seeds -- list of integers specifying the array indexes of
             the samples used to seed the greedy algorithm
    tol   -- L-infinity error tolerance for reduced-order spline 
             (default 1e-6)
    rel   -- L-infinity error tolerance is relative to max abs of data?
             (default False)
    deg   -- degree of interpolating polynomials 
             (default 5)
  """ # Sort the seeds as a precaution # Build spline # Return last greedy error, size, seeds, and reduced data samples
x
y
seeds
tol
rel
deg