edu.ucla.stat.SOCR.modeler
Class Modeler

java.lang.Object
  extended by edu.ucla.stat.SOCR.modeler.Modeler
Direct Known Subclasses:
BetaFit_Modeler, BinomialFit_Modeler, ChiFit_Modeler, ChiSquareFit_Modeler, ErlangFit_Modeler, ErrorFit_Modeler, ExponentialFit_Modeler, FisherTippettFit_Modeler, FourierFit_Modeler, GammaFit_Modeler, GeometricFit_Modeler, GumbelFit_Modeler, InverseGammaFit_Modeler, InverseGaussianFit_Modeler, LaplaceFit_Modeler, LogarithmicSeriesFit_Modeler, LogisticFit_Modeler, LogNormalFit_Modeler, MixedFit_Modeler, NormalFit_Modeler, ParetoFit_Modeler, PoissonFit_Modeler, PowerFunctionFit_Modeler, RayleighFit_Modeler, RiceFit_Modeler, UQuadraticFit_Modeler, VonMisesFit_Modeler, WaveletFit_Modeler

public class Modeler
extends java.lang.Object


Field Summary
static int CONTINUOUS_DISTRIBUTION_TYPE
           
static int DISCRETE_DISTRIBUTION_TYPE
           
static int FOURIER_TYPE
           
static int MIXED_DISTRIBUTION_TYPE
           
static int WAVELET_TYPE
           
 
Constructor Summary
Modeler()
           
 
Method Summary
 void fitCurve(float[] rawDat, double minx, double maxx, javax.swing.JTextArea resultPanelTextArea, boolean rescaleClicked, boolean scaleUp, boolean initReset)
          takes data along with x, y limits and fits a pdf to the data range and stores the resulting model fit in data arrays that must be returned by calls to returnModelX() and returnModelY()
 double[] generateSamples(int sampleCount)
          generates samples from the distribution and returns a double[] data type
 java.lang.String getDescription()
          return the description for this modeler
 double getGraphLowerLimit()
           
 double getGraphUpperLimit()
           
 java.lang.String getInstructions()
          return the instructions for using this modeler
 java.lang.String getKSModelTestString(java.lang.String distributionModelName, int numberOfQuantiles, double[] x, double[] y)
          getKSModelTestString computes the KolmogorovSmirnoff test statistics of the match between the 100 quantiles of the data and their corresponding model-distribution quartile counterparts!
 double getLowerLimit()
          return the allowable x limit values.
 int getModelCount()
          return the number of models to be plotted.
 int getModelType()
          returns one if model is of distribution and needs to be rescaled for display.
 java.lang.String getResearch()
          return the references for this modeler
 double getUpperLimit()
          return the allowaable x limit values.
 boolean isContinuous()
           
 void registerObservers(ObservableWrapper o)
           
 double[] returnModelX()
          returns the fitted model values for X axis
 double[] returnModelY()
          returns the fitted densisty for corresponding X axis values
 boolean useInitButton()
          What is this method used for?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTINUOUS_DISTRIBUTION_TYPE

public static final int CONTINUOUS_DISTRIBUTION_TYPE
See Also:
Constant Field Values

DISCRETE_DISTRIBUTION_TYPE

public static final int DISCRETE_DISTRIBUTION_TYPE
See Also:
Constant Field Values

MIXED_DISTRIBUTION_TYPE

public static final int MIXED_DISTRIBUTION_TYPE
See Also:
Constant Field Values

FOURIER_TYPE

public static final int FOURIER_TYPE
See Also:
Constant Field Values

WAVELET_TYPE

public static final int WAVELET_TYPE
See Also:
Constant Field Values
Constructor Detail

Modeler

public Modeler()
Method Detail

fitCurve

public void fitCurve(float[] rawDat,
                     double minx,
                     double maxx,
                     javax.swing.JTextArea resultPanelTextArea,
                     boolean rescaleClicked,
                     boolean scaleUp,
                     boolean initReset)
takes data along with x, y limits and fits a pdf to the data range and stores the resulting model fit in data arrays that must be returned by calls to returnModelX() and returnModelY()


generateSamples

public double[] generateSamples(int sampleCount)
generates samples from the distribution and returns a double[] data type


getDescription

public java.lang.String getDescription()
return the description for this modeler


getGraphUpperLimit

public double getGraphUpperLimit()

getGraphLowerLimit

public double getGraphLowerLimit()

getInstructions

public java.lang.String getInstructions()
return the instructions for using this modeler


getKSModelTestString

public java.lang.String getKSModelTestString(java.lang.String distributionModelName,
                                             int numberOfQuantiles,
                                             double[] x,
                                             double[] y)
getKSModelTestString computes the KolmogorovSmirnoff test statistics of the match between the 100 quantiles of the data and their corresponding model-distribution quartile counterparts!

Parameters:
distributionModelName - name of the distribution model-fit
numberOfQuantiles - number of quantiles to use (e.g., 100)
x - data quantiles array
y - model quantiles array

getLowerLimit

public double getLowerLimit()
return the allowable x limit values. This method should return the lower limit. eg: for a normal distribution lowerlimit = NEGATIVE_INFINITY


getModelCount

public int getModelCount()
return the number of models to be plotted. If n models are returned, the vectors from returnModelX and returnModelY will be split into n equal sub sections and plotted

Returns:

getModelType

public int getModelType()
returns one if model is of distribution and needs to be rescaled for display. Returns 0 if model does not require scaling. EG: Polynomial fit is type 0 and normal distribution is type 1.


getResearch

public java.lang.String getResearch()
return the references for this modeler


getUpperLimit

public double getUpperLimit()
return the allowaable x limit values. This method should return the upper limit. eg: for a normal distribution upperlimit = POSITIVE_INFINITY


isContinuous

public boolean isContinuous()

registerObservers

public void registerObservers(ObservableWrapper o)

returnModelX

public double[] returnModelX()
returns the fitted model values for X axis


returnModelY

public double[] returnModelY()
returns the fitted densisty for corresponding X axis values


useInitButton

public boolean useInitButton()
What is this method used for?