Skip to main content

Benchmarks library, based on a software product teneva, for tensor based multidimensional approximation and optimization methods

Project description

teneva_bm

Description

Benchmarks library, based on a software product teneva, for tensor based multidimensional approximation and optimization methods. Benchmarks include both multidimensional data arrays and discretized functions of many variables.

Installation

Current version "0.1.1".

The package can be installed via pip: pip install teneva_bm (it requires the Python programming language of the version >= 3.8). It can be also downloaded from the repository teneva_bm and installed by python setup.py install command from the root folder of the project.

Required python packages matplotlib (3.7.0+) and teneva (0.14.0+) will be automatically installed during the installation of the main software product.

Some benchmarks require additional installation of specialized libraries. The corresponding instructions are given in the description of each benchmark (see DESC string in the corresponding python files). Installation of all required libraries for all benchmarks can be done with the following command:

pip install networkx==3.0 qubogen==0.1.1 gekko==1.0.6

Documentation and examples

All benchmarks inherit from the Bm base class (teneva_bm/bm.py) and are located in the teneva_bm folder. The corresponding python files contain a detailed description of the benchmarks, as well as a script for a demo run at the end of the file. You can run demos for all benchmarks at once with the command python demo.py from the root folder of the project.

A typical scenario for working with a benchmark is as follows:

import numpy as np
from teneva_bm import *
np.random.seed(42)

# Prepare benchmark and print info:
bm = BmQuboMaxcut().prep()
print(bm.info())

# Get value at multi-index i:
i = np.ones(bm.d)
print(bm[i])

# Get values for batch of multi-indices I:
I = np.array([i, i, i])
print(bm[I])

# Generate random train dataset:
I_trn, y_trn = bm.build_trn(1000)

Authors

✭__🚂 The stars that you give to teneva_bm, motivate us to develop faster and add new interesting features to the code 😃

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teneva_bm-0.1.1.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

teneva_bm-0.1.1-py3-none-any.whl (37.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page