Blog Archives

April 27th 2010

Optimization scikit: a gradient-based optimization

Last time, I’ve made a simple example of a gradient-free optimization. Now, I’d like to use the gradient of my function (analytical gradient I’ve computed) to be able to get the global minimum in less iterations.
Continue Reading »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

No Comments yet »

February 2nd 2010

Annoucement: scikits.optimization 0.1

I’m pleased to announce the first release of one of my projects. This scikits is based on a generic framework that can support unconstrained cost function minimization. It is based on a separation principle and is also completely object oriented.

Several optimizers are available:

  • Nelder-Mead or simplex minimization
  • Unconstrained gradient-based minimization

The usual criterias can be used:

  • Iteration limit
  • Parameter change (relative and absolute)
  • Cost function changer (relative and absolute)
  • Composite criterion generation (AND/OR)

Different direction searches are available:

  • Gradient
  • Several conjugate-gradient (Fletcher-Reeves, …)
  • Decorators for selecting part of the gradient
  • Marquardt step

Finally several line searches (1D minimization) were coded:

  • Fibonacci and gold number methods (exact line searches)
  • Wolfe-Powell soft and strong rules
  • Goldstein line search
  • Cubic interpolation

Additional helper classes can be used:

  • Finite difference differentation (central and forward)
  • Quadratic cost (for least square estimation)
  • Levenberg-Marquardt approximation for least square estimation

Although it is the 0.1 version, the code is quite stable and is used in the learn scikit.

The package can be easy-installed or can be found on PyPI.

Several tutorials are available or will be available on the future at the following locations:

Buy Me a Coffee!



Other Amount:



Your Email Address :



1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading ... Loading ...

3 Comments »

December 22nd 2009

Optimization scikit: Starting with gradient-free simple optimization

Some months ago, I’ve finished my manifold learning posts serie. As support for the manifold learning toolkit, I’ve also developed an optimization framework, which I’ll be blogging about, starting now.
Continue Reading »

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
Loading ... Loading ...

No Comments yet »

September 24th 2009

Book review: Beginning Python Visualization: Crafting Visual Transformation Scripts

Python can be used for many things, and is mainly known for the shell scripts people wrote. Shai Vangast proposes using the langage for data analysis and visualization.
Continue Reading »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

No Comments yet »

June 2nd 2009

A quick hack to use the MKL with numpy/scipy on Linux

I’ve promised to make an update whenever I would find a solution to the problem I had some months ago when I tried to use the latest MKL with numpy. Well, there was a simple hack that did the trick. It is far from being perfect, but at least, the tests pass now.
So the only thing you have to do is to export the LD_PRELOAD variable:

export LD_PRELOAD=/path/to/the/MKL/lib/libmkl_core.so
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

1 Comment »

November 3rd 2008

[Updated] I used the latest MKL with Numpy and…

I’m trying to use the MKL with some programs and libraries, but I encountered something really strange and I’m not alone.
First, what is i_free ? Accoding to Intel, it’s their way to handle memory allocation and deallocation. They are only pointers to the actual memory functions so as to let the user decide if he wants a custom memory handler. Since 10.0.3, Intel changed their model, and the trouble begins.
Continue Reading »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

No Comments yet »

November 6th 2007

Wrapping a C++ container in Python

When moving to Python, the real big problem that arises is the transformation of a Python array into the C++ container the team used for years.

Let’s set some hypothesis :

  • there is a separation between the class containing the data and the class that uses the data (iterators, …)
  • the containing class can be changed (policy or strategy pattern)

The first hypothesis is derived from the responsibility principle, the two classes have two distinct responsibilities, the first allocates the data space and allows simple access to it, the second allows usual operations (assignation, comparison tests or iterations for instance).

The second one will be the heart of the wrapper. It allows to change the way data is stored and accessed in a simple way.
Continue Reading »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

1 Comment »

« Prev

  • Blog Vitals

    Blog Stats
    Google Page Rank
    7,780,464
    165
    178
    32
  • Advertisement