Using machine learning to predict potential delays in acute stroke care

Historical data can help to improve present performance, and when such data is made available in real time, it becomes even more valuable.  However, detecting intricate patterns from data is tough for traditional statistical models.  Machine learning with neural networks, however, has shown remarkable results in such tasks – on structured as well as unstructured data.

With my recent foray into machine learning based on Prof Andrew Ng’s excellent courses ( &, and over 15 years data available from the acute stroke care program at Baby Memorial Hospital, the circumstances were ripe to attempt building a neural network – for predicting potential delays based on parameters recorded at the time of admission.

The full technical details of how this was designed and implemented are available at

The parameters that influenced treatment time were identified as the duration of symptoms (onset to arrival time), age, time of day and severity of stroke.  However, taken individually, the effects were very weak. Using these four parameters from over 200 patients, a 3-layered neural network implemented using the TensorFlow framework. After training, the network achieved an accuracy of ~ 60% in predicting delays.

This was then validated on an independent set of data.

The next step is showing a real-time notification: “Predicted DNT > 45 min!” (Door to Needle Time, stands for the time interval from hospital arrival to the initiation of clot-removal therapy) when a new patient from BMH with potential delay is entered in the MCare Acute Stroke app.

Machine learning powered delay prediction shown in the acute stroke pathway app

The accuracy of prediction should gradually go up, as the neural network is trained with more data.

In an emergency like stroke, every minute matters.

Machine learning AI trained on historical data has the potential to improve care by informing the team in advance about possible delays.

[Technical side note: Getting the neural network working on the Node.js app backend was done by implementing the forward part of the network, along with the trained parameters from TensorFlow, in Javascript.]


Jan 1st is a place!

The Earth, along with us, takes 365 days 6 hours 9 minutes and 10 seconds to complete one trip around the Sun. Our location on Jan 1st – the New Year’s Day – is opposite the constellation of Sagittarius (the Archer) in this celestial circle at present.

But.. why “at present”?

Because the position of Jan 1st recedes slightly each year. The reason is that the present ‘Gregorian’ calendar system reckons 1 year a little shorter at 365 days 5 hours 49 minutes and 12 seconds – around 20 min less than the actual orbital time (or the ‘Sidereal Year’).

This is done not arbitrarily, but for a very good reason: a gentle sweep or precession of the Earth’s rotational axis, which causes seasons to arrive slightly faster than they otherwise should each year by around 20min. This slightly shorter year is called the ‘Tropical Year’ in contrast to the ‘Sidereal Year’. The Tropical Year is, for all practical purposes, what we mean by one year.

This ‘axial precession’ or ‘precession of the equinoxes’, which takes around 26000 years for a full cycle, was known since antiquity – ancient Sanskrit astrological texts called it the ‘ayanamsa’.

So every year, on an average, we celebrate Jan 1st around 20 min earlier than the previous year, taking around 26000 years (365x24x60/20) to come back full circle.

In addition, there is the annual difference of ~5h:49m continually corrected by the leap year cycle that adds February 29th every 4th year – except on century years other than those divisible by 400.

This curious century year exception, known as the Gregorian reform, was added by Pope Gregory XIII in 1582 to correct the Julian calendar introduced by Julius Caesar in 45BC which only had leap years, and thus an average tropical year of 365 days and 6 hours: an error of ~11 minutes, which however lead to a cumulative error of 15 days by 1582! Because of this rule, 1700, 1800 & 1900 were not leap years, but 2000 was – being divisible by 400.

To summarise: Jan 1st does a regular 4-year hop around, with an occasional interruption of the forward leap in three out of four century years, while it gently recedes along the Earth’s orbit over a 26000 year period.

Jan 1st is a moving place!

Welcome once again to Jan 1st my co-travelers in this cosmic merry-go-round, and may our next round be a jolly good one 🙂

Happy New Year!

What is the role of the entrepreneur?

Humans evolved as multi-skilled hunter-gatherers who fend for themselves – born entrepreneurs!

However, an “entrepreneur” is now generally portrayed as a job creator – nothing wrong with that: but instead of making an army of drones, what if, by sharing opportunity and knowledge, a network of entrepreneurship is encouraged?

This is happening right now: distributed monetization platforms including app stores, blogging, video streaming, e-commerce & “sharing economy” (e.g., Airbnb) platforms are all leading a silent revolution where millions of people are taking back control of their livelihood doing what they love without the confines of a stereotyped job.

The pleasures of entrepreneurship are no longer esoteric! And little wonder the people behind these networks are often considered the ‘super-entrepreneurs’ of today.

Traditional business institutions also ought to consider evolving in this direction by allowing employees – and customers – to move beyond defined roles and encouraging creativity and initiative at all levels.

This will improve job satisfaction and the sense of meaning and fulfillment to those who have given up their true nature to be a part of the enterprise.

And finally, to answer the question, the true role of an entrepreneur is democratizing entrepreneurship.


… Two vast and trunkless legs of stone
Stand in the desert. . . . Near them, on the sand,
Half sunk a shattered visage lies

And on the pedestal, these words appear:

‘My name is Ozymandias, King of Kings;
Look on my Works, ye Mighty, and despair!’

Nothing beside remains. Round the decay
Of that colossal Wreck, boundless and bare
The lone and level sands stretch far away.

– Shelly

The meaninglessness of human achievement.. humbling yet emancipating. Our efforts may be insignificant, yet they are precious, as their transience is guaranteed in the cosmic scale of time.

​”It’s not about you” 

In the movie adoption of Marvel’s Dr Strange, at a time of conflict and crisis, a mystic guru reveals to the doctor: “It’s not about you”. 

It is portrayed as the moment of realisation when the egomaniacal hero comes to terms with the true nature and depth of his mission.

Comics and movies aside, this is a stirring concept: your life really is about the impact you have on other people. May be a handful, may be millions – whatever. 

In the end, your life is “not about you”.

8 new planets found in ‘Goldilocks zone’, NASA may find Earth’s ‘twin’ very soon

Dark Matter Space


(Click Image To download)

NASA is closer than ever to finding a twin for the Earth, astronomers said today, announcing the discovery of eight new planets that circle in the habitable zones of their stars.

Two of the eight are the most Earth-like of any known planets found so far outside our solar system, astronomers told the 225th meeting of the American Astronomical Society in Seattle, Washington.

The pair are likely to have hard, rocky surfaces in addition to being an orbiting distance from their stars that is neither too hot nor too cold for water and possibly life to exist, astronomers said. The discovery doubles the number of known planets that are close in size to the Earth and believed to be in the so-called “Goldilocks zone” of the stars they orbit.


Representational image. AFP

“We are now closer than we have ever been to finding a twin for…

View original post 179 more words

The 2 pm Plane

Imagine a plane flying constantly (solar powered, maybe) above the Earth, from East to West, with a velocity equal and opposite to the Earth’s rotation, taking 24 hours to complete one round trip.

twoppSuppose this flight starts today at 2pm.

Now, can we conclude that the position of the sun in the sky for those in the plane will be fixed and thus the time inside will always be 2pm, as long this flight is maintained?

The question is: What about the date? Will it change or will it just remain the same?

My take on it is, the concept of a day is no longer valid under these conditions, and therefore date becomes arbitrary and can no longer be measured by those inside the plane. It has to be communicated from outside – that is, from the surface. The same must hold true for any observer who leaves the Earth’s surface and its rotational frame of reference that gives us our hours and days!

Thoughts on Neuroscience, Technology and Spirituality