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

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

Uploaded Source

Built Distribution

MihkelMagic_Electrical-0.8.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: MihkelMagic_Electrical-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 MihkelMagic_Electrical-0.8.0.tar.gz
Algorithm Hash digest
SHA256 861059966dec7ff8ff54b50ba70e63cd94bab9d82e95b6d43e6304c67e86e712
MD5 f2058bb060581b0f7070af6bd8ab3adf
BLAKE2b-256 996d839a496b148f95a6fd703933229a896f0be6615b7e5e204c8138ed43de0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: MihkelMagic_Electrical-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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 MihkelMagic_Electrical-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8b1169fe4a54974e2b50f3c05c69de0610e23b1831a2976cd2b3a2bc9e75773
MD5 b167bd8c1e7518320bbed1a6eb1fbcab
BLAKE2b-256 ed21114263d518c0884a799c62ddf517fcc664f9725db8fe4f620037e7ec30c8

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