Wednesday, 9 July 2025

Revisiting Map Reduce

Map reduce is very prevalent in distributed data processing. 

It's an idea from functional programming. The basic idea is you have a map function that can apply a filter to a list,  and then apply a summary operation, which is the reduce.

A Mickey Mouse example to bring this to life could be - you have list of fishing vessels, you want to filter for foreign flags, and then you want to add them all up, and you want to do this every 6 hours and create a time series database of this data.

A popular open source implementation is Apache Hadoop.

Thursday, 3 July 2025

The Autoregressive Nature of LLM Operations

LLMs are AUTOREGRESSIVE generative models.

An autoregression is a regression of a variable against its own lagged values.

For example, an AR(1) predicts the current value based on the immediately preceding value, AR(n) uses the n most recent values.  

One remarkable feature of these models is in-context learning, which has been hypothesised as being Bayesian in nature.

The Python Datasets library

Hugging Face has a Python datasets library which has natural language training data sets amongst others.

Tuesday, 11 March 2025

Designing an Experiment - Single and Double Blind Trials

Single-blind and double-blind trials relate to how experiments are set up.

  • Double-blind - where neither subjects nor experimenters know who is in TEST or CONTROL group
  • Single-blind - only the subjects (e.g.. patients in a medical study) know which group they are in
This is about experimental research methods rather than mathematical experimental design (hence it does not lend itself well of the bat to Python automation).

The idea is to prevent bias/personal beliefs from influencing the results of the experiment/clinical trial. Both setups should remove the so-called placebo effect.

Tuesday, 4 March 2025

Coding with Bilinear Maps

When Pycryptonistas advance beyond the familiar realm of linear algebra to the new realm of multilinear algebra there are terms that must be mastered post haste to make sense of the new environs.

Amongst these terms is the term bilinear map a simple sounding term but oddly not widely socialised even among linear algebra aficionados.

A bilinear map is a function that combines elements of two vector spaces to yield an element of a third vector space, and is linear in each of its arguments. Matrix multiplication is an example.

To be confident in bilinear maps you should be able to product multiple examples of bilinear maps from basic mathematics.

Saturday, 6 August 2022

Surjective or Non Surjective - That is the Question (to the Homomorphism)

Augment the definitions of surjection and homomorphism.

However, before we do so, we must clearly state: a surjection operates on a set, and maps elements of said set, to elements of another set.  It is a relation between sets. A homomorphism too is a relation on sets. However those sets are part of binary structures with associated binary operations. We can call those special sets bicombinable sets.

A  SUR-jection is an "onto" mapping. 

The SUR-jection or SUR-jective function maps elements of a set "onto" the entirety/totality of elements in a set B (every B is included). The elements of the set B are "fully recruited"/"fully engaged"/"fully employed" in the action of the surjection on set A. A SUR-jection is thus also an "enveloping function", in its action of "enveloping" all elements of the target set/codomain.

Other names for a SUR-jection include "all you can eat" function, or "codomain covering function".

A homomorphism is a function that maps a "binary combo" (or "bicombo") of elements in the "domain", to the "binary combo" ("bimcombo") of the mapped or modified ("homomorphism-applied") elements in the range ("homomorphed elements").

A homomorphism acts on binary structures, not necessarily groups.

If this homomorphism captures the entirety of the range-set, it is surjective. 

A little bit of thought will assure the PyCryptonista that surjectivity in homomorphisms is quite a desirable property.

And so begins the tale of what to call a surjective homomorphism. Remember a homomorphism is just a function with a special property which only makes sense on bi-combinable sets.

In a way the homomorphism function is just a tool to express a relation between the binary operators in two bi-combinable sets.



Friday, 24 September 2021

Cauchy's Kingship of Complex Function Theory

Baron Cauchy is oft celebrated as the developer extraordinaire of complex function theory.  

The first influential theorem he proved was Cauchy's integral theorem, also known as the Cauchy-Goursat Theorem (CGT).

(Goursat, though lesser known than Augustin-Louis Cauchy, was also an extraordinary mathematician where mathematical analysis was concerned, born in the Occitanie region in France)

The CGT is an important statement about integrals for holomorphic functions ("specially differentiable") in the complex plane.

A holomorphic function is a complex valued function, that may have one or more complex variable arguments, which is broadly speaking "complex differentiable". The notion of complex differentiability in this context has a specific interpretation.