Code Monkey home page Code Monkey logo

saga_optimize's Introduction

SAGA_optimize

License information Current library version Supported Python versions Travis CI status

SAGA_optimize is a novel type of combined simulated annealing and genetic algorithm used to find the optimal solutions to a set of parameters based on a given energy function calculated using the set of parameters.

Citation

Please cite the GitHub repository until our manuscript is accepted for publications: https://github.com/MoseleyBioinformaticsLab/SAGA_optimize.git

Installation

SAGA_optimize runs under Python 3.6+ and is available through python3-pip. Install via pip or clone the git repo and install the following dependencies and you are ready to go!

Install on Linux

Pip installation

python3 -m pip install SAGA-optimize

GitHub Package installation

Make sure you have git installed:

git clone https://github.com/MoseleyBioinformaticsLab/SAGA_optimize.git

Dependecies

SAGA_optimize requires the following Python libraries:

  • JSONPickle for saving Python objects in a JSON serializable form and outputting to a file.

Quickstart

>>> import SAGA_optimize
>>> saga = SAGA_optimize.SAGA(stepNumber=100000, temperatureStepSize=100, startTemperature=0.5,
                              alpha=1, direction=-1, energyCalculation=energyCalculation, crossoverRate=0.5,
                              mutationRate=3, annealMutationRate=1, populationSize=20)                  # SAGA instance creation.
>>> saga.addElementDescriptions(SAGA_optimize.ElementDescription(low=0, high=10),
                                SAGA_optimize.ElementDescription(low=0, high=10),
                                SAGA_optimize.ElementDescription(low=0, high=10),
                                SAGA_optimize.ElementDescription(low=0, high=10),
                                SAGA_optimize.ElementDescription(low=0, high=10))        # Add optimized parameters.
>>> optimized_population = saga.optimize()              # the population returned after the opitimization.

Note

Read the User Guide and the SAGA_optimize Tutorial on ReadTheDocs to learn more and to see code examples on using the SAGA_optimize as a library.

License

Made available under the terms of The Clear BSD License. See full license in LICENSE.

Authors

  • Huan Jin
  • Hunter N.B. Moseley

saga_optimize's People

Contributors

andreysmelter avatar jinhuan95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

andreysmelter

saga_optimize's Issues

ElementDescription option "mutateRandomRangedInteger" causes exception.

Created an initial guess as follows:

chromosome = [SAGA_optimize.ElementDescription(low=0, high=1, mutate="mutateRandomRangedInteger") for _ in genes]

Then created a SAGA instance per the tutorial and called optimize. This results in an exception stating that too many parameters are passed to the ElementDescription on line 143:

TypeError: ElementDescription._mutateRandomRangedInteger() takes 1 positional argument but 3 were given.

Removing the argument eliminates the error:

chromosome = [SAGA_optimize.ElementDescription(low=0, high=1) for _ in genes]

The call signature for _mutateRandomRangedInteger on line 48 (and maybe _mutateRandomRangedFloat on line 42 as well) might be incorrect given what line 143 is doing. The call signatures for the population informed versions of these mutation operators appear to take 3 parameters. If you concur, I can fix, test, and submit pull request.

Possibly related: perhaps I should be using 'mutatePopulationRangedInteger' instead? The difference is not described in the documentation.

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.