-
Notifications
You must be signed in to change notification settings - Fork 73
Benchmarks tsne rfr #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Pahandrovich
merged 34 commits into
IntelPython:master
from
itearsl:benchmarks_tsne_rfr
Sep 24, 2021
Merged
Changes from 14 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
4d10210
Benchmarks: add Random Forest Regression and TSNE benchmarks. 10M sam…
itearsl 4565974
benchmarks: add cuml benchmarks for Random Forest Regressor and TSNE
itearsl e871445
benchmarks: add cuml benchmarks for Random Forest Regressor and TSNE
itearsl 59ae6ed
bugfix
itearsl f72f3a5
bugfix
itearsl 621d986
TSNE and RF: fix cuml RF regressor benchmark and add cuml TSNE benchm…
itearsl d133005
Merge master, resolve conflicts
itearsl a8281c0
Bugfix
itearsl 32c2412
add prints in betch.py
itearsl f9291ab
Add tsne in azura tests
6fd18d9
bugfix
9926f3d
fix pep8 and 'float32' bug
itearsl 13aaeac
fix pep8
itearsl 6ec6c52
fix pep8
itearsl 1ea9d66
fix banch errors
itearsl 823ef34
fix banch errors
itearsl 80986e8
test
itearsl f127efd
test
itearsl d262328
test
itearsl fa3401c
fixed bug with JSON parsing
itearsl e5114af
fix codefactor
itearsl 31c8aad
Fix arguments description
itearsl bac85b5
Fix batch.py
itearsl 8acb449
fix bench.py
itearsl 836982e
fix pep8
itearsl 4d29feb
final fix cuml bench
itearsl 433c3b9
fix pep8
itearsl 6ee5ca9
fix codefactor
itearsl 75a0076
fix codefactor
itearsl 07a7581
fix codefactor
itearsl e448b40
fix codefactor
itearsl 5f3066a
fix codefactor
itearsl 7ee5d02
Update cuml_bench/tsne.py
itearsl b4e1519
fix codefactor
itearsl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,40 @@ | ||
import argparse | ||
import bench | ||
from cuml.manifold import TSNE | ||
|
||
parser = argparse.ArgumentParser(description='cuml tsne') | ||
|
||
parser.add_argument('--n-components', type=int, default=2, | ||
help='Dimension of the embedded space.') | ||
parser.add_argument('--early-exaggeration', type=float, default=12.0, | ||
help='Controls how tight natural clusters in the ' | ||
'original space are in the embedded space and how much ' | ||
'space will be between them.') | ||
outoftardis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
parser.add_argument('--learning-rate', type=float, default=200.0, | ||
help='The learning rate for t-SNE is usually in the range [10.0, 1000.0].') | ||
parser.add_argument('--angle', type=float, default=0.5, | ||
help='Only used if method=’barnes_hut’ This is the trade-off' | ||
'between speed and accuracy for Barnes-Hut T-SNE.') | ||
outoftardis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
parser.add_argument('--min-grad-norm', type=float, default=1e-7, | ||
help='If the gradient norm is below this threshold,' | ||
'the optimization will be stopped.') | ||
itearsl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
parser.add_argument('--random-state', type=int, default=1234) | ||
params = bench.parse_args(parser) | ||
|
||
# Load and convert data | ||
X, _, _, _ = bench.load_data(params) | ||
|
||
# Create our random forest regressor | ||
tsne = TSNE(n_components=params.n_components, early_exaggeration=params.early_exaggeration, | ||
learning_rate=params.learning_rate, angle=params.angle, | ||
min_grad_norm=params.min_grad_norm, random_state=params.random_state) | ||
|
||
fit_time, _ = bench.measure_function_time(tsne.fit, X, params=params) | ||
# divergence = tsne.kl_divergence_ | ||
itearsl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
bench.print_output(library='cuml', algorithm='tsne', | ||
stages=['training'], params=params, | ||
functions=['tsne.fit'], | ||
times=[fit_time], metric_type=None, | ||
metrics=None, data=[X], | ||
alg_instance=tsne) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.