Package org.drip.spline.params
Class SegmentBestFitResponse
java.lang.Object
org.drip.spline.params.SegmentBestFitResponse
public class SegmentBestFitResponse
extends java.lang.Object
SegmentBestFitResponse implements basis per-segment Fitness Penalty Parameter Set. Currently it
contains the Best Fit Penalty Weight Grid Matrix and the corresponding Segment Local Predictor
Ordinate/Response Match Pair.
- Construct the SegmentBestFitResponse Instance from the given Inputs
- Construct the SegmentBestFitResponse Instance from the given Predictor Ordinate/Response Pairs, using Uniform Weightings
- Retrieve the Array of the Fitness Weights
- Retrieve the Indexed Fitness Weight Element
- Retrieve the Array of Predictor Ordinates
- Retrieve the Indexed Predictor Ordinate Element
- Retrieve the Array of Responses
- Retrieve the Indexed Response Element
- Retrieve the Number of Fitness Points
- Author:
- Lakshmi Krishnamurthy
-
Method Summary
Modifier and Type Method Description static SegmentBestFitResponse
Create(double[] predictorOrdinateArray, double[] responseValueArray)
Construct the SegmentBestFitResponse Instance from the given Predictor Ordinate/Response Pairs, using Uniform Weightings.static SegmentBestFitResponse
Create(double[] predictorOrdinateArray, double[] responseValueArray, double[] weightArray)
Construct the SegmentBestFitResponse Instance from the given Inputsint
numPoint()
Retrieve the Number of Fitness Pointsdouble[]
predictorOrdinate()
Retrieve the Array of Predictor Ordinatesdouble
predictorOrdinate(int index)
Retrieve the Indexed Predictor Ordinate Elementdouble[]
response()
Retrieve the Array of Responsesdouble
response(int index)
Retrieve the Indexed Response Elementdouble[]
weight()
Retrieve the Array of the Fitness Weightsdouble
weight(int index)
Retrieve the Indexed Fitness Weight ElementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
Create
public static final SegmentBestFitResponse Create(double[] predictorOrdinateArray, double[] responseValueArray, double[] weightArray)Construct the SegmentBestFitResponse Instance from the given Inputs- Parameters:
predictorOrdinateArray
- Array of Predictor OrdinatesresponseValueArray
- Array of Response ValuesweightArray
- Array of Weights- Returns:
- Instance of SegmentBestFitResponse
-
Create
public static final SegmentBestFitResponse Create(double[] predictorOrdinateArray, double[] responseValueArray)Construct the SegmentBestFitResponse Instance from the given Predictor Ordinate/Response Pairs, using Uniform Weightings.- Parameters:
predictorOrdinateArray
- Array of Predictor OrdinatesresponseValueArray
- Array of Response Values- Returns:
- Instance of SegmentBestFitResponse
-
weight
public double[] weight()Retrieve the Array of the Fitness Weights- Returns:
- The Array of the Fitness Weights
-
weight
public double weight(int index) throws java.lang.ExceptionRetrieve the Indexed Fitness Weight Element- Parameters:
index
- The Element Index- Returns:
- The Indexed Fitness Weight Element
- Throws:
java.lang.Exception
- Thrown if the Index is Invalid
-
predictorOrdinate
public double[] predictorOrdinate()Retrieve the Array of Predictor Ordinates- Returns:
- The Array of Predictor Ordinates
-
predictorOrdinate
public double predictorOrdinate(int index) throws java.lang.ExceptionRetrieve the Indexed Predictor Ordinate Element- Parameters:
index
- The Element Index- Returns:
- The Indexed Predictor Ordinate Element
- Throws:
java.lang.Exception
- Thrown if the Index is Invalid
-
response
public double[] response()Retrieve the Array of Responses- Returns:
- The Array of Responses
-
response
public double response(int index) throws java.lang.ExceptionRetrieve the Indexed Response Element- Parameters:
index
- The Element Index- Returns:
- The Indexed Response Element
- Throws:
java.lang.Exception
- Thrown if the Index is Invalid
-
numPoint
public int numPoint()Retrieve the Number of Fitness Points- Returns:
- The Number of Fitness Points
-