GithubHelp home page GithubHelp logo

kumdo2002 / scipydirect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andim/scipydirect

0.0 0.0 0.0 99 KB

Python wrapper to the DIRECT global optimization algorithm with scipy.optimize compatible call syntax

Home Page: http://scipydirect.readthedocs.io/

License: MIT License

Python 9.92% Fortran 90.08%

scipydirect's Introduction

License Latest release Py2.7/3.x

Status Build Status Documentation Status

DOI

ScipyDIRECT: a Python wrapper of the DIRECT global optimization algorithm

DIRECT is a method to solve global bound constraint optimization problems and was originally developed by D. R. Jones, C. D. Perttunen and B. E. Stuckmann.

ScipyDIRECT is a python wrapper around DIRECT. It enables using DIRECT from the comfort of the Python scripting language.

The Scipydirect package uses the Fortran implementation of DIRECT written by Joerg M. Gablonsky, DIRECT Version 2.0.4. More information on the DIRECT algorithm can be found in Gablonsky's thesis.

ScipyDIRECT is a fork of pydirect. It provides an alternative interface to the DIRECT algorithm compatible with that used in scipy.optimize.

Quick start

ScipyDIRECT is on PyPI so you can install it using pip install scipydirect. As a prerequisite make you sure you have a Fortran compiler such as gfortran installed.

Then run the following minimal example.

import numpy as np
from scipydirect import minimize

def obj(x):
    return (x**2).sum()

bounds = [[-3.0, 3.0], [0.5, 5.0]]
res = minimize(obj, bounds=bounds)
print(res)

Documentation

You can access the documentation online at Read the docs. If you install from source you can generate a local version by running make html from the doc directory.

Support and contributing

For bug reports and enhancement requests use the Github issue tool, or (even better!) open a pull request with relevant changes. If you have any questions don't hesitate to contact me by email ([email protected]) or Twitter (@andimscience).

You can run the testsuite from the test directory:

cd test python test_direct.py

If you receive the warning message "Fortran code not compiled", when you try to use the package the installation has not been successful. Numpy.distutils is used to handle the Fortran dependency, so you might find advice for how to solve your problems by searching for "numpy distutils fortran" online. Unfortunately Fortran installation issues seem to be common, but I cannot assist you in that regard as such an issue is specific to the details of your computer setup.

scipydirect's People

Contributors

andim avatar ibaidev avatar

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.