Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 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 : #baselines }
{ #category : 'baselines' }
BaselineOfPolyMath >> baseline: spec [

<baseline>
Expand All @@ -41,23 +42,23 @@ BaselineOfPolyMath >> baseline: spec [
package: 'Math-CompatibilityUpToPharo11' ]
]

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

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

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

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

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

spec
Expand Down Expand Up @@ -98,7 +99,7 @@ BaselineOfPolyMath >> groups: spec [
with: #( 'Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy' )
]

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

spec
Expand Down Expand Up @@ -204,40 +205,40 @@ BaselineOfPolyMath >> packages: spec [
with: [ spec requires: #( 'AIDatasets' 'AIDataFrameInspector') ]
]

{ #category : #accessing }
{ #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 >> roassal: spec [

spec
baseline: 'Roassal'
with: [ spec repository: 'github://pharo-graphics/Roassal' ].
]

{ #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' ]
spec baseline: 'MathVectorMatrix' with: [ spec repository: 'github://PolyMathOrg/vector-matrix/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' }
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PMPrincipalComponentAnalyserJacobiTransformation >> accumulate: aPMVectorOrArray
PMPrincipalComponentAnalyserJacobiTransformation >> components [
"Precondition: accumulate: should have been used."

^ self jacobiTransform evaluate copyFrom: 1 to: componentsNumber
^ self jacobiTransform eigenValues copyFrom: 1 to: componentsNumber
]

{ #category : 'accessing' }
Expand All @@ -59,5 +59,5 @@ PMPrincipalComponentAnalyserJacobiTransformation >> transform: aPMMatrix [
PMPrincipalComponentAnalyserJacobiTransformation >> transformMatrix [
"Return a matrix that can be applied to any data vector to extract the relevant component of the data vector"

^ PMMatrix rows: (self jacobiTransform transform rows copyFrom:1 to: componentsNumber )
^ PMMatrix rows: (self jacobiTransform eigenVectors rows copyFrom:1 to: componentsNumber )
]
3 changes: 1 addition & 2 deletions src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ PMNumericalMethodsTestCase >> testEigenvalues [
charPol := PMPolynomial coefficients: #(82 -66 15 -1).
roots := charPol roots asSortedCollection asArray reverse.
finder := PMJacobiTransformation matrix: m.
finder desiredPrecision: 1.0e-09.
eigenvalues := finder evaluate.
eigenvalues := finder eigenValues.
self assert: eigenvalues size equals: 3.
self assert: ((roots at: 1) - (eigenvalues at: 1)) abs < 1.0e-09.
self assert: ((roots at: 2) - (eigenvalues at: 2)) abs < 1.0e-09.
Expand Down
2 changes: 1 addition & 1 deletion src/Math-Tests-TSNE/PMTSNETest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ PMTSNETest >> testreduceXToInputDimsUsing [
t := (PMTSNE new)
x: (PMMatrix rows: #(#(0 0) #(2 2) #(2 0))).
t reduceXToInputDimsUsing: PMPrincipalComponentAnalyserJacobiTransformation.
self assert: (t x) closeTo: (PMMatrix rows: #(#(-0.5 -1.5) #(-0.5 1.5) #(1 0)))
self assert: (t x) closeTo: (PMMatrix rows: #(#(-1.5 -0.5) #(1.5 -0.5) #(0 1)))
]