Skip to main content

Automated analysis of superconductor electrical data.

Project description

MihkelMagic_Electrical

This is script to automate the analysis of electrical cell data.

Installation

Run the following command: pip install MihkelMagic_Electrical

How to mihkelBayesian

Optimizing hyperparameters

In order to optimize 2 hyperparameters you need to:

from mihkelBayesian import optimize

min_val, min_hyperparameters = optimize.run(evaluateFunction, functionConstants, n_iterations,bounds)

evaluateFunction - a string of the same name as the function you wish to evaluate in functions.py. functionConstans - a list of constants you wish to apply to the evaluateFunction n_iterations - how many measurements of the function the optimizer is allower to make bounds - (1 x 2) shape numpy array that limits the searchspace in the form of [[x1min,x1max],[x2min,x2max]] min_val - the smallest function value min_hyperparameters - hyperparameter pair corresponding to that value.

(Eg. run("rosenbrock",[1,10],300,np.array([[0,10],[-20,40]])))

Choosing the function to evaluate

Open functions.py to see all currently available functions. Each function takes an array XY that is automatically generated by the optimizer and a list of function constants that the function uses. Use one of the pre-existing functions or write your own function that the optimizer will call upon. Custom function can be analytical, machine learning etc.

Testing

Pytest is used to test the code. All tests are located in the 'tests' folder.To run the tests, execute:

pytest

Notes

You can vary the hyperparameters of the optimizer in order to get better results.

More than 500 no_iterations takes long time to compute. Often no more than 300 iterations are needed.

One run with 500 iterations takes about 4 minutes if the function evaluation is instantaneous.

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

MihkelMagicElectrical-0.8.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

MihkelMagicElectrical-0.8.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file MihkelMagicElectrical-0.8.0.tar.gz.

File metadata

  • Download URL: MihkelMagicElectrical-0.8.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for MihkelMagicElectrical-0.8.0.tar.gz
Algorithm Hash digest
SHA256 322ff5ca8e95ffeec5a1a8b72250e91682443f018614a0584d99139d3277b9bd
MD5 aae6c4256415f4fb174a7aa2695c86f0
BLAKE2b-256 2a89567ef84a3f63a876493e26331a64198facfd97ecb50510a8368a234d0b3e

See more details on using hashes here.

File details

Details for the file MihkelMagicElectrical-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: MihkelMagicElectrical-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for MihkelMagicElectrical-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21845ea2b25090caaa44e081bf009bd67e5cf6847e71acff20d1f43aee250d7e
MD5 bb4f79c5934d0e64bf2b2d49ba35ba6b
BLAKE2b-256 83d574e1d36d80530a0a33afb6f1b25d7ae6220911205379b5d28e273f2b20a3

See more details on using hashes here.

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