-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added benchmark and reference to this example in the docs
- Loading branch information
Hoppe
committed
Nov 25, 2024
1 parent
7d887f4
commit e05c174
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# flake8: noqa | ||
import heat as ht | ||
from mpi4py import MPI | ||
from perun import monitor | ||
from heat.decomposition import IncrementalPCA | ||
|
||
|
||
@monitor() | ||
def incremental_pca_split0(list_of_X, n_components): | ||
ipca = IncrementalPCA(n_components=n_components) | ||
for X in list_of_X: | ||
ipca.partial_fit(X) | ||
|
||
|
||
def run_decomposition_benchmarks(): | ||
list_of_X = [ht.random.rand(50000, 500, split=0) for _ in range(10)] | ||
incremental_pca_split0(list_of_X, 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters