Data-given linear sensitivity analysis?

Hi all,
During the development of PR 2056, we discussed the implementation of regression coefficients in the library. The PR suggests to convert CorrelationAnalysis to a class. The topic of the current post is to analyze how these features may be used for sensitivity analysis.

We may split the API into two classes:

  • a class RegressionSensitivityAnalysis for sensitivity analysis of a function based on a input/output sample pair,
  • a class CorrelationAnalysis for correlation of two samples.
analysis = RegressionSensitivityAnalysis(inputSample, outputSample)

This would be different from the API of correlation analysis:

analysis = CorrelationAnalysis(sampleX, sampleY)

This seems clearer to me. It opens up a new obvious possibility: estimating the sensitivity analysis using a function and an input sample:

analysis = RegressionSensitivityAnalysis(inputSample, gFunction)

The code performs outputSample = gFunction(inputSample) and evaluates the coefficients.

  • It currently has a very little user value.
  • This class may provide new methods to provides new results, such as the distribution of the regression coefficients, statistical tests to see if each coefficient is zero, etc. The class would have a getResult() method which returns an instance of a TestResult.

Do you agree on these suggestions? What other features could be provided in this class?



Your RegressionSensitivityAnalysis sounds a lot like the linear model algorithm that already exists!

Indeed, the LinearModelAlgorithm performs linear regression, but does not provide sensitivity analysis features. It creates a LinearModelResult which returns the coefficients, Cook’s distances, etc.
I do not think that this class should be modified for S.A., because it is another topic with different output results.