DiagonalOperatorCoveringBound.java

  1. package org.drip.learning.bound;

  2. /*
  3.  * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  4.  */

  5. /*!
  6.  * Copyright (C) 2020 Lakshmi Krishnamurthy
  7.  * Copyright (C) 2019 Lakshmi Krishnamurthy
  8.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  9.  * Copyright (C) 2017 Lakshmi Krishnamurthy
  10.  * Copyright (C) 2016 Lakshmi Krishnamurthy
  11.  * Copyright (C) 2015 Lakshmi Krishnamurthy
  12.  *
  13.  *  This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
  14.  *      asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment
  15.  *      analytics, and portfolio construction analytics within and across fixed income, credit, commodity,
  16.  *      equity, FX, and structured products. It also includes auxiliary libraries for algorithm support,
  17.  *      numerical analysis, numerical optimization, spline builder, model validation, statistical learning,
  18.  *      and computational support.
  19.  *  
  20.  *      https://lakshmidrip.github.io/DROP/
  21.  *  
  22.  *  DROP is composed of three modules:
  23.  *  
  24.  *  - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/
  25.  *  - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
  26.  *  - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/
  27.  *
  28.  *  DROP Product Core implements libraries for the following:
  29.  *  - Fixed Income Analytics
  30.  *  - Loan Analytics
  31.  *  - Transaction Cost Analytics
  32.  *
  33.  *  DROP Portfolio Core implements libraries for the following:
  34.  *  - Asset Allocation Analytics
  35.  *  - Asset Liability Management Analytics
  36.  *  - Capital Estimation Analytics
  37.  *  - Exposure Analytics
  38.  *  - Margin Analytics
  39.  *  - XVA Analytics
  40.  *
  41.  *  DROP Computational Core implements libraries for the following:
  42.  *  - Algorithm Support
  43.  *  - Computation Support
  44.  *  - Function Analysis
  45.  *  - Model Validation
  46.  *  - Numerical Analysis
  47.  *  - Numerical Optimizer
  48.  *  - Spline Builder
  49.  *  - Statistical Learning
  50.  *
  51.  *  Documentation for DROP is Spread Over:
  52.  *
  53.  *  - Main                     => https://lakshmidrip.github.io/DROP/
  54.  *  - Wiki                     => https://github.com/lakshmiDRIP/DROP/wiki
  55.  *  - GitHub                   => https://github.com/lakshmiDRIP/DROP
  56.  *  - Repo Layout Taxonomy     => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
  57.  *  - Javadoc                  => https://lakshmidrip.github.io/DROP/Javadoc/index.html
  58.  *  - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
  59.  *  - Release Versions         => https://lakshmidrip.github.io/DROP/version.html
  60.  *  - Community Credits        => https://lakshmidrip.github.io/DROP/credits.html
  61.  *  - Issues Catalog           => https://github.com/lakshmiDRIP/DROP/issues
  62.  *  - JUnit                    => https://lakshmidrip.github.io/DROP/junit/index.html
  63.  *  - Jacoco                   => https://lakshmidrip.github.io/DROP/jacoco/index.html
  64.  *
  65.  *  Licensed under the Apache License, Version 2.0 (the "License");
  66.  *      you may not use this file except in compliance with the License.
  67.  *  
  68.  *  You may obtain a copy of the License at
  69.  *      http://www.apache.org/licenses/LICENSE-2.0
  70.  *  
  71.  *  Unless required by applicable law or agreed to in writing, software
  72.  *      distributed under the License is distributed on an "AS IS" BASIS,
  73.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  74.  *  
  75.  *  See the License for the specific language governing permissions and
  76.  *      limitations under the License.
  77.  */

  78. /**
  79.  * <i>DiagonalOperatorCoveringBound</i> implements the Behavior of the Bound on the Covering Number of the
  80.  * Diagonal Scaling Operator. The Asymptote is set as either
  81.  * <br><br>
  82.  *              log [e_n(A)] ~ O {(1/log n)^alpha}
  83.  * <br><br>
  84.  *      - OR -
  85.  * <br><br>
  86.  *                    e_n(A) ~ O {(1/log n)^alpha}
  87.  * <br><br>
  88.  *  The References are:
  89.  * <ul>
  90.  *  <li>
  91.  *      Ash, R. (1965): <i>Information Theory</i> <b>Inter-science</b> New York
  92.  *  </li>
  93.  *  <li>
  94.  *      Carl, B., and I. Stephani (1990): <i>Entropy, Compactness, and Approximation of Operators</i>
  95.  *          <b>Cambridge University Press</b> Cambridge UK
  96.  *  </li>
  97.  *  <li>
  98.  *      Gordon, Y., H. Konig, and C. Schutt (1987): Geometric and Probabilistic Estimates of Entropy and
  99.  *          Approximation Numbers of Operators <i>Journal of Approximation Theory</i> <b>49</b> 219-237
  100.  *  </li>
  101.  *  <li>
  102.  *      Konig, H. (1986): <i>Eigenvalue Distribution of Compact Operators</i> <b>Birkhauser</b> Basel,
  103.  *          Switzerland
  104.  *  </li>
  105.  *  <li>
  106.  *      Smola, A. J., A. Elisseff, B. Scholkopf, and R. C. Williamson (2000): Entropy Numbers for Convex
  107.  *          Combinations and mlps, in: <i>Advances in Large Margin Classifiers, A. Smola, P. Bartlett, B.
  108.  *          Scholkopf, and D. Schuurmans - editors</i> <b>MIT Press</b> Cambridge, MA
  109.  *  </li>
  110.  *  <li>
  111.  *      Williamson, R. C., A. J. Smola, and B. Scholkopf (2001): Generalization Performance of Regularization
  112.  *          Networks and Support Vector Machines via Entropy Numbers of Compact Operators <i>IEEE
  113.  *          Transactions on Information Theory</i> <b>47 (6)</b> 2516-2532
  114.  *  </li>
  115.  * </ul>
  116.  *
  117.  *  <br><br>
  118.  *  <ul>
  119.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
  120.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning</a></li>
  121.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/learning">Agnostic Learning Bounds under Empirical Loss Minimization Schemes</a></li>
  122.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/learning/bound">Covering Numbers, Concentration, Lipschitz Bounds</a></li>
  123.  *  </ul>
  124.  *
  125.  * @author Lakshmi Krishnamurthy
  126.  */

  127. public class DiagonalOperatorCoveringBound {

  128.     /**
  129.      * Asymptote on the Base Diagonal Operator Entropy Number
  130.      */

  131.     public static final int BASE_DIAGONAL_ENTROPY_ASYMPTOTE_EXPONENT = 1;

  132.     /**
  133.      * Asymptote on the Log of the Diagonal Operator Entropy Number
  134.      */

  135.     public static final int LOG_DIAGONAL_ENTROPY_ASYMPTOTE_EXPONENT = 2;

  136.     private double _dblOperatorEntropyAsymptoteExponent = java.lang.Double.NaN;
  137.     private int _iOperatorEntropyAsymptoteBase = BASE_DIAGONAL_ENTROPY_ASYMPTOTE_EXPONENT;

  138.     /**
  139.      * DiagonalOperatorCoveringBound Constructor
  140.      *
  141.      * @param iOperatorEntropyAsymptoteBase Indicate the Asymptote is on the Base Value or Log Value
  142.      * @param dblOperatorEntropyAsymptoteExponent The Entropy Number Asymptote Exponent
  143.      *
  144.      * @throws java.lang.Exception Throws if the Inputs are Invalid
  145.      */

  146.     public DiagonalOperatorCoveringBound (
  147.         final int iOperatorEntropyAsymptoteBase,
  148.         final double dblOperatorEntropyAsymptoteExponent)
  149.         throws java.lang.Exception
  150.     {
  151.         if ((BASE_DIAGONAL_ENTROPY_ASYMPTOTE_EXPONENT != (_iOperatorEntropyAsymptoteBase =
  152.             iOperatorEntropyAsymptoteBase) && LOG_DIAGONAL_ENTROPY_ASYMPTOTE_EXPONENT !=
  153.                 _iOperatorEntropyAsymptoteBase) || !org.drip.numerical.common.NumberUtil.IsValid
  154.                     (_dblOperatorEntropyAsymptoteExponent = dblOperatorEntropyAsymptoteExponent))
  155.             throw new java.lang.Exception ("DiagonalOperatorCoveringBound ctr => Invalid Inputs");
  156.     }

  157.     /**
  158.      * Retrieve the Entropy Number Asymptote Type
  159.      *
  160.      * @return The Entropy Number Asymptote Type
  161.      */

  162.     public int entropyNumberAsymptoteType()
  163.     {
  164.         return _iOperatorEntropyAsymptoteBase;
  165.     }

  166.     /**
  167.      * Retrieve the Entropy Number Asymptote Exponent
  168.      *
  169.      * @return The Entropy Number Asymptote Exponent
  170.      */

  171.     public double entropyNumberAsymptoteExponent()
  172.     {
  173.         return _dblOperatorEntropyAsymptoteExponent;
  174.     }
  175. }