Sunday, 4 June 2017

The Axiom Computer Algebra System

The Axiom computer algebra system can be downloaded in source or binary form across various platforms. A comprehensive online book is available.

The book starts with an introduction to Axiom, demonstrating its powers in both symbolic and numeric computation, and ends with a few Axiom programs to visualise functions in differential geometry.

What's cool about Axiom is it has its own programming language, which has regular data types you might expect such as lists and dictionaries, as well as algebraic types.  Having these algebraic types, allows you to define algorithms in their most general setting.

A great example would be the following:

R: Ring
power: (R, NonNegativeInteger): R -> R
power(x, n) == x ** n

Another interesting data structure permissible in Axiom is the infinite stream. Assume we have define the polynomial P(x) for all integers x in Axiom.

We can then declare the infinite stream of the derivatives of all such polynomials:

[D(p(i), x) for i in 1..]

The further elements in the stream are computed on demand (lazy evaluation).

Streams are used as an internal data structure for power series.

Monday, 29 May 2017

Neural Networks in Python

Neural nets can be programmed easily in Python using freely available APIs. Examples include Google TensorFlow and Microsoft CNTK (Cognitive Toolkit). Coding will still require knowledge of numpy.

Sunday, 8 May 2016

Topology for Top Thinkers (Particularly Pythonistas)

Topology is an important topic to understand for non-mathematicians as well as mathematicians. For example.

Pythonistas needing to program mathematics employing topological concepts can benefit enormously from understanding topology.  This might become increasingly important with applications of topology to physics and biological sciences.

It deals with properties of space unimpacted by continuous deformations e.g. stretching and bending.

Gottfried Leibniz was already thinking along the lines of a topological science as early as the 17th century with his "geometria situs" (Latin for geometry of place).

Today, there are many subfields of topology, including one intriguingly named differential topology, which deals with differential functions on differentiable manifolds.

Knot theory is another interesting aspect of topology is used to study the effect of certain enzymes on DNA.

A knot is an embedding of a circle in three dimensional Euclidean space. Note that the word "embedding" (also known as an "imbedding") has a very specific, technical meaning in mathematics.

Thursday, 7 April 2016

Basics of R - Including how to specify path names in R

If you don't know R, or are coming back at R after a long break, the following FAQ may be a good refresh.

Is R case-sensitive?

Yes, most certainly - R is case-sensitive. However, many functions are lower case.

Example of lower case functions include getwd() and setwd("putDirectoryNameHere").

Is R interpreted or compiled?

R is an interpreted language.

How do I create a data vector in R?

Creating a data vector is one of the most fundamental operations in R.  You do so using the c() function, and assignment operator.  For example, creating a data vector of the numbers 1, 2, 3, 4 and 5 can be done using:

myVector < – c( 1, 2, 3, 4, 5)

How do I calculate correlation given two data vectors a and b?

cor(a, b)

How do I import an R script into the current session?

Use the source function.  Example: source("myScript.R").

How  do I specify pathnames in R?

Use forward slash instead of backslash for path names. Backslash is used to specify escape characters.

Can I run R "unattended"?

Yes, there is a batch mode in R, using the arguments CMD BATCH.

Wednesday, 17 February 2016

MADlib - Big Data Machine Learning the Apache Way

MADlib is a machine learning library for data scientists. The MAD stands for "Magnetic, Agile and Deep". The concept is doing big data analytics in the database. Another key principle of MADlib is leverage of MPP share nothing architectures, first elucidated on by Michael Stonebraker at University of California, Berkeley. Joe Hellerstein at UCB is a big promoter of MADlib.

Sunday, 31 August 2014

Top Numerical Analysis Departments in the World

University of Cambridge Department of Applied Mathematics and Theoretical Physics (DAMTP)
University of Manchester Numerical Analysis and Scientific Computing
Imperial College Applied and Numerical Analysis Group
University of Chicago NAG
KTH Royal Institute of Technology Numerical Analysis Department (dating from 1962). Germund Dahlquist was a key figure in the Numerical Analysis department. The group is also closely associated with the High Performance Computing department. 

Useful Numerical Journals

There are various journals which may be of interest to the programmer experimenting with mathematics. Some noteworthy ones include:

Acta Numerica - "survey papers by leading researchers in numerical analysis and scientific computing". It is edited by Cambridge-based computational mathematician, Arieh Iserles.

SIAM Journal on Numerical Analysis - research on development and analysis of numerical methods

Numerische Mathematik - established in 1959

BIT Numerical Mathematics