コード例 #1
0
  /**
   * Create a Regression Spline Instance over the specified array of Predictor Ordinate Knot Points
   * and the Set of the Points to be Best Fit.
   *
   * @param strName Name of the Stretch
   * @param adblKnotPredictorOrdinate Array of the Predictor Ordinate Knots
   * @param aSCBC Array of Segment Builder Parameters
   * @param sbfr Stretch Fitness Weighted Response
   * @param bs The Calibration Boundary Condition
   * @param iCalibrationDetail The Calibration Detail
   * @return Stretch instance
   */
  public static final org.drip.spline.stretch.MultiSegmentSequence CreateRegressionSplineEstimator(
      final java.lang.String strName,
      final double[] adblKnotPredictorOrdinate,
      final org.drip.spline.params.SegmentCustomBuilderControl[] aSCBC,
      final org.drip.spline.params.StretchBestFitResponse sbfr,
      final org.drip.spline.stretch.BoundarySettings bs,
      final int iCalibrationDetail) {
    org.drip.spline.stretch.MultiSegmentSequence mss =
        CreateUncalibratedStretchEstimator(strName, adblKnotPredictorOrdinate, aSCBC);

    if (null == mss) return null;

    return mss.setup(null, null, sbfr, bs, iCalibrationDetail) ? mss : null;
  }
コード例 #2
0
  /**
   * Create a calibrated Stretch Instance over the specified Predictor Ordinates and the Response
   * Value Constraints, with the Segment Builder Parameters.
   *
   * @param strName Name of the Stretch
   * @param adblPredictorOrdinate Predictor Ordinate Array
   * @param srvcStretchLeft Stretch Left Constraint
   * @param aSRVC Array of Segment Constraints - One per Segment
   * @param aSCBC Array of Segment Builder Parameters - One per Segment
   * @param sbfr Stretch Fitness Weighted Response
   * @param bs The Calibration Boundary Condition
   * @param iCalibrationDetail The Calibration Detail
   * @return Stretch Instance
   */
  public static final org.drip.spline.stretch.MultiSegmentSequence CreateCalibratedStretchEstimator(
      final java.lang.String strName,
      final double[] adblPredictorOrdinate,
      final org.drip.spline.params.SegmentResponseValueConstraint srvcStretchLeft,
      final org.drip.spline.params.SegmentResponseValueConstraint[] aSRVC,
      final org.drip.spline.params.SegmentCustomBuilderControl[] aSCBC,
      final org.drip.spline.params.StretchBestFitResponse sbfr,
      final org.drip.spline.stretch.BoundarySettings bs,
      final int iCalibrationDetail) {
    org.drip.spline.stretch.MultiSegmentSequence mss =
        CreateUncalibratedStretchEstimator(strName, adblPredictorOrdinate, aSCBC);

    return null == mss
        ? null
        : mss.setup(srvcStretchLeft, aSRVC, sbfr, bs, iCalibrationDetail) ? mss : null;
  }
コード例 #3
0
  /**
   * Create a calibrated Stretch Instance over the specified array of Predictor Ordinates and
   * Response Values using the specified Basis Splines.
   *
   * @param strName Name of the Stretch
   * @param adblPredictorOrdinate Predictor Ordinate Array
   * @param adblResponseValue Response Value Array
   * @param aSCBC Array of Segment Builder Parameters
   * @param rbfr Stretch Fitness Weighted Response
   * @param bs The Calibration Boundary Condition
   * @param iCalibrationDetail The Calibration Detail
   * @return Stretch instance
   */
  public static final org.drip.spline.stretch.MultiSegmentSequence CreateCalibratedStretchEstimator(
      final java.lang.String strName,
      final double[] adblPredictorOrdinate,
      final double[] adblResponseValue,
      final org.drip.spline.params.SegmentCustomBuilderControl[] aSCBC,
      final org.drip.spline.params.StretchBestFitResponse rbfr,
      final org.drip.spline.stretch.BoundarySettings bs,
      final int iCalibrationDetail) {
    org.drip.spline.stretch.MultiSegmentSequence mss =
        CreateUncalibratedStretchEstimator(strName, adblPredictorOrdinate, aSCBC);

    if (null == mss || null == adblResponseValue) return null;

    int iNumRightNode = adblResponseValue.length - 1;
    double[] adblResponseValueRight = new double[iNumRightNode];

    if (0 == iNumRightNode) return null;

    for (int i = 0; i < iNumRightNode; ++i) adblResponseValueRight[i] = adblResponseValue[i + 1];

    return mss.setup(adblResponseValue[0], adblResponseValueRight, rbfr, bs, iCalibrationDetail)
        ? mss
        : null;
  }