Skip to content

Commit

Permalink
Add visualizations package with dependencies.
Browse files Browse the repository at this point in the history
Update baseline dependencies.
Also reduce baseline long method.
Update Roassal deprecated class names.
  • Loading branch information
Hernán Morales Durand committed Dec 27, 2023
1 parent 264d746 commit f24cbfb
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 137 deletions.
261 changes: 179 additions & 82 deletions src/BaselineOfPolyMath/BaselineOfPolyMath.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ PolyMath is a Smalltalk project, similar to existing scientific libraries like N
"
Class {
#name : #BaselineOfPolyMath,
#superclass : #BaselineOf,
#category : #BaselineOfPolyMath
#name : 'BaselineOfPolyMath',
#superclass : 'BaselineOf',
#category : 'BaselineOfPolyMath',
#package : 'BaselineOfPolyMath'
}

{ #category : #baseline }
{ #category : 'baselines' }
BaselineOfPolyMath >> baseline: spec [

<baseline>
Expand All @@ -24,80 +25,13 @@ BaselineOfPolyMath >> baseline: spec [
sMark: spec;
xmlWriter: spec;
vectorMatrix: spec;
randomNumbers: spec.
randomNumbers: spec;
datasets: spec;
dataFrameInspector: spec.

spec
package: 'ExtendedNumberParser';
package: 'Math-Accuracy-Core';
package: 'Math-Accuracy-ODE' with: [ spec requires: #( 'Math-ODE' 'XMLWriter' ) ];
package: 'Math-ArbitraryPrecisionFloat' with: [ spec requires: #( 'ExtendedNumberParser' ) ];
package: 'Math-AutomaticDifferenciation' with: [ spec requires: #( 'Math-Numerical' 'MathVectorMatrix' ) ];
package: 'Math-Benchmarks-KDTree' with: [ spec requires: #( 'Math-KDTree' 'SMark' ) ];
package: 'Math-Benchmarks-ODE' with: [ spec requires: #( 'Math-ODE' 'SMark' 'XMLWriter' ) ];
package: 'Math-Chromosome' with: [ spec requires: #( 'MathVectorMatrix' ) ];
package: 'Math-Clustering' with: [ spec requires: #( 'Math-Numerical' 'Math-Core-Process' 'MathVectorMatrix' ) ];
package: 'Math-Complex' with: [ spec requires: #( 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Helpers';
package: 'Math-Distributions' with: [ spec requires: #( 'MathVectorMatrix' 'Math-Quantile' 'Math-Core-Process' ) ];
package: 'Math-Core-Process';
package: 'Math-Numerical'
with: [ spec requires: #( 'MathVectorMatrix' 'Math-Core-Process' 'Math-Distributions' 'Math-StatisticalMoments'
'Math-Series' ) ];
package: 'Math-Polynomials'
with: [ spec requires: #( 'MathVectorMatrix' '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' 'MathVectorMatrix' 'Math-Helpers' 'Math-Polynomials' ) ];
package: 'Math-KDTree';
package: 'Math-Number-Extensions';
package: 'Math-ODE' with: [ spec requires: #( 'Math-Numerical' 'MathVectorMatrix' 'Math-Polynomials' ) ];
package: 'Math-Permutation' with: [ spec requires: #( 'MathVectorMatrix' 'Math-Core-Process' ) ];
package: 'Math-Physics-Constants';
package: 'Math-PrincipalComponentAnalysis' with: [ spec requires: #( 'Math-Numerical' 'MathVectorMatrix' 'Math-Polynomials' ) ];
package: 'Math-Quantile';
package: 'Math-Quaternion' with: [ spec requires: #( 'Math-Complex' 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Series';
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' 'MathVectorMatrix' ) ];
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-Distributions' with: [ spec requires: #( 'Math-Distributions' ) ];
package: 'Math-Tests-Core-Process' with: [ spec requires: #( 'Math-Core-Process' ) ];
package: 'Math-Tests-Numerical' with: [ spec requires: #( 'Math-Numerical' 'Math-UtilsDataServer' ) ];
package: 'Math-Tests-FastFourierTransform' with: [ spec requires: #( 'Math-FastFourierTransform' 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Tests-FunctionFit';
package: 'Math-Tests-KDTree' with: [ spec requires: #( 'Math-KDTree' ) ];
package: 'Math-Tests-Number-Extensions' with: [ spec requires: #( 'Math-Number-Extensions' ) ];
package: 'Math-Tests-ODE' with: [ spec requires: #( 'Math-ODE' ) ];
package: 'Math-Tests-Permutation' with: [ spec requires: #( 'Math-Permutation' ) ];
package: 'Math-Tests-PrincipalComponentAnalysis' with: [ spec requires: #( 'Math-PrincipalComponentAnalysis' ) ];
package: 'Math-Tests-Quantile' with: [ spec requires: #( 'Math-Quantile' ) ];
package: 'Math-Tests-Polynomials' with: [ spec requires: #( 'Math-Polynomials' ) ];
package: 'Math-Tests-Quaternion' with: [ spec requires: #( 'Math-Quaternion' ) ];
package: 'Math-Tests-TSNE' with: [ spec requires: #( 'Math-TSNE' ) ];
package: 'Math-UtilsDataServer'.
spec
group: 'Accuracy' with: #( 'Math-Accuracy-ODE' 'Math-Accuracy-Core' );
group: 'Benchmarks' 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' 'MathVectorMatrix' 'Math-Distributions' );
group: 'Extensions'
with: #( '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-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' ) ].
self
packages: spec;
groups: spec ].

spec for: #( #'pharo6.x' #'pharo7.x' #'pharo8.x' #'pharo9.x' #'pharo10.x' ) do: [
spec
Expand All @@ -107,32 +41,195 @@ BaselineOfPolyMath >> baseline: spec [
package: 'Math-CompatibilityUpToPharo11' ]
]

{ #category : #accessing }
{ #category : 'dependencies' }
BaselineOfPolyMath >> dataFrameInspector: spec [

spec
baseline: 'AIDataInspector'
with: [ spec repository: 'github://pharo-ai/data-inspector/src' ]
]

{ #category : 'dependencies' }
BaselineOfPolyMath >> datasets: spec [

spec
baseline: 'AIDatasets'
with: [ spec repository: 'github://pharo-ai/datasets' ].
]

{ #category : 'baselines' }
BaselineOfPolyMath >> groups: spec [

spec
group: 'Accuracy'
with: #( 'Math-Accuracy-ODE' 'Math-Accuracy-Core' );
group: 'Benchmarks'
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' 'MathVectorMatrix' 'Math-Distributions' );
group: 'Extensions'
with:
#( '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-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: 'visualizations'
with:
#( 'Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy' 'Math-Visualizations' );
group: 'default'
with: #( 'Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy' )
]

{ #category : 'baselines' }
BaselineOfPolyMath >> packages: spec [

spec
package: 'ExtendedNumberParser';
package: 'Math-Accuracy-Core';
package: 'Math-Accuracy-ODE'
with: [ spec requires: #( 'Math-ODE' 'XMLWriter' ) ];
package: 'Math-ArbitraryPrecisionFloat'
with: [ spec requires: #( 'ExtendedNumberParser' ) ];
package: 'Math-AutomaticDifferenciation'
with: [ spec requires: #( 'Math-Numerical' 'MathVectorMatrix' ) ];
package: 'Math-Benchmarks-KDTree'
with: [ spec requires: #( 'Math-KDTree' 'SMark' ) ];
package: 'Math-Benchmarks-ODE'
with: [ spec requires: #( 'Math-ODE' 'SMark' 'XMLWriter' ) ];
package: 'Math-Chromosome'
with: [ spec requires: #( 'MathVectorMatrix' ) ];
package: 'Math-Clustering' with: [
spec requires:
#( 'Math-Numerical' 'Math-Core-Process' 'MathVectorMatrix' ) ];
package: 'Math-Complex'
with: [ spec requires: #( 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Helpers';
package: 'Math-Distributions' with: [
spec requires:
#( 'MathVectorMatrix' 'Math-Quantile' 'Math-Core-Process' ) ];
package: 'Math-Core-Process';
package: 'Math-Numerical' with: [
spec requires:
#( 'MathVectorMatrix' 'Math-Core-Process' 'Math-Distributions'
'Math-StatisticalMoments' 'Math-Series' ) ];
package: 'Math-Polynomials' with: [
spec requires:
#( 'MathVectorMatrix' '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'
'MathVectorMatrix' 'Math-Helpers' 'Math-Polynomials' ) ];
package: 'Math-KDTree';
package: 'Math-Number-Extensions';
package: 'Math-ODE' with: [
spec requires:
#( 'Math-Numerical' 'MathVectorMatrix' 'Math-Polynomials' ) ];
package: 'Math-Permutation'
with: [ spec requires: #( 'MathVectorMatrix' 'Math-Core-Process' ) ];
package: 'Math-Physics-Constants';
package: 'Math-PrincipalComponentAnalysis' with: [
spec requires:
#( 'Math-Numerical' 'MathVectorMatrix' 'Math-Polynomials' ) ];
package: 'Math-Quantile';
package: 'Math-Quaternion' with: [
spec requires:
#( 'Math-Complex' 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Series';
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'
'MathVectorMatrix' ) ];
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-Distributions'
with: [ spec requires: #( 'Math-Distributions' ) ];
package: 'Math-Tests-Core-Process'
with: [ spec requires: #( 'Math-Core-Process' ) ];
package: 'Math-Tests-Numerical'
with: [ spec requires: #( 'Math-Numerical' 'Math-UtilsDataServer' ) ];
package: 'Math-Tests-FastFourierTransform' with: [
spec requires:
#( 'Math-FastFourierTransform' 'Math-Numerical' 'Math-Polynomials' ) ];
package: 'Math-Tests-FunctionFit';
package: 'Math-Tests-KDTree'
with: [ spec requires: #( 'Math-KDTree' ) ];
package: 'Math-Tests-Number-Extensions'
with: [ spec requires: #( 'Math-Number-Extensions' ) ];
package: 'Math-Tests-ODE' with: [ spec requires: #( 'Math-ODE' ) ];
package: 'Math-Tests-Permutation'
with: [ spec requires: #( 'Math-Permutation' ) ];
package: 'Math-Tests-PrincipalComponentAnalysis'
with: [ spec requires: #( 'Math-PrincipalComponentAnalysis' ) ];
package: 'Math-Tests-Quantile'
with: [ spec requires: #( 'Math-Quantile' ) ];
package: 'Math-Tests-Polynomials'
with: [ spec requires: #( 'Math-Polynomials' ) ];
package: 'Math-Tests-Quaternion'
with: [ spec requires: #( 'Math-Quaternion' ) ];
package: 'Math-Tests-TSNE'
with: [ spec requires: #( 'Math-TSNE' ) ];
package: 'Math-UtilsDataServer';
package: 'Math-Visualizations'
with: [ spec requires: #( 'Roassal' 'AIDatasets' 'AIDataInspector') ]
]

{ #category : 'accessing' }
BaselineOfPolyMath >> projectClass [
^ [ self class environment at: #MetacelloCypressBaselineProject ]
on: NotFound
do: [ super projectClass ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPolyMath >> randomNumbers: spec [

spec baseline: 'MathRandomNumbers' with: [ spec repository: 'github://PolyMathOrg/random-numbers:v1.x.x/src' ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPolyMath >> sMark: spec [

spec baseline: 'SMark' with: [ spec repository: 'github://smarr/SMark:v1.0.4' ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPolyMath >> vectorMatrix: spec [

spec baseline: 'MathVectorMatrix' with: [ spec repository: 'github://PolyMathOrg/vector-matrix:v1.x.x/src' ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPolyMath >> xmlWriter: spec [

spec baseline: 'XMLWriter' with: [ spec repository: 'github://pharo-contributions/XML-XMLWriter:2.9.x/src' ]
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfPolyMath/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfPolyMath }
Package { #name : 'BaselineOfPolyMath' }
13 changes: 7 additions & 6 deletions src/Math-PrincipalComponentAnalysis/PMDataTransformer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ PMDataTransformer is the abstract root class of transformers. All data transform
"
Class {
#name : #PMDataTransformer,
#superclass : #Object,
#category : #'Math-PrincipalComponentAnalysis'
#name : 'PMDataTransformer',
#superclass : 'Object',
#category : 'Math-PrincipalComponentAnalysis',
#package : 'Math-PrincipalComponentAnalysis'
}

{ #category : #accessing }
{ #category : 'accessing' }
PMDataTransformer >> fit: aPMMatrix [
^ self subclassResponsibility
]

{ #category : #accessing }
{ #category : 'accessing' }
PMDataTransformer >> fitAndTransform: aPMMatrix [
^ (self fit: aPMMatrix) transform: aPMMatrix
]

{ #category : #transforming }
{ #category : 'transforming' }
PMDataTransformer >> transform: aPMMatrix [
^ self subclassResponsibility
]
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
Class {
#name : #PMPrincipalComponentAnalyser,
#superclass : #Object,
#name : 'PMPrincipalComponentAnalyser',
#superclass : 'Object',
#instVars : [
'componentsNumber'
],
#category : #'Math-PrincipalComponentAnalysis'
#category : 'Math-PrincipalComponentAnalysis',
#package : 'Math-PrincipalComponentAnalysis'
}

{ #category : #accessing }
{ #category : 'accessing' }
PMPrincipalComponentAnalyser >> componentsNumber [
^ componentsNumber
]

{ #category : #accessing }
{ #category : 'accessing' }
PMPrincipalComponentAnalyser >> componentsNumber: anInteger [
componentsNumber := anInteger
]

{ #category : #accessing }
{ #category : 'accessing' }
PMPrincipalComponentAnalyser >> fit: aPMMatrix [
^ self subclassResponsibility
]

{ #category : #accessing }
{ #category : 'accessing' }
PMPrincipalComponentAnalyser >> fitAndTransform: aPMMatrix [
^ (self fit: aPMMatrix) transform: aPMMatrix
]

{ #category : #accessing }
{ #category : 'accessing' }
PMPrincipalComponentAnalyser >> transform: aPMMatrix [
^ self subclassResponsibility
]

0 comments on commit f24cbfb

Please sign in to comment.