https://github.com/anselmoo/keras-tuner-extensionpack

An extension pack for keras-tuner for providing additional optimizers

https://github.com/anselmoo/keras-tuner-extensionpack

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

An extension pack for keras-tuner for providing additional optimizers

Basic Info
  • Host: GitHub
  • Owner: Anselmoo
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 117 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created about 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

keras-tuner-extensionpack

An extension package for KerasTuner for providing more optimizers.

Currently Implemented Algorithms

This package extends KerasTuner with additional optimization algorithms. The currently implemented tuners include:

  • CMA-ES (Covariance Matrix Adaptation Evolution Strategy): An evolutionary algorithm for difficult non-linear non-convex optimization problems in continuous domain.

  • Differential Evolution: A metaheuristic approach that is useful for global optimization of a multidimensional function.

  • Harmony Search: A music-inspired algorithm that is based on the improvisation process of musicians.

  • Simulated Annealing: A probabilistic technique for approximating the global optimum of a given function.

  • Sine Cosine Algorithm: An optimization algorithm inspired by the sine and cosine mathematical functions.

  • Tabu Search: A metaheuristic search method using local or neighborhood search procedures for mathematical optimization.

  • Variable Depth Search: A search algorithm that explores more deeply into chosen paths in the search tree, rather than exploring alternative paths at the current level.

Each of these tuners can be used as via:

```python from kerastunerextensionpack.benchmark.functions import shiftedackley from kerastunerextensionpack.differentialevolution import DifferentialEvolution import keras_tuner

class MyTuner(DifferentialEvolution): def runtrial(self, trial, args, *kwargs): # Get the hp from trial. hp = trial.hyperparameters # Define "x" as a hyperparameter. x = hp.Float( "x", minvalue=-5, maxvalue=5, step=1e-8, sampling="linear", ) y = hp.Float( "y", minvalue=-5, maxvalue=5, step=1e-8, sampling="linear", ) return shiftedackley([x, y]) ```

Algorithms are pre-tested for:

```python def shifted_ackley(x: np.ndarray, shift: tuple = (1, 0.5)) -> float: """Shifted Ackley function.

Args:
    x (np.ndarray): Input vector.
    shift (np.ndarray): Shift vector.

Returns:
    float: Output value.
"""
return ackley(np.array([x[i] - shift[i] for i in range(len(x))]))

```

```python def sphere(x: np.ndarray) -> float: """Sphere function.

Args:
    x (np.ndarray): Input vector.

Returns:
    float: Output value.
"""
return np.sum(x**2)

```

```python def rosenbrock(x: np.ndarray) -> float: """Rosenbrock function.

Args:
    x (np.ndarray): Input array of shape with larger than 2,
        representing the coordinates.

Returns:
    float: Output value.
"""
return np.sum(100.0 * (x[1:] - x[:-1] ** 2.0) ** 2.0 + (1 - x[:-1]) ** 2.0, axis=0)

```

Install

shell pip install keras-tuner-extensionpack

or:

shell pip install git+https://github.com/Anselmoo/keras-tuner-extensionpack

[!NOTE] Please note that this is a very early draft of keras-tuner-extensionpack. This version may contain incomplete features, bugs, or major changes.

Contributing

Contributions to keras-tuner-extensionpack are welcome!

License


[!WARNING] This project was partially generated with extended support by GitHub Copilot and may not be completely verified. Please use with caution and feel free to report any issues you encounter. Thank you!

Owner

  • Name: Anselm Hahn
  • Login: Anselmoo
  • Kind: user
  • Location: Switzerland

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Anselm Hahn A****n@g****m 4

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 9 hours
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 9 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • Anselmoo (5)
Top Labels
Issue Labels
Pull Request Labels
size/XS (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 16 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: keras-tuner-extensionpack

An extension pack for keras-tuner for providing additional optimizers.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 16 Last month
Rankings
Dependent packages count: 9.5%
Average: 36.3%
Dependent repos count: 63.0%
Maintainers (1)
Last synced: 10 months ago

Dependencies

.github/workflows/python-ci.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/python-publish.yaml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • sigstore/gh-action-sigstore-python v1.2.3 composite
poetry.lock pypi
  • absl-py 2.1.0
  • astor 0.8.1
  • astunparse 1.6.3
  • cachetools 4.2.4
  • cachetools 5.3.3
  • certifi 2024.2.2
  • charset-normalizer 3.3.2
  • colorama 0.4.6
  • contourpy 1.1.1
  • contourpy 1.2.1
  • coverage 7.4.4
  • cycler 0.12.1
  • exceptiongroup 1.2.0
  • flatbuffers 24.3.25
  • fonttools 4.51.0
  • gast 0.2.2
  • gast 0.5.4
  • google-auth 1.35.0
  • google-auth 2.29.0
  • google-auth-oauthlib 0.4.6
  • google-auth-oauthlib 1.2.0
  • google-pasta 0.2.0
  • grpcio 1.62.1
  • h5py 3.11.0
  • idna 3.7
  • importlib-metadata 7.1.0
  • importlib-resources 6.4.0
  • iniconfig 2.0.0
  • joblib 1.4.0
  • keras 2.15.0
  • keras-applications 1.0.8
  • keras-preprocessing 1.1.2
  • keras-tuner 1.4.7
  • kiwisolver 1.4.5
  • kt-legacy 1.0.5
  • libclang 18.1.1
  • markdown 3.6
  • markupsafe 2.1.5
  • matplotlib 3.7.5
  • matplotlib 3.8.4
  • ml-dtypes 0.3.2
  • numpy 1.24.4
  • numpy 1.26.4
  • oauthlib 3.2.2
  • opt-einsum 3.3.0
  • packaging 24.0
  • pillow 10.3.0
  • pluggy 1.4.0
  • protobuf 4.25.3
  • protobuf 5.26.1
  • pyasn1 0.6.0
  • pyasn1-modules 0.4.0
  • pyparsing 3.1.2
  • pytest 8.1.1
  • pytest-cov 5.0.0
  • python-dateutil 2.9.0.post0
  • requests 2.31.0
  • requests-oauthlib 2.0.0
  • rsa 4.9
  • ruff 0.3.7
  • scikit-learn 1.3.2
  • scikit-learn 1.4.2
  • scipy 1.10.1
  • scipy 1.13.0
  • setuptools 69.5.1
  • six 1.16.0
  • style 1.1.0
  • tensorboard 2.0.2
  • tensorboard 2.15.2
  • tensorboard-data-server 0.7.2
  • tensorflow 2.0.2
  • tensorflow 2.15.1
  • tensorflow-cpu-aws 2.15.1
  • tensorflow-estimator 2.0.1
  • tensorflow-estimator 2.15.0
  • tensorflow-intel 2.15.1
  • tensorflow-io-gcs-filesystem 0.36.0
  • termcolor 2.4.0
  • threadpoolctl 3.4.0
  • tomli 2.0.1
  • typing-extensions 4.11.0
  • update 0.0.1
  • urllib3 2.2.1
  • werkzeug 3.0.2
  • wheel 0.43.0
  • wrapt 1.14.1
  • wrapt 1.16.0
  • zipp 3.18.1
pyproject.toml pypi
  • matplotlib --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<3.8.2" python: "<3.9" - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^3.8.2" python: "^3.9" benchmark
  • scikit-learn --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<1.4.1.post1" python: "<3.9" - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^1.4.1.post1" python: "^3.9" benchmark
  • pytest ^8.0.0 develop
  • pytest-cov ^5.0.0 develop
  • ruff ^0.3.4 develop
  • keras-tuner ^1.4.6
  • numpy --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<1.26.4" python: "<3.9" markers: python_version < '3.9' - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^1.26.4" python: "^3.9" markers: python_version >= '3.9'
  • python >=3.8,<3.12
  • scipy --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<1.12.0" python: "<3.9" markers: python_version < '3.9' optional: true - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "^1.12.0" python: "^3.9" markers: python_version >= '3.9' optional: true
  • tensorflow --- - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<2.15.0.post1" python: "<3.9" markers: python_version < '3.9' optional: true - !ruby/hash:ActiveSupport::HashWithIndifferentAccess version: "<3.0.0" python: "^3.9" markers: python_version >= '3.9' optional: true
  • update ^0.0.1