Orange NMF add-on

Nimfa, a Python library for non-negative matrix factorization (NMF), which was part of Orange GSoC program back in 2011 got its own add-on.

Nimfa provides a plethora of initialization and factorization algorithms, quality measures along with examples on real-world and synthetic data sets. However, until now the analysis was possible only through Python scripting. A recent increase of interest in NMF techniques motivated Fajwel Fogel (a PhD student from INRIA, Paris, SIERRA team) to design and implement several widgets that deal with missing data in target matrices, their normalizations, viewing and assessing the quality of matrix factors returned by different matrix factorization algorithms. He also provided an implementation of robust singular value decomposition (rSVD). All NMF methods call Nimfa library.

Target, basis and coefficient matrices.

Above is shown a simple scenario in Orange that applies LSNMF algorithm from Nimfa to decompose a non-negative target matrix and visualizes its basis matrix (W) and coefficient matrix (H) as heat maps. NMF finds a parts-based representation of the data due to the fact that only additive, not subtractive, combinations are allowed, which results in improved interpretability of matrix factors. That is possible because non-negativity constraints are imposed in the NMF model in contrast to SVD, PCA and ICA, which provide only holistic representations. The effect can be easily seen if we investigate heat maps produced by the scenario above. Below are shown the target, basis and coefficient matrices (from left to right, top down), respectively.

NMF Add-on view in Orange

Writing Orange Add-ons

We officially supported add-ons in Orange 2.6. You should start by checking the list of available add-ons. We pull those automatically from the PyPi, which is our preferred distribution channel. Try to install an add-on by either:

  • writing “pip install <add-on name>” in the terminal or
  • from the Orange Canvas GUI. Select “Options / Add-ons…” in the menu.

Everything should just work. Writing add-ons is as easy as writing your own Orange Widgets or Orange Scripts. Just follow this tutorial and you will have your brand-new Orange add-on on PyPi in no time (an hour at most).

Orange Add Ons

The easy way to install add-ons

The possibility of extending functionality of Orange through add-ons has been present for a long time. In fact, we never provided the toolbox for crunching bioinformatical data as an integral part of Orange; it has always been an add-on. The exact mechanism of distribution of add-ons has changed significantly in the last year to simplify the process for add-on authors and to make it more standards-compliant. Among other things, this enables system administrators to install add-ons system-wide directly from PyPi using easy_install or pip. Unfortunately there were also negative side effects of this process, notably the temporary breakage of the add-on management dialog within the Orange Canvas.

We are happy to report that this is now being taken care of and you are encouraged to test the functionality.

Screenshot of the Add-on Management Dialog

Select “Add-ons…” in the Options menu. A dialog will open that will list and describe existing add-ons. You can see the same list on the appropriate part of Orange website, but there is more. In the dialog, you can simply pick the add-ons you wish to use, confirm the selection and you should be good to go: widgets that come with the selected add-ons will become available immediately.

In case you change your mind, on some systems you can also uninstall add-ons by removing the check marks in front of them. This only works if you have pip installed, which is uncommon on Windows systems.

This might be a good time to warn you that the described functionality is new and not thoroughly tested on all the platforms on which Orange runs. If you stumble upon any strange or unwanted behavior, please let us now on the Orange forum, preferrably in the Bugs section.

Note that the Orange-Text add-on requires a compiler and appropriate libraries on your computer, and it as of now still refuses to be installed using the dialog. This is a known bug.