Class GeneralizedLearner

java.lang.Object
org.drip.learning.rxtor1.GeneralizedLearner
All Implemented Interfaces:
EmpiricalLearningMetricEstimator
Direct Known Subclasses:
L1LossLearner, LipschitzLossLearner, LpLossLearner

public abstract class GeneralizedLearner
extends java.lang.Object
implements EmpiricalLearningMetricEstimator
GeneralizedLearner implements the Learner Class that holds the Space of Normed Rx To Normed R1 Learning Functions along with their Custom Empirical Loss. Class-Specific Asymptotic Sample, Covering Number based Upper Probability Bounds and other Parameters are also maintained.

The References are:

  • Alon, N., S. Ben-David, N. Cesa Bianchi, and D. Haussler (1997): Scale-sensitive Dimensions, Uniform Convergence, and Learnability Journal of Association of Computational Machinery 44 (4) 615-631
  • Anthony, M., and P. L. Bartlett (1999): Artificial Neural Network Learning - Theoretical Foundations Cambridge University Press Cambridge, UK
  • Kearns, M. J., R. E. Schapire, and L. M. Sellie (1994): Towards Efficient Agnostic Learning Machine Learning 17 (2) 115-141
  • Lee, W. S., P. L. Bartlett, and R. C. Williamson (1998): The Importance of Convexity in Learning with Squared Loss IEEE Transactions on Information Theory 44 1974-1980
  • Vapnik, V. N. (1998): Statistical learning Theory Wiley New York


Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • GeneralizedLearner

      public GeneralizedLearner​(NormedRxToNormedR1Finite funcClassRxToR1, CoveringNumberLossBound funcClassCNLB, RegularizationFunction regularizerFunc) throws java.lang.Exception
      GeneralizedLearner Constructor
      Parameters:
      funcClassRxToR1 - R^x To R^1 Function Class
      funcClassCNLB - The Function Class Covering Number based Deviation Upper Probability Bound Generator
      regularizerFunc - The Regularizer Function
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • functionClass

      public NormedRxToNormedR1Finite functionClass()
      Description copied from interface: EmpiricalLearningMetricEstimator
      Retrieve the Underlying Learner Function Class
      Specified by:
      functionClass in interface EmpiricalLearningMetricEstimator
      Returns:
      The Underlying Learner Function Class
    • regularizerFunction

      public RegularizationFunction regularizerFunction()
      Description copied from interface: EmpiricalLearningMetricEstimator
      Retrieve the Regularizer Function
      Specified by:
      regularizerFunction in interface EmpiricalLearningMetricEstimator
      Returns:
      The Regularizer Function
    • supremumEmpiricalLoss

      public EmpiricalPenaltySupremum supremumEmpiricalLoss​(GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Empirical Sample Loss
      Specified by:
      supremumEmpiricalLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Empirical Sample Loss
    • structuralLoss

      public double structuralLoss​(R1ToR1 funcLearnerR1ToR1, GeneralizedValidatedVector gvvi) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Structural Sample Loss
      Specified by:
      structuralLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      funcLearnerR1ToR1 - The R^1 To R^1 Learner Function
      gvvi - The Validated Predictor Instance
      Returns:
      The Structural Loss
      Throws:
      java.lang.Exception - Thrown if the Structural Loss cannot be computed
    • structuralLoss

      public double structuralLoss​(RdToR1 funcLearnerRdToR1, GeneralizedValidatedVector gvvi) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Structural Sample Loss
      Specified by:
      structuralLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      funcLearnerRdToR1 - The R^d To R^1 Learner Function
      gvvi - The Validated Predictor Instance
      Returns:
      The Structural Loss
      Throws:
      java.lang.Exception - Thrown if the Structural Loss cannot be computed
    • supremumStructuralLoss

      public EmpiricalPenaltySupremum supremumStructuralLoss​(GeneralizedValidatedVector gvviX)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Structural Sample Loss
      Specified by:
      supremumStructuralLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      gvviX - The Validated Predictor Instance
      Returns:
      The Supremum Structural Sample Loss
    • regularizedLoss

      public double regularizedLoss​(R1ToR1 funcLearnerR1ToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Regularized Sample Loss (Empirical + Structural)
      Specified by:
      regularizedLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      funcLearnerR1ToR1 - The R^1 To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Regularized Loss
      Throws:
      java.lang.Exception - Thrown if the Regularized Loss cannot be computed
    • regularizedLoss

      public double regularizedLoss​(RdToR1 funcLearnerRdToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Regularized Sample Loss (Empirical + Structural)
      Specified by:
      regularizedLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      funcLearnerRdToR1 - The R^d To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Regularized Loss
      Throws:
      java.lang.Exception - Thrown if the Regularized Loss cannot be computed
    • supremumRegularizedLoss

      public EmpiricalPenaltySupremum supremumRegularizedLoss​(GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Regularized Sample Loss
      Specified by:
      supremumRegularizedLoss in interface EmpiricalLearningMetricEstimator
      Parameters:
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Regularized Sample Loss
    • supremumEmpiricalRisk

      public EmpiricalPenaltySupremum supremumEmpiricalRisk​(R1R1 distR1R1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Empirical Sample Risk
      Specified by:
      supremumEmpiricalRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distR1R1 - R^1 R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Empirical Sample Loss
    • supremumEmpiricalRisk

      public EmpiricalPenaltySupremum supremumEmpiricalRisk​(RdR1 distRdR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Empirical Sample Risk
      Specified by:
      supremumEmpiricalRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distRdR1 - R^d R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Empirical Sample Loss
    • structuralRisk

      public double structuralRisk​(R1R1 distR1R1, R1ToR1 funcLearnerR1ToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Structural Sample Risk
      Specified by:
      structuralRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distR1R1 - R^1 R^1 Multivariate Measure
      funcLearnerR1ToR1 - The R^1 To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Structural Risk
      Throws:
      java.lang.Exception - Thrown if the Structural Risk cannot be computed
    • structuralRisk

      public double structuralRisk​(RdR1 distRdR1, RdToR1 funcLearnerRdToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Structural Sample Risk
      Specified by:
      structuralRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distRdR1 - R^d R^1 Multivariate Measure
      funcLearnerRdToR1 - The R^d To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Structural Risk
      Throws:
      java.lang.Exception - Thrown if the Structural Risk cannot be computed
    • supremumStructuralRisk

      public EmpiricalPenaltySupremum supremumStructuralRisk​(R1R1 distR1R1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Structural Sample Risk
      Specified by:
      supremumStructuralRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distR1R1 - R^1 R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Structural Sample Loss
    • supremumStructuralRisk

      public EmpiricalPenaltySupremum supremumStructuralRisk​(RdR1 distRdR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Structural Sample Risk
      Specified by:
      supremumStructuralRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distRdR1 - R^d R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Structural Sample Risk
    • regularizedRisk

      public double regularizedRisk​(R1R1 distR1R1, R1ToR1 funcLearnerR1ToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Regularized Sample Risk (Empirical + Structural)
      Specified by:
      regularizedRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distR1R1 - R^1 R^1 Multivariate Measure
      funcLearnerR1ToR1 - The R^1 To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Regularized Sample Risk
      Throws:
      java.lang.Exception - Thrown if the Regularized Sample Risk cannot be computed
    • regularizedRisk

      public double regularizedRisk​(RdR1 distRdR1, RdToR1 funcLearnerRdToR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY) throws java.lang.Exception
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Regularized Sample Risk (Empirical + Structural)
      Specified by:
      regularizedRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distRdR1 - R^d R^1 Multivariate Measure
      funcLearnerRdToR1 - The R^d To R^1 Learner Function
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Regularized Sample Risk
      Throws:
      java.lang.Exception - Thrown if the Regularized Sample Risk cannot be computed
    • supremumRegularizedRisk

      public EmpiricalPenaltySupremum supremumRegularizedRisk​(R1R1 distR1R1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Regularized Sample Risk
      Specified by:
      supremumRegularizedRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distR1R1 - R^1 R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Regularized Sample Risk
    • supremumRegularizedRisk

      public EmpiricalPenaltySupremum supremumRegularizedRisk​(RdR1 distRdR1, GeneralizedValidatedVector gvviX, GeneralizedValidatedVector gvviY)
      Description copied from interface: EmpiricalLearningMetricEstimator
      Compute the Supremum Regularized Sample Risk
      Specified by:
      supremumRegularizedRisk in interface EmpiricalLearningMetricEstimator
      Parameters:
      distRdR1 - R^d R^1 Multivariate Measure
      gvviX - The Validated Predictor Instance
      gvviY - The Validated Response Instance
      Returns:
      The Supremum Regularized Sample Risk
    • coveringLossBoundEvaluator

      public CoveringNumberLossBound coveringLossBoundEvaluator()
      Retrieve the Covering Number based Deviation Upper Probability Bound Generator
      Returns:
      The Covering Number based Deviation Upper Probability Bound Generator
    • genericCoveringProbabilityBound

      public double genericCoveringProbabilityBound​(int iSampleSize, double dblEpsilon, boolean bSupremum) throws java.lang.Exception
      Compute the Upper Bound of the Probability of the Absolute Deviation of the Empirical Mean from the Population Mean using the Function Class Supremum Covering Number for General-Purpose Learning
      Parameters:
      iSampleSize - The Sample Size
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Upper Bound of the Probability of the Absolute Deviation of the Empirical Mean from the Population Mean using the Function Class Supremum Covering Number for General-Purpose Learning
      Throws:
      java.lang.Exception - Thrown if the Upper Probability Bound cannot be computed
    • genericCoveringSampleSize

      public double genericCoveringSampleSize​(double dblEpsilon, double dblDeviationUpperProbabilityBound, boolean bSupremum) throws java.lang.Exception
      Compute the Minimum Possible Sample Size needed to generate the required Upper Probability Bound for the Specified Empirical Deviation using the Covering Number Convergence Bounds.
      Parameters:
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      dblDeviationUpperProbabilityBound - The Upper Bound of the Probability for the given Deviation
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Minimum Possible Sample Size
      Throws:
      java.lang.Exception - Thrown if the Minimum Sample Size cannot be computed
    • genericCoveringProbabilityBound

      public double genericCoveringProbabilityBound​(GeneralizedValidatedVector gvvi, int iSampleSize, double dblEpsilon, boolean bSupremum) throws java.lang.Exception
      Compute the Sample/Data Dependent Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for General-Purpose Learning
      Parameters:
      gvvi - The Validated Instance Vector Sequence
      iSampleSize - The Sample Size
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Sample/Data Dependent Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for General-Purpose Learning
      Throws:
      java.lang.Exception - Thrown if the Upper Probability Bound cannot be computed
    • genericCoveringSampleSize

      public double genericCoveringSampleSize​(GeneralizedValidatedVector gvvi, double dblEpsilon, double dblDeviationUpperProbabilityBound, boolean bSupremum) throws java.lang.Exception
      Compute the Minimum Possible Sample Size needed to generate the required Upper Probability Bound for the Specified Empirical Deviation using the Covering Number Convergence Bounds.
      Parameters:
      gvvi - The Validated Instance Vector Sequence
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      dblDeviationUpperProbabilityBound - The Upper Bound of the Probability for the given Deviation
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Minimum Possible Sample Size
      Throws:
      java.lang.Exception - Thrown if the Minimum Sample Size cannot be computed
    • regressorCoveringProbabilityBound

      public double regressorCoveringProbabilityBound​(int iSampleSize, double dblEpsilon, boolean bSupremum) throws java.lang.Exception
      Compute the Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for Regression Learning
      Parameters:
      iSampleSize - The Sample Size
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for Regression Learning
      Throws:
      java.lang.Exception - Thrown if the Upper Probability Bound cannot be computed
    • regressorCoveringSampleSize

      public double regressorCoveringSampleSize​(double dblEpsilon, double dblDeviationUpperProbabilityBound, boolean bSupremum) throws java.lang.Exception
      Compute the Minimum Possible Sample Size needed to generate the required Upper Probability Bound for the Specified Empirical Deviation using the Covering Number Convergence Bounds for Regression Learning.
      Parameters:
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      dblDeviationUpperProbabilityBound - The Upper Bound of the Probability for the given Deviation
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Minimum Possible Sample Size
      Throws:
      java.lang.Exception - Thrown if the Minimum Sample Size cannot be computed
    • regressorCoveringProbabilityBound

      public double regressorCoveringProbabilityBound​(GeneralizedValidatedVector gvvi, int iSampleSize, double dblEpsilon, boolean bSupremum) throws java.lang.Exception
      Compute the Sample/Data Dependent Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for Regression Learning
      Parameters:
      gvvi - The Validated Instance Vector Sequence
      iSampleSize - The Sample Size
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Sample/Data Dependent Upper Bound of the Probability of the Absolute Deviation between the Empirical and the Population Means using the Function Class Supremum Covering Number for Regression Learning
      Throws:
      java.lang.Exception - Thrown if the Upper Probability Bound cannot be computed
    • regressorCoveringSampleSize

      public double regressorCoveringSampleSize​(GeneralizedValidatedVector gvvi, double dblEpsilon, double dblDeviationUpperProbabilityBound, boolean bSupremum) throws java.lang.Exception
      Compute the Minimum Possible Sample Size needed to generate the required Upper Probability Bound for the Specified Empirical Deviation using the Covering Number Convergence Bounds for Regression Learning.
      Parameters:
      gvvi - The Validated Instance Vector Sequence
      dblEpsilon - The Deviation of the Empirical Mean from the Population Mean
      dblDeviationUpperProbabilityBound - The Upper Bound of the Probability for the given Deviation
      bSupremum - TRUE To Use the Supremum Metric in place of the Built-in Metric
      Returns:
      The Minimum Possible Sample Size
      Throws:
      java.lang.Exception - Thrown if the Minimum Sample Size cannot be computed