Dr Administrator

Author's posts

Book review: A New History of Life by Peter D. Ward and Joe Kirschvink

A new history of life

This next book is a Christmas present, A New History of Life by Peter D. Ward and Joe Kirschvink.

The theme of the book is the evolution of life from the very early periods of life on earth with a particular emphasis on that which has been discovered over the last 20 or so years, they cite Life: A Natural History of the First Four Billion Years of Life on Earth by Richard Fortey as the last comparable work.

A New History follows a long thread of books I’ve read, some I’ve reviewed here such as Neil Shubin’s Your Inner Fish, others in the prehistory of my blogging such as Stephen Jay Gould’s Wonderful Life: the Burgess Shale and the Nature of History. I’ve also written about First Life, a program narrated by David Attenborough on the earliest life.

It turns out quite a lot has happened in the last 20 or so years, radio-dating has improved in sensitivity allowing us to probe the early years of life on earth in more detail, new fossil fields have opened up in China, the chemistry of the early earth is better understood, early “Snowball Earth” episodes have been identified, and the discovery of exoplanets has led to more interest in the very earliest stages of life. Indeed, Tiktaalik at the core of Shubin’s Your Inner Fish, one of the first vertebrates to walk on the land, was discovered this century.

I always feel a little cautious approaching popular books such as this, promising great and revolutionary things, the risk is they present a minority view unsupported by other experts in the field and as an outsider you would be completely unaware of this. Thankfully, this isn’t the case here, Ward and Kirschvink are experts in early life but they are explicit where they own theories come into play and present alternative viewpoints in a fairly balanced way.

Half of the book covers the earliest life on earth up to the Cambrian Explosion 600-500 million years ago, when a huge diversity of life suddenly appeared. It seems here that the greatest new research activity has taken place. This includes work on ancient atmospheric composition: the relative amounts of carbon dioxide and oxygen; the “Snowball Earth” periods of complete glaciation where there was only liquid water at the surface due to volcanic activity; the chemistry of early life and the precursors to the Cambrian Explosion such as the Ediacaran fauna and other life such as Grypania and arcritarchs of which I had not heard. Vernanimalcula is also mentioned as the first bilateral animal, a microscopic fossil found in rocks 600 million years old. Although I see from wikipedia that this attribution is disputed.

The origins of life have the air of the physicist’s dark matter, their must be something there but we have little direct evidence for what it is and so it is ripe for a wide range of hypotheses. The big problem is the formation of RNA and DNA, experiments have long show that the basic building blocks of life can form in plausible early conditions stimulated by heat and lightning. But DNA and RNA are large, complex molecules, and not particularly heat stable.  One of the authors (Kirschvink) is keen on a Martian genesis for these molecules, then transported by asteroid to earth. I’ve always found these extra-terrestrial origins proposals unlikely.

A New History highlights the dispute between Stephen Jay Gould and Simon Conway Morris over the Burgess Shale. Gould was a proponent of the idea that the Burgess Shale assemblage represented a massive diversification of forms which of which many are now extinct, whilst Morris sees the forms as precursors to modern forms.

Following on from the earliest times the rest of the book is a story of successive mass extinctions followed by diversifications. Aside from the K-T extinction 65 million or so years ago, caused largely by a massive asteroid impact, extinction events were caused by changes in atmospheric chemistry. Typically this involved high levels of carbon dioxide leading to global warming and lower levels of oxygen. These changes in atmospheric chemistry were driven by large scale geology and life. Other than microbes, life struggles to survive when oxygen levels are much below the 21 percent we currently enjoy, conversely when oxygen levels are high large animals can evolve. The dinosaurs prevailed because they could survey at relatively low oxygen levels, and then became giants when oxygen levels rose above current levels.

I was amused to discover that reptiles and amphibians can’t run and breathe effectively at the same time, their splayed gait compresses the ribcage inconveniently. Creatures such as the dinosaurs resolved this problem by moving the legs beneath the body, our bipedal stance is even better since breathing and running can work entirely independently.

The book starts a little bombastically with comments on how boring history is perceived to be and how new and revolutionary this book is but once it settles into its stride its rather readable.

Book review: Artificial intelligence for Humans: Volume 3 Deep Learning and Neural Networks by Jeff Heaton

heaton-vol3Deep learning and neural networks are receiving more attention these days, you may have seen the nightmarish images generated using this technology by Google Research. I picked up Artificial Intelligence for Humans: Volume 3 Deep Learning and Neural Networks by Jeff Heaton to find out more since the topic fits in with my interests in data science and machine learning. There doesn’t seem to be much in the way of accessible, book length treatments of this relatively new topic. Most other offerings on Amazon have publication dates in the future.

It turns out that Artificial Intelligence for Humans is the result of a Kickstarter campaign, so far the author has funded three volumes on artificial intelligence by this route: two of them for around $18,000 and on for around $10,000. I paid £16 for the physical book which seems like a reasonable price. I think it is a pretty well polished product, it doesn’t quite reach the editing and production levels of a publisher like O’Reilly but it is at least as good as other technical publishers. The accompanying code examples and web site are really nicely done.

Neural networks have been around for a long time, since the 1940s, and see period outbreaks of interest and enthusiasm. They are modelled, loosely on the workings of biological brains with “neurons” connected together with linkages of different weights which can be trained to perform tasks such as image recognition, classification and regression. The “neurons” are grouped into layers with an input layer, where data enters, feeding into potentially multiple successive “hidden” layers finally leading to an output layer of neurons where results are read off. The output of a neuron is calculated by summing its inputs multiplied by the weights of the inputs and feeding the result through an “activation function”. The training process is used to optimise the weights, and may also evolve the structure of the network.

I remember playing with neural networks in the 1980s, typing a programme into my Amstrad CPC464 from a magazine which recognised handwritten digits, funnily enough this is still the go to demonstration of neural networks! In the past neural networks have not gained traction because of the computational demands of training. This problem appears to have been solved with new algorithms and GPU-based computation. A second innovation is the introduction of techniques to evolve the structure of neural networks to do “deep learning”.

Much of what is presented is familiar to me from my reading on machine learning (supervised and unsupervised learning, regression and classification), image analysis (convolution filters), and old-fashioned optimisation (stochastic gradient descent, Levenberg-Marquardt, genetic algorithms and stimulated annealing). It does lead me to wonder sometimes whether there is nothing new under the sun and that many of these techniques are simply different fields of investigation re-casting the same methods in their own language. For example, the LeNET-5 networks used in image analysis contain convolution layers which act exactly like convolution filters in normal image analysis, the max pool layers have the effect of downscaling the image. The combination of these one would anticipate to give the same effect as multi-scale image processing techniques.

The book provides a good summary on the fundamentals of neural networks, how they are built and trained, what different variants are called and then goes on to talk in more detail about the new stuff in deep learning. It turns out the label “deep” is applied to neural networks with more than two layers, which isn’t a particularly high bar. It isn’t clear whether this is two layers including the input and output layers or two layers of hidden neurons. I suspect it is the latter. These “deep” networks are typically generated automatically.

As the author highlights, with the proliferation of easy to use machine learning and neural network libraries the problem is no longer the core algorithm rather it is the selection of the right model for your particular problem and optimising the learning and evaluation strategy. As a Pythonista it looks like the way to go is to use the NoLearn and Lasagna libraries. A measure of this book is that when I go to look at the documentation for these projects the titles at least make sense.

The author finishes off with a description of his experience with doing a Kaggle challenge. I’ve done this, it’s a great way of getting some experience in machine learning techniques on nearly real problems. I thought the coverage was a bit brief but it highlighted how neural networks are used in combination with other techniques.

This isn’t an in depth book, but it introduces all the useful vocabulary and the appropriate libraries to start work in this area. And as a result I’m off to try t-SNE on a problem I’m working on, and then maybe try some analysis using the Lasagna library.

Book Review: The Honourable Company by John Keay

thehonourablecompanyI’ve been reading a lot of books about naturalists who have been on great expeditions: Alexander von Humboldt, Charles Darwin, Joseph Banks and the like. This book, The Honourable Company by John Keay, is a bit of a diversion into great expeditions for commercial purposes. Such expeditions form the context, and “infrastructure” in which scientific expeditions take place. The book is a history of the English East India Company, founded in the early 17th century with a charter from the English sovereign to conduct trade in the Far East (China, Japan, Java) and India.

It is somewhat chastening to realise the merchants had been exploring the world for one hundred years (and the Spanish and Portuguese for nearer 200 years) before the scientific missions really got going in the 18th century.

The book is divided into four parts each covering periods of between 40 and 80 years, within each part there is a further subdivision into geographical areas: the East India Company had interests at one time or another from Java, Japan and China in the Far East to Calcutta, Bombay and Surat in India to Mocha in the Middle East.

The East India Company was chartered in 1600, following the pattern of the (slightly) earlier Muscovy and Levant Companies which sought a North West passage to the Far East and trade with Turkey respectively. At the time the Spanish and Portuguese were dominating long distant trade routes. The Dutch East India Company was formed shortly after the English, and would go on to be rather more successful. The Company offered investors the opportunity to combine together to fund a ship on a commercial journey. The British Crown gave the Company exclusive rights to arrange such trade expeditions.

Initially the aim was to bring back lucrative spices from the Far East, in practice the trade shifted to India initially and in its later years, to China and the import of tea. The Dutch were more military assertive in the Far East where spices like nutmeg and pepper were sourced.

Once again I’m struck by the amount of death involved in long distance expeditions. It seems western Europeans had been projecting themselves across the oceans with 50% mortality rates from sometime in the early 16th century to the end of the 18th century. For the East India company, many of their factors – the local representatives – were to die in their placements of tropical diseases.

In the early years investors bought into individual expeditions with successive expeditions effectively competing with each other for trade, this was unproductive and subsequently investment was in the Company as a whole. Although it is worth noting that even in the later years of the Company in India the different outposts in Madras, Bombay and so forth were not averse to acting independently and even in opposition to each others will, if not interests. Alongside the Company’s official trade the employee’s engaged in a great deal of unofficial activity for their own profit, this was known as the “country trade”.

The East India Company’s activities in India led to the British colonisation of the country. For a long time the Company made a fairly good effort at not being an invading force, basically seeing it as being bad for trade. This changed during the first half of the 18th century where the Company became increasingly drawn into military action and political intrigue either with local leaders against third parties or in proxy battles with other European powers with which the home country was at war. Ultimately this lead to the decline of the Company since the British Government saw them acting increasingly as a colonial power and saw this as their purview. This was enacted in law through the Regulating Act in 1773 and East India Company Act of 1784 which introduced a Board of Control overseeing the Company’s activities in India.

Keay is very much focussed on the activities of the Company, the records it kept and previous histories, so it is a little difficult to discern what the locals would have made of the Company. He comments that there has been a tendency to draw a continuous thread from the early trading activities of the Company to British India in the mid-19th century and onwards but seems to feel these links are over-emphasised.

India is the main focus of the book despite the importance of China, tea and the opium trade in the later years which is covered only briefly in the last few pages. I must admit I found the array of places and characters a bit overwhelming at times, not helped by my slightly vague sense of Indian geography. Its certainly a fascinating subject and it was nice to step outside my normal reading.    

Book review: Pro Git by Scott Chacon and Ben Straub

progitPro Git by Scott Chacon and Ben Straub is available to download for free, or to read online at the website but you can buy a paper copy if you prefer. I downloaded an read it on my tablet. Pro Git is the bible of all things relating to git, the distributed version control system. This is an application to record the history of changes to your computer code, or any other plain test file. Such applications are essential if you are a software company producing code commercially, or if you are collaborating on an open source project. They are also useful, if you use code in analysis or modelling, as I do.

Git is most famous as the creation of Linus Torvalds in support of the development of the Linux operating system. For developers version control is a fundamental activity which crosses all boundaries of domain and language. Git is one of the more recent examples in a line of version control systems, my former colleague Francis Irving wrote very nicely about this subject.

My adventures with source control extend over 20 years although it is fair to say that I didn’t really use them in anger until I worked at ScraperWiki. There my usage moved from being a safety line for work that only really impacted me, to a collaborative tool. I picked up my usage of git through pairing with other people, and through explicitly stated conventions for using git in a developing team. Essentially one of the other developers told us off if he thought our commit messages were not up to scratch! This is a good thing. This culturally determined use of git is important in collaborative environments.

My interest in git has recently been re-awoken for a couple of reasons: my new job means I’m doing a lot of coding, and I discovered GitKraken which is a blingy new git client. I’ve not used a graphical git client before but GitKraken is very pretty and the GUI invites you to discover more git functionality. Sadly it doesn’t work on my work PC, and once it leaves beta I have no idea what the price might be.

Pro Git starts with an introduction to git and the basics of getting up and running. It then goes on to describe how to use git in collaborative environments, how to use git with GitHub and then more advanced topics such as how to write hooks, and use git as a client to Subversion (an earlier source control system). Coverage feels pretty complete to me, it’s true that you might resort to Stackoverflow to answer some questions but that’s universally true in coding.

The book finishes with a chapter on git internals, what is going on under the hood as you issue commands. Git has a famous division between “porcelain” and “plumbing” commands. Plumbing is what really get things done, low level commands with somewhat opaque meaning whilst porcelain is the stuff you use day to day. The internals chapter starts by showing how the plumbing works by reproducing the effects of some of the porcelain commands. This is surprisingly informative, and built my confidence a bit – I always have some worry that I will lose something irrevocably by issuing the wrong command in git. These dangers exist but Pro Git is clear where they lie.

Here are a couple of things I’ve already started using on reading this book:

git log –since=1.week

– filter the log to just show the commits made in the last week, other time options are available. Invaluable for weekly reporting!

git describe

– make a human readable (sort of) build number based on the most recent tag and how far you are along from it.

And there are some things I used to wonder about. First of all I should consider commits as a tree structure, with branches pointers to particular commits. In this context HEAD^ refers to the parent commit of the current HEAD, or latest commit. HEAD~2 refers to the grandparent of the current commit, and so on. I now have some appreciation of soft, mixed and hard resets. Hard is bad, it could lose your work!

I now know why git filter-branch was spoken of in hushed tones in the ScraperWiki office, basically because it allows you to systematically rewrite the history of a repository which is sort of really wrong in source control.

Pro Git is good in outlining not only what you can do but also what you should do. For example, one has the choice with git to merge different branches or to carry out a rebase. I’d always been a bit vague on the difference between these two things but Pro Git explains clearly, and also tells you when you shouldn’t use rebase (when other people have seen the commits you are rebasing).

My electronic edition on Kindle does suffer from the occasional glitch with some paragraphs appearing twice but the writing is clear and natural. Pro Git can’t be beaten for the price and it is probably worth the  £32 Amazon charge for a paper copy.

Book review: A History of the 20th Century in 100 Maps by Tim Bryars an Tom Harper

100mapsA History of the 20th Century in 100 Maps by Tim Bryars and Tom Harper is similar in spirit to The Information Capital by James Cheshire and Oliver Uberti: a coffee table book pairing largely geographic visualisations with relatively brief text. Looking back I see that The Information Capital was a birthday present from Mrs SomeBeans, 100 Maps was a Christmas present from the same!

The book is published by the British Library. The maps are wide ranging in scale, scope and origin. Ordnance Survey maps of the trenches around the Battle of the Somme nestle against tourist maps of the Yorkshire coast, and tourist maps of Second World War Paris for the Nazi occupiers. The military maps are based on the detailed work by organisations like the Ordnance Survey whilst other maps are cartoons of varying degrees of refinement, “crude” being particularly relevant in the case of he Viz map of Europe!

War and tourism are recurring themes of the book. In war maps are used to plan a battle, conduct a post mortem and as propaganda. It is not uncommon to see newspaper cartoon style maps with countries represented by animals, or breeds of dog. In tourism maps are used as marketing – the presentation and “incidental” details at least as important as the navigation. Sometimes the “tourism” relates to state events. Not quite fitting into either war or tourism is the crudest map in the book, a sketch of Antarctica on the back of a menu card, made by Shackleton as he tried to persuade his neighbour at a formal dinner to help fund his expedition.

A third category is the economic map showing, for example the distribution of new factories around the UK in the post-war period or the exploitation of oil in the Caribbean or the North Sea. This maps were published sometimes for education, and sometimes as part of a prospectus for investment or a tool of persuasion.   

The focus of the book is really on the history of Britain rather than maps, this is a useful bait-and-switch for people like me who are ardent followers of maps but not so much of history. It struck me the impact that the two world wars of the 20th century had on UK. Not simply the effect of war itself but the rise of women in the workforce, and independence movements in the now former colonies, homes for heroes, nationalisation – the list goes on. It seems the appetite for all these things was generated during the First World War but they were not satisfied until after the Second. The First World War also saw the introduction of prohibitions on opium and cocaine, prior to this they were seen as the safe recreation of the upper middle classes during the war they were seen as a risk to the war effort. America had lead the way with the prohibition of drugs, and later alcohol, seeing them as a vice of immigrants and working classes.

I didn’t realise there were no controls on immigration to the UK until the 1905 Alien Act, this nugget is found in a commentary on a map entitled “Jewish East London”. This map was based on Charles Booth’s social maps of London and published by the Toybnee Trust. The Jewish population had been increasing over the preceding 25 years following pogroms and anti-Semitic violence in the Russian Empire. The Trust published the map alongside articles for and against immigration controls but, as the authors point out, the map is designed with its use of colouring and legends to make the case against.

100 maps is not all about the real world, E.H. Shepard’s map of the Hundred Acre Wood makes it in, as well Tolkien’s map of Middle Earth. In both cases the map provides an overview of the story inside. I rather like the map of Hundred Acre Wood map with “Eeyores Gloomy Place – rather boggy and sad”, and a compass rose which spells out P-O-O-H.

The book is well-made and presented but in these times of zoomable online maps physical media struggle to keep up. The maps are difficult to study in detail at the A4 size in which they are presented. 100 maps makes some comment on the technical evolution of maps, not so much in the collection of data, but in the printing and presentation process. It is only in the final decades of the century that full colour printed maps become commonplace. It is around 1990 that the Ordnance Survey becomes fully digital in its data collection.

All in all a fine present – thank you Mrs SomeBeans!