Orange Blog

By: BIOLAB, Jun 15, 2012

Computing joint entropy (in Python)

How I wrote a beautiful, general, and super fast joint entropy method (in Python). def entropy(*X): return = np.sum(-p * np.log2(p) if p > 0 else 0 for p in (np.mean(reduce(np.logical_and, (predictions == c for predictions, c in zip(X, classes)))) for classes in itertools.product(*[set(x) for x in X]))) I started with the method to compute the entropy of a single variable. Input is a numpy array with discrete values (either integers or strings).

Categories: orange3 python

By: BIOLAB, Sep 13, 2011

Debian packages support multiple Python versions now

We have created Debian packages for multiple Python versions. This means that they work now with both Python 2.6 and 2.7 out of the box, or if you compile them manually, with any (supported) version you have installed on your (Debian-based) system. Practically, this means that now you can install them without manual compiling on current Debian and Ubuntu systems. Give it a try, add our Debian package repository, apt-get install python-orange for Orange library/modules and/or orange-canvas for GUI.

Categories: debian packaging python