Skip to content

Commit b660f2a

Browse files
committed
Add predict function to SNE
1 parent 8e46b27 commit b660f2a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/model/tsne.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ export class SNE {
129129

130130
return new Matrix(n, d, this._y).toArray()
131131
}
132+
133+
/**
134+
* Returns reduced values.
135+
* @returns {Array<Array<number>>}
136+
*/
137+
predict() {
138+
return Matrix.fromArray(this._y).toArray()
139+
}
132140
}
133141

134142
/**

0 commit comments

Comments
 (0)