Class: Cicada::DistributionFitter

Inherits:
Object
  • Object
show all
Defined in:
lib/cicada/fitting/p3d_fitter.rb

Overview

Interface for a class that fits a set of scalars with associated image object to some distribution.

Direct Known Subclasses

P3DFitter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ DistributionFitter

Constructs a new distribution fitter from specified parameters. Derived classes should indicate which parameters are used.

Parameters:

  • params (ParameterDictionary, Hash)

    a hash-like object containing the parameters



44
45
46
# File 'lib/cicada/fitting/p3d_fitter.rb', line 44

def initialize(params)
  @parameters = params
end

Instance Attribute Details

#parametersObject

Returns the value of attribute parameters.



36
37
38
# File 'lib/cicada/fitting/p3d_fitter.rb', line 36

def parameters
  @parameters
end

Instance Method Details

#fit(objects, diffs) ⇒ Array<Numeric>

Fits the data with associated image objects to the distribution.

Abstract

Parameters:

  • objects (Array<ImageObject>)

    the associated image objects

  • diffs (Array<Numeric>)

    the scalar data being fit (in the same order as the image objects)

Returns:

  • (Array<Numeric>)

    the fitted distribution parameters



59
60
61
# File 'lib/cicada/fitting/p3d_fitter.rb', line 59

def fit(objects, diffs)
  nil
end