Coder Social home page Coder Social logo

hercules261188 / scikit-learn_bench Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intelpython/scikit-learn_bench

0.0 2.0 0.0 656 KB

scikit-learn_bench benchmarks various implementations of machine learning algorithms across data analytics frameworks. It currently support the scikit-learn, DAAL4PY, cuML, and XGBoost frameworks for commonly used machine learning algorithms.

License: Apache License 2.0

Python 100.00%

scikit-learn_bench's Introduction

Machine Learning Benchmarks

Build Status

Machine Learning Benchmarks contains implementations of machine learning algorithms across data analytics frameworks. Scikit-learn_bench can be extended to add new frameworks and algorithms. It currently supports the scikit-learn, DAAL4PY, cuML, and XGBoost frameworks for commonly used machine learning algorithms.

Follow us on Medium

We publish blogs on Medium, so follow us to learn tips and tricks for more efficient data analysis. Here are our latest blogs:

Table of content

How to create conda environment for benchmarking

Create a suitable conda environment for each framework to test. Each item in the list below links to instructions to create an appropriate conda environment for the framework.

pip install -r sklearn_bench/requirements.txt
# or
conda install -c intel scikit-learn scikit-learn-intelex pandas tqdm
conda install -c conda-forge scikit-learn daal4py pandas tqdm
conda install -c rapidsai -c conda-forge cuml pandas cudf tqdm
pip install -r xgboost_bench/requirements.txt
# or
conda install -c conda-forge xgboost scikit-learn pandas tqdm

Running Python benchmarks with runner script

Run python runner.py --configs configs/config_example.json [--output-file result.json --verbose INFO --report] to launch benchmarks.

Options:

  • --configs: specify the path to a configuration file or a folder that contains configuration files.
  • --no-intel-optimized: use Scikit-learn without Intel(R) Extension for Scikit-learn*. Now available for scikit-learn benchmarks. By default, the runner uses Intel(R) Extension for Scikit-learn.
  • --output-file: specify the name of the output file for the benchmark result. The default name is result.json
  • --report: create an Excel report based on benchmark results. The openpyxl library is required.
  • --dummy-run: run configuration parser and dataset generation without benchmarks running.
  • --verbose: WARNING, INFO, DEBUG. Print out additional information when the benchmarks are running. The default is INFO.
Level Description
DEBUG etailed information, typically of interest only when diagnosing problems. Usually at this level the logging output is so low level that it’s not useful to users who are not familiar with the software’s internals.
INFO Confirmation that things are working as expected.
WARNING An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected.

Benchmarks currently support the following frameworks:

  • scikit-learn
  • daal4py
  • cuml
  • xgboost

The configuration of benchmarks allows you to select the frameworks to run, select datasets for measurements and configure the parameters of the algorithms.

You can configure benchmarks by editing a config file. Check config.json schema for more details.

Benchmark supported algorithms

algorithm benchmark name sklearn daal4py cuml xgboost
DBSCAN dbscan
RandomForestClassifier df_clfs
RandomForestRegressor df_regr
pairwise_distances distances
KMeans kmeans
KNeighborsClassifier knn_clsf
LinearRegression linear
LogisticRegression log_reg
PCA pca
Ridge ridge
SVM svm
train_test_split train_test_split
GradientBoostingClassifier gbt
GradientBoostingRegressor gbt

Intel(R) Extension for Scikit-learn support

When you run scikit-learn benchmarks on CPU, Intel(R) Extension for Scikit-learn is used by default. Use the --no-intel-optimized option to run the benchmarks without the extension.

The following benchmarks have a GPU support:

  • dbscan
  • kmeans
  • linear
  • log_reg

You may use the configuration file for these benchmarks to run them on both CPU and GPU.

Algorithms parameters

You can launch benchmarks for each algorithm separately. To do this, go to the directory with the benchmark:

cd <framework>

Run the following command:

python <benchmark_file> --dataset-name <path to the dataset> <other algorithm parameters>

The list of supported parameters for each algorithm you can find here:

scikit-learn_bench's People

Contributors

alexsandruss avatar petrovkp avatar bibikar avatar onlydeniko avatar pahandrovich avatar oleksandr-pavlyk avatar owerbat avatar triskadecaepyon avatar shvetsks avatar pivovara avatar michael-smirnov avatar kalyanovd avatar outoftardis avatar smirnovegorru avatar anton-malakhov avatar masdevas avatar itearsl avatar alexander-makaryev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.