Skip to content

Commit ceb76f2

Browse files
committed
adjust to changes made to JacobiTransformation
1 parent ff991d6 commit ceb76f2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/Math-PrincipalComponentAnalysis/PMPrincipalComponentAnalyserJacobiTransformation.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PMPrincipalComponentAnalyserJacobiTransformation >> accumulate: aPMVectorOrArray
3333
PMPrincipalComponentAnalyserJacobiTransformation >> components [
3434
"Precondition: accumulate: should have been used."
3535

36-
^ self jacobiTransform evaluate copyFrom: 1 to: componentsNumber
36+
^ self jacobiTransform eigenValues copyFrom: 1 to: componentsNumber
3737
]
3838

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

62-
^ PMMatrix rows: (self jacobiTransform transform rows copyFrom:1 to: componentsNumber )
62+
^ PMMatrix rows: (self jacobiTransform eigenVectors rows copyFrom:1 to: componentsNumber )
6363
]

src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ PMNumericalMethodsTestCase >> testEigenvalues [
6363
charPol := PMPolynomial coefficients: #(82 -66 15 -1).
6464
roots := charPol roots asSortedCollection asArray reverse.
6565
finder := PMJacobiTransformation matrix: m.
66-
finder desiredPrecision: 1.0e-09.
67-
eigenvalues := finder evaluate.
66+
eigenvalues := finder eigenValues.
6867
self assert: eigenvalues size equals: 3.
6968
self assert: ((roots at: 1) - (eigenvalues at: 1)) abs < 1.0e-09.
7069
self assert: ((roots at: 2) - (eigenvalues at: 2)) abs < 1.0e-09.

src/Math-Tests-TSNE/PMTSNETest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ PMTSNETest >> testreduceXToInputDimsUsing [
8282
t := (PMTSNE new)
8383
x: (PMMatrix rows: #(#(0 0) #(2 2) #(2 0))).
8484
t reduceXToInputDimsUsing: PMPrincipalComponentAnalyserJacobiTransformation.
85-
self assert: (t x) closeTo: (PMMatrix rows: #(#(-0.5 -1.5) #(-0.5 1.5) #(1 0)))
85+
self assert: (t x) closeTo: (PMMatrix rows: #(#(-1.5 -0.5) #(1.5 -0.5) #(0 1)))
8686
]

0 commit comments

Comments
 (0)