Chemometrics and Intelligent Laboratory Systems
Short communicationHow octave can replace Matlab in chemometrics
Introduction
Since the mid 1980s the high level mathematical scripting language Matlab (Matrix Laboratory) [1], [2] from MathWorks Inc has become a standard tool in many scientific and technical disciplines for prototyping new algorithms and analysing data. Few can disagree with the fact that Matlab is a very powerful tool which has improved the development cycle of method developers and others worldwide. People in chemometrics were early in adopting Matlab to test out and implement new algorithms. It has also become common to include Matlab source code in appendices of scientific papers and books. This fact has made it possible for our colleagues to rapidly test out new methods and ideas after reading about it in the scientific literature. It can safely be said that Matlab has had a profound impact on our field and many investigators cannot see doing their work without it.
In this article we take the stance that in spite of its power and usefulness, Matlab as a proprietary scripting language poses several potential dangers to the future development of the field. The main problem is not directly related to technical limitations of the software, but rather to the fact that we have become completely dependent on a scripting language which is totally controlled by a commercial company. At the surface this might not seem like a problem, however as will be explored in the present article, there are many pitfalls and dangers related to this dependency. We as users and method developers are not able to influence directly the direction of the technological development of one of our most important tools. Fortunately, the dependency problem can be solved by an open source scripting language which is Matlab compatible. Based on comparison of existing technologies available on the Internet, we suggest the most realistic alternative to Matlab is the Octave program [3] (www.octave.org) originally created by John W. Eaton at Department of Chemical and Biological Engineering, University of Wisconsin-Madison, USA.
Section snippets
Software dependency
Software dependency is related to the amount of investment the user has allocated to a particular program. The general rule is: The more investment in time, effort and money the user spends on the software, the more he becomes dependent on it. The cost of moving to another software may become too high and thus the user stays on even if he wants to change. The situation where a user find himself unable to abandon a particular software is often referred to as a lock-in. This is a very undesirable
Open source alternatives to Matlab
Existing open source alternatives to Matlab can be divided into two main categories:
- •
Systems that have a syntax very similar to Matlab. Examples of such systems are:
- •
Octave
- •
SciLab
- •
- •
Systems which are qualitatively different to the Matlab language, but with comparable functionality. Examples are:
- •
SciPy
- •
R.
- •
Based on the maturity of the project, level of sophistication and closeness to Matlab syntax, Octave is in our opinion the best choice and thus the most likely candidate to replace Matlab as the main
History
The Octave project was originally started by John Eaton in 1988 to be a companion software for an undergraduate-level textbook on chemical reactor design written by James B. Rawlings of the University of Wisconsin-Madison and John G. Ekerdt of the University of Texas. Full time development of the software began in 1992 and the 1.0 version was released in 1994. The current stable version of the software is 2.0, but it is now outdated. The recommended version is the test version, 2.1.71. The new
The Oplot graphics system
Based on the assumption that creating a HG-like system for Octave is one the most important features that needs to be added, we started the Oplot project (http://oplot.sourceforge.net/). To give chemometrics a tool which is comparable to Matlab, Oplot would need to be compatible with the HG syntax and functionality such that Matlab m-files would execute without errors.
Oplot is developed and designed to be independent of the Octave system and contains five major modules referred to as: octave,
Oplot features
The goal of Oplot is to provide full HG compatibility, however at the present stage only a subset of all features are available such as Root Figure, Surface, Patch, Axes, Text, Line and Image.
A selected set of functions related to ‘Handle graphics objects’ supported by Oplot is given in Table 1.
Example
The following plot shows how Oplot is used in a typical PCA example where the explained variance, scores, loadings and raw data plot are displayed, see Fig. 1. The m-code for the upper-left corner is:
The 2D scores plot is shown in the upper-right corner. Two sets of indices, named idx1 and idx2 are used to separate out groups of objects displayed in red and blue colours:
One dimensional line plots are used for the loadings. This is shown in the bottom left part of Fig. 1 and the m-code sent to
Discussion
An important question is how Octave can become the main development language in chemometrics. We believe it is instructive to learn from an analogous situation which occurred in the field of statistics. The popular, but proprietary system S-PLUS has in many ways been replaced by the open source alternative R (cran.r-project.org/). Instead of letting the Insightful company (www.insightful.com) which sells S-PLUS have total dominance of their main developing tool, the statisticians have gained
References (19)
- et al.
Mastering MATLAB 6
(2000) - MATLAB Reference Guide, Natick, Mass, The MathWorks Inc.,...
GNU Octave Manual
(2002)Java: An Introduction to Problem Solving and Programming
(2004)- et al.
Python Essential Reference
(2001) - The Python Project, http://www.python.org,...
- et al.
Programming Perl
(2000) The MAPLE Book
(2001)The Mathematica Book
(2003)
Cited by (4)
Spatial Analysis and Modeling Tool Version 2 (SAMT2), a spatial modeling tool kit written in Python
2015, Ecological InformaticsCitation Excerpt :Compared to other open-source GIS projects like SAGA (Merzky et al., 2015) or (QGIS, 2015), SAMT2 is a small tool kit. SAMT2 is specialized to fill the gap between matrix calculation tools such as Matlab or the open-source clone Octave (Alsberg and Hagen, 2006) and a GIS. SAMT2 can only handle raster data, but it does so efficiently.
Computer aided education in random filed engineering by application of mathematical tool
2012, Procedia EngineeringTutorial: multivariate classification for vibrational spectroscopy in biological samples
2020, Nature ProtocolsTrusted Remote Function Interface
2019, 2019 IEEE 10th Annual Ubiquitous Computing, Electronics and Mobile Communication Conference, UEMCON 2019