Skip to content
Merged
34 changes: 10 additions & 24 deletions src/BaselineOfPolyMath/BaselineOfPolyMath.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,17 @@ BaselineOfPolyMath >> baseline: spec [
package: 'Math-Complex'
with: [ spec requires: #('Math-Numerical' 'Math-Polynomials') ];
package: 'Math-Helpers';
package: 'Math-Core-Distribution' with: [ spec requires: #('PolyMathDataStructures') ];
package: 'Math-Distributions' with: [ spec requires: #('PolyMathDataStructures' 'Math-Quantile' 'Math-Core-Process') ];
package: 'Math-Core-Process' with: [ spec requires: #('Math-Helpers') ];
package: 'Math-Numerical' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Core-Distribution' 'Math-DistributionGamma' 'Math-DistributionBeta' 'Math-DistributionForHistogram' 'Math-StatisticalMoments' 'Math-Series') ];
package: 'Math-Polynomials' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Core-Distribution' 'Math-DistributionGamma' 'Math-DistributionBeta' 'Math-DistributionForHistogram' 'Math-StatisticalMoments' 'Math-Series') ];
package: 'Math-DistributionBeta'
with: [ spec requires: #('Math-DistributionGamma') ];
package: 'Math-DistributionForHistogram'
with: [ spec requires: #('Math-Core-Distribution') ];
package: 'Math-DistributionGamma'
with: [ spec requires: #('Math-Core-Distribution') ];
package: 'Math-Numerical' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Distributions' 'Math-StatisticalMoments' 'Math-Series') ];
package: 'Math-Polynomials' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Distributions' 'Math-StatisticalMoments' 'Math-Series') ];
package: 'Math-FastFourierTransform'
with: [ spec requires: #('Math-Complex') ];
package: 'Math-FunctionFit'
with: [ spec
requires:
#('Math-Numerical' 'Math-Chromosome' 'Math-Accuracy-Core' 'PolyMathDataStructures' 'Math-Helpers' 'Math-Polynomials') ];
package: 'Math-KDTree';
package: 'Math-KernelSmoothing' with: [ spec requires: #('Math-Quantile' 'Math-Numerical' 'Math-Polynomials') ];
package: 'Math-KolmogorovSmirnov'
with: [ spec requires: #('Math-Numerical' 'Math-Polynomials') ];
package: 'Math-Number-Extensions';
package: 'Math-ODE' with: [ spec requires: #('Math-Numerical' 'PolyMathDataStructures' 'Math-Polynomials') ];
package: 'Math-Permutation' with: [ spec requires: #('PolyMathDataStructures' 'Math-Core-Process') ];
Expand All @@ -76,18 +67,18 @@ BaselineOfPolyMath >> baseline: spec [
with:
[ spec requires: #('Math-Complex' 'Math-Numerical' 'Math-Polynomials') ];
package: 'Math-Series';
package: 'Math-StatisticalMoments' with: [ spec requires: #('Math-Helpers' 'Math-DistributionForHistogram') ];
package: 'Math-StatisticalMoments' with: [ spec requires: #('Math-Helpers' 'Math-Distributions') ];
package: 'Math-TSNE';
package: 'Math-Tests-Accuracy'
with: [ spec requires: #('Math-Accuracy-Core') ];
package: 'Math-Tests-ArbitraryPrecisionFloat'
with: [ spec requires: #('Math-ArbitraryPrecisionFloat') ];
package: 'Math-Tests-AutomaticDifferenciation' with: [ spec requires: #('Math-AutomaticDifferenciation' 'PolyMathDataStructures') ];
package: 'Math-Tests-Clustering' with: [ spec requires: #('Math-Clustering' 'Math-Core-Distribution' 'Math-UtilsDataServer') ];
package: 'Math-Tests-Clustering' with: [ spec requires: #('Math-Clustering' 'Math-Distributions' 'Math-UtilsDataServer') ];
package: 'Math-Tests-Complex'
with: [ spec requires: #('Math-Complex') ];
package: 'Math-Tests-Core-Distribution'
with: [ spec requires: #('Math-Core-Distribution') ];
package: 'Math-Tests-Distributions'
with: [ spec requires: #('Math-Distributions') ];
package: 'Math-Tests-Core-Process'
with: [ spec requires: #('Math-Core-Process') ];
package: 'Math-Tests-Numerical'
Expand All @@ -98,11 +89,6 @@ BaselineOfPolyMath >> baseline: spec [
package: 'Math-Tests-FunctionFit';
package: 'Math-Tests-KDTree'
with: [ spec requires: #('Math-KDTree') ];
package: 'Math-Tests-KernelSmoothing'
with: [ spec requires: #('Math-KernelSmoothing') ];
package: 'Math-Tests-KolmogorovSmirnov'
with: [ spec
requires: #('Math-Numerical' 'Math-KolmogorovSmirnov' 'Math-Polynomials') ];
package: 'Math-Tests-Number-Extensions'
with: [ spec requires: #('Math-Number-Extensions') ];
package: 'Math-Tests-ODE' with: [ spec requires: #('Math-ODE') ];
Expand All @@ -126,13 +112,13 @@ BaselineOfPolyMath >> baseline: spec [
with: #('Math-Benchmarks-ODE' 'Math-Benchmarks-KDTree');
group: 'Core'
with:
#('Math-Complex' 'Math-Quaternion' 'Math-Numerical' 'MathRandomNumbers' 'Math-KDTree' 'Math-ODE' 'Math-ArbitraryPrecisionFloat' 'Math-FastFourierTransform' 'ExtendedNumberParser' 'Math-Quantile' 'Math-Physics-Constants' 'Math-Polynomials' 'Math-TSNE' 'Math-Core-Process' 'Math-Helpers' 'PolyMathDataStructures' 'Math-Core-Distribution');
#('Math-Complex' 'Math-Quaternion' 'Math-Numerical' 'MathRandomNumbers' 'Math-KDTree' 'Math-ODE' 'Math-ArbitraryPrecisionFloat' 'Math-FastFourierTransform' 'ExtendedNumberParser' 'Math-Quantile' 'Math-Physics-Constants' 'Math-Polynomials' 'Math-TSNE' 'Math-Core-Process' 'Math-Helpers' 'PolyMathDataStructures' 'Math-Distributions');
group: 'Extensions'
with:
#('Math-Clustering' 'Math-Number-Extensions' 'Math-Chromosome' 'Math-PrincipalComponentAnalysis' 'Math-FunctionFit' 'Math-AutomaticDifferenciation' 'Math-KernelSmoothing' 'Math-Permutation' 'Math-KolmogorovSmirnov');
#('Math-Clustering' 'Math-Number-Extensions' 'Math-Chromosome' 'Math-PrincipalComponentAnalysis' 'Math-FunctionFit' 'Math-AutomaticDifferenciation' 'Math-Permutation');
group: 'Tests'
with:
#('Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-KolmogorovSmirnov' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-KernelSmoothing' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Core-Distribution');
#('Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Distributions');
group: 'default'
with: #('Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy') ].

Expand Down
1 change: 0 additions & 1 deletion src/Math-Core-Distribution/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/Math-DistributionBeta/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/Math-DistributionForHistogram/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/Math-DistributionGamma/package.st

This file was deleted.

8 changes: 8 additions & 0 deletions src/Math-Distributions/ManifestMathDistributions.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"
Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
"
Class {
#name : #ManifestMathDistributions,
#superclass : #PackageManifest,
#category : #'Math-Distributions-Manifest'
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
'reducedDOF',
'normalDistribution'
],
#category : 'Math-DistributionGamma'
#category : #'Math-Distributions-Gamma'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class {
'logNorm',
'incompleteBetaFunction'
],
#category : 'Math-DistributionBeta'
#category : #'Math-Distributions-Beta'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
'mu',
'beta'
],
#category : #'Math-Numerical-Math-Distribution'
#category : #'Math-Distributions'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #PMChiSquareDistribution,
#superclass : #PMGammaDistribution,
#category : 'Math-DistributionGamma'
#category : #'Math-Distributions-Gamma'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
#classVars : [
'UniqueInstance'
],
#category : 'Math-Core-Distribution'
#category : #'Math-Distributions'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Class {
#classVars : [
'UniqueInstance'
],
#category : #'Math-Core-Distribution'
#category : #'Math-Distributions-Core'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'beta'
],
#category : #'Math-Numerical-Math-Distribution'
#category : #'Math-Distributions'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class {
'chiSquareDistribution2',
'incompleteBetaFunction'
],
#category : 'Math-DistributionForHistogram'
#category : #'Math-Distributions-ForHistogram'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'alpha',
'beta'
],
#category : #'Math-Numerical-Math-Distribution'
#category : #'Math-Distributions'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
'randomCoefficients',
'incompleteGammaFunction'
],
#category : 'Math-DistributionGamma'
#category : #'Math-Distributions-Gamma'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'histogram'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'alpha1',
'alpha2'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Beta'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
'inverseFraction',
'logNorm'
],
#category : 'Math-DistributionBeta'
#category : #'Math-Distributions-Beta'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'alpha'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Gamma'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
'series',
'fraction'
],
#category : 'Math-DistributionGamma'
#category : #'Math-Distributions-Gamma'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'alpha',
'sum'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Gamma'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Class {
'kernelName',
'ikernel'
],
#category : 'Math-KernelSmoothing'
#category : #'Math-Distributions-KernelSmoothing'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
'distribution',
'n'
],
#category : #'Math-KolmogorovSmirnov'
#category : #'Math-Distributions-KolmogorovSmirnov'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'mu',
'beta'
],
#category : #'Math-Numerical-Math-Distribution'
#category : #'Math-Distributions'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Class {
'laplaceDistribution',
'next'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions'
}

{ #category : #testing }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Class {
#name : #PMLogNormalDistribution,
#superclass : #PMProbabilityDensityWithUnknownDistribution,
#superclass : #PMProbabilityDensity,
#instVars : [
'normalDistribution'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Normal'
}

{ #category : #information }
Expand Down Expand Up @@ -42,6 +42,13 @@ PMLogNormalDistribution class >> new: aNumber1 sigma: aNumber2 [
^super new initialize: aNumber1 sigma: aNumber2
]

{ #category : #information }
PMLogNormalDistribution >> acceptanceBetween: aNumber1 and: aNumber2 [
"Answers the probability of observing a random variable distributed according to
the receiver with a value larger than aNumber 1 and lower than or equal to aNumber2."
^( PMRombergIntegrator function: [:x| self value:x] from: aNumber1 to: aNumber2) evaluate
]

{ #category : #information }
PMLogNormalDistribution >> average [
"Answer the average of the receiver."
Expand All @@ -54,6 +61,14 @@ PMLogNormalDistribution >> changeParametersBy: aVector [
normalDistribution changeParametersBy: aVector.
]

{ #category : #information }
PMLogNormalDistribution >> distributionValue: aNumber [
"Answers the probability of observing a random variable distributed according to
the receiver with a value lower than or equal to aNumber.
This general purpose routine uses numerical integration."
^( PMRombergIntegrator function: [:x| self value:x] from: self lowestValue to: aNumber) evaluate
]

{ #category : #information }
PMLogNormalDistribution >> fourthCentralMoment [
"Private"
Expand All @@ -79,6 +94,11 @@ PMLogNormalDistribution >> kurtosis [
^( ( x + 2) * x + 3) * ( x squared) - 6
]

{ #category : #information }
PMLogNormalDistribution >> lowestValue [
^0
]

{ #category : #information }
PMLogNormalDistribution >> parameters [
^normalDistribution parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class {
#classVars : [
'UniqueInstance'
],
#category : #'Math-Core-Distribution'
#category : #'Math-Distributions'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'meanVector',
'covarianceMatrix'
],
#category : #'Math-Core-Distribution'
#category : #'Math-Distributions-Normal'
}

{ #category : #'instance creation' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
#classVars : [
'NextRandom'
],
#category : #'Math-Core-Distribution'
#category : #'Math-Distributions-Normal'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'flatGenerator'
],
#category : #'Math-Core-Distribution'
#category : #'Math-Distributions-Core'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'probabilityDensity'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions'
}

{ #category : #creation }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Class {
'points',
'interpolator'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Core'
}

{ #category : #information }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'x',
'lastTerm'
],
#category : #'Math-Numerical'
#category : #'Math-Distributions-Gamma'
}

{ #category : #initialization }
Expand Down
Loading