Keep the gradient flowing

Scikit-learn 0.1

Today I released the first public version of Scikit-Learn (release notes). It's a python module implementing some machine learning algorithms, and it's shaping quite good.

For this release I did not want to do any incompatible changes, so most of them are just bug fixes and updates. For the next …

scikit-learn project on sourceforge

This week we created a sourceforge project to host our development of scikit-learn. Although the project already had a directory in scipy's repo, we needed more flexibility in the user management and in the mailing list creation, so we opted for SourceForge. To be honest, after using git and Google …

After holidays

New job, new code, new city, new colleagues. Feels something like this:

Winter in Paris is not funny

This week I arrived to the place where I will be working the following two years: Neurospin.

It's a research center located 20 km from Paris, and so far things are going smoothly: the place is beautiful, work is great and food is excellent. Well OK, I do miss some …

Last days in Granada

Nice thing about winter in Granada is, that even in the coldest days, the sky is always blue.

Learning, Machine Learning

My new job is about managing an open source package for machine learning in Python. I've had some experience with Python now, but I am a total newbie in the field of machine learning, so my first task will be to find a good reference book in the subject and …

Moving to Paris!

I'm extremely glad that finally I am moving to Paris to work as part of the INRIA crew. I'll be working with Gael Varoquaux and his team in an extremely cool Python related project (more to come on this in the following weeks). Granada has been a great place for …

Summer of Code is over

Google Summer of Code program is officially over. It has been four months of intense work, exciting benchmarks and patch reviewing. It was a huge pleasure working with you guys! As for the project, I implemented a complete logic module and then an assumption system for sympy (sympy.logic, sympy …

Speed improvements for ask() (sympy.queries.ask)

I managed to overcome the overhead in ask() that arises when converting between symbol and integer representation of sentences in conjunctive normal. The result went beyond what I expected. The test suite for the query module got 10x times faster in my laptop. From 26 seconds, it descended to an …

Logic module (sympy.logic): improving speed

Today I've been doing some speed improvements for the logic module. More precisely, I implemented an efficient internal representation for clauses in conjunctive normal form. In practice this means a huge performance boost for all problems that make use the function satisfiable() or dpll_satisfiable(). For example, test_dimacs.py has moved …

Refine module

This commit introduced a new module in sympy: the refine module. The purpose of this module is to simplify expressions when they are bound to assumptions. For example, if you know that x>0, then you can simplify abs(x) to x. This code was traditionally embedded into the core …

Query module - finally in trunk

The query module is finally in the main SymPy repository. I made substantial changes since last post, most of them at the user interface level (thanks to Vinzent and Mateusz for many insightful comments). Main function is ask(), which replaces the old expression.is_* syntax. You can ask many things …

django, change language settings dynamically

After some failed attempts, I just found how to change the language settings dynamically in django, and I thought it could be useful to someone. Just use function activate() from django.utils.translation. For example: [cc lang="python"] from django.utils.translation import activate activate('es-ES') [/cc] will change global …

can we merge now, pleeease ?

Three months after I began to write sympy.queries, I feel it's about time to include it in sympy's trunk, so today I sent for review 4 patches that implement the complete query module. It's been a lot of fun, but it has also caused me some headaches ... specially last …

Refine module, proof of concept

The 0.6.5 release of SymPy is taking longer than expected because some bugs in the testing framework, so my query module is not merged into trunk (yet). In the meantime, I am implementing a refine module (very little code is available yet). The refine module implements a refine …

Preparing a new release

Last days I've been busy preparing the first public beta of SymPy 0.6.5. Most of the time was spent solving a bug that made documentation tests fail under python2.4, but now that this is solved, I hope that by the end of the week we could have …

Efficient DPLL algorithm

Background: DPLL is the algorithm behind SymPy's implementation of logic.inference.satisfiable After reading the original papers by Davis & Putnam [1], I managed to implement a more efficient version of the DPLL algorithm. It is 10x times faster on medium-sized problems (40 variables), and solves some wrong result bugs [2 …

Queries and performance

After some hacking on the queries module, I finally got it right without the limitations of past versions. You can check it out from my repo http://fa.bianp.net/git/sympy.git, branch master. It now relies even more on logic.inference.satisfiable(), which is just an implementation of …

Reading CNF files

The DIMACS CNF file format is used to define a Boolean expression, written in conjunctive normal form, that may be used as an example of the satisfiability problem. The new logic module (sympy.logic) can read the content of a cnf file and transform it into a boolean expression suitable …

Logic module merged

Yesterday I finally merged the logic module in sympy's official master branch, and should be released together with SymPy 0.6.5. Next thing to do: profile the code and write some docs before the release.

The boolean satisfiability problem

Most annoying problem in my implementation of the query system is that it will not solve implications if the implicates are far away from each other. For instance, if the graph of known facts is something like this

Integer ----> Rational --> Real --> Complex
  ^  ^
  |  |
  |   -------
  |         |
Prime      Even
  ^
  |
  |
MersennePrime

Then it will not know …

Initial implementation of the query system

I sent some patches to sympy-patches with an initial implementation of the query system. You can check it out by pulling from my branch: git pull http://fa.bianp.net/git/sympy.git master into your sympy repo. Some examples of what you can do (sample isympy session): In [1 …

Assumption system and automatic theorem proving. Should I be learning LISP ?

This is the third time I attempt to write the assumption system. Other attempts could be described as me following the rule: “For any complex problem, there is always a solution that is simple, clear, and wrong.” My first attempt (although better than the current assumption system) did use very …

Homenaje a Antonio Vega en La Percha

El pasado jueves estuvimos en La Percha tocando algunas canciones de Antonio Vega. El vídeo se lo ha currado mi padre mezclando el sonido del directo con una grabación que hicimos en casa de Migue

LOS ESCLAVOS: homenaje a Antonio Vega from Felipe Pedregosa on Vimeo.

Fun with the new Logic module

The logic module is slowly becoming useful. This week I managed to get some basic inference in propositional logic working. This should be enough for the assumption sysmtem (although having first-order inference would be cool). You can pull from my branch: `` git pull http://fa.bianp.net/git/sympy.git …