තාරකාවක් කී කතාවක්

අඳුරලූ දිනෙක වට, නෑසු කන් ඇති ලොවක
තනිකමක් හැගි විටෙක 
විවර කර කවුලු පත්
මදෙස නෙත් යොමනු මැන

ඉමක් නැති විශ්වයේ නිමක් නැති තාරුකා
එක්ව මා එක්ක ඒ දිලෙන්නේ නුඹටමයි
නැගෙන තුරු හඳ යළිත්
නුඹට තනි රකින්නයි

සාදයේ සැණකෙලියෙ ඇස් නිලංකාර වන
එලිය යට හිඳින විට මිතුරු කැල වට කරන්
විවර කර කවුලු පත්
මදෙස නෙත් යොමනු මැන

දුරින් මං හිඳින්නම්
පණිවිඩය කියන්නම්
වඩා හොඳ හෙට දිනක් පතා නැගි පැතුම් මල්
දැරූ හිත් මග බලන ඒ උදා හිරු නුඹයි

Advertisements

The beauty of impermanence

Practising mindfulness (which is non-judgmental present moment awareness) helps us cope up with difficult situations.  This photo is from a mindfulness workshop that I attended to. In this workshop, participants were given a tiny leaf and asked to focus on it for a few minutes, giving it their full attention and feel what they notice, To acknowledge the fact that, a tiny seed grew up to be a tree and this leaf was there, hanging around freely, at times getting soaked by the rain, at times getting burnt by the sun and at times having a good time, feeling the cold breeze around, before a stranger took it away from the tree and now the tiny leaf rests in their palm.….

This experience taught me ‘impermanence’. The best thing about any experience we go through in our lives is the impermanence. May we feel good or bad, elated or depressed in a given situation, an inherent quality of that situation is that it changes.  I believe, depression has to be celebrated as much as the cheerfulness. I believe depression should be a moment to acknowledge that you belong, that you are human (and humans make mistakes),  that you care about yourself and others and above all, that moment of depression will not last, that depressing moment is impermanent. Let that acknowledgement makes you stronger and make yourself be an inspiration to the others, just as this tiny leaf is an inspiration to me.

 

leafonpalm

The Double Helix – An inspiring narrative on discovery of the structure of DNA

The Double Helix  – An inspiring narrative  on discovery of the structure of DNA

Double Helix, certainly kept me hooked.  Tucked among the books on theories on genomes, sequencing and molecule structures, I found this gem at the library, a narrative written by James D. Watson on the discovery of the structure of DNA for which he and his partners, Francis Crick and Maurice Wilkins were awarded the Nobel prize for Physiology or Medicine in 1962.

‘Most people realize that scientists have human failings like everyone else, that scandal and intrigue is often present in their world, but I think your book overemphasizes this..’ were the words of Wilkins disapproving the publication of the book. Both Wilkins and Francis have disapproved the publication of the book, the latter noting it as more of a collection of gossip less of the comprehensive story behind the discovery of double helix. However, later Francis himself has confessed that he being living in an ivory tower, was ignorant of interests of the general reader.

Among  the objections, Watson has proceeded to the publication of the book, (initially titled ‘honest Jim’ and later changed to) ‘The Double Helix’ (1968) and its edited version has been published in 2012, titled ‘The annotated and illustrated DOUBLE HELIX’, authored by James D. Watson and edited by Alexader Gann and Jan Witkowski.

In one of the letters from Watson to Francis, disregarding Francis’s claims against the publication of the book, Watson remarks ‘ I never intended to produce a technical volume aimed only and historians of science……….Someday perhaps you or Maurice, but if not some graduate student in search of a Ph.D will write a scholarly historical work’. I believe his former intentions were fruitful and the latter I am yet to figure out…..

Double helix definitely showcases the ability of Watson as a narrator. His writing has escaped from the conventional autobiography style and plots the story of the discovery in a thrilling manner. It definitely is an inspiration to a budding scientist and hints that the difficulties and misfortunes embedded in scientific research at times is not new and were certainly associated with one of the greatest discoveries of the 20th century as well.

විනි විදිමි ප්‍රේමය

බොහෝ කල් විය හිතවත
අදට අපගේ නෙතු ගැටී
නුඹේ වත සේයාවකී හද
බැදී ඇති බෝ දූවිලී
පිස දමන්නට මතක පවනින්
උවමනාවක් මට නැතී
නොවදිනු සේ අහලකටවත්
සිත් කවුලු අගුලන්නෙමි

එක්ව ගිය මග නැගුනු හසරැලි
ඇසී සියොතුන් පිබිදුනූ
නගන කසු කුසු ඔහෙ වුනාවේ
නෑසු සවනින් හැර යමී

රැදෙන්නට හෝ මිදෙන්නට ‍යැයි
කියන්නට ඉසිඹුව නොවී
එයින් වෙනසක් නොවන බැව් දත්
කල්හි ප්‍රේමය හැදිනෙමී

Cluster results visualisation in R with fviz_cluster

R comes as a handy tool for a data scientist. One package I found useful while working in R, is factoextra, a package for visualisation and extraction of results from multivariate data analysis including different dimensionality reduction techniques and clustering methods. The official documentation of factoextra is at http://www.sthda.com/english/rpkgs/factoextra/. It can be installed from CRAN using the command ,

install.packages("factoextra")

fviz_cluster function from factoextra is useful in clustering results visualisation. The function usage details are at http://www.sthda.com/english/rpkgs/factoextra/fviz_cluster.html

A quick example showing the clustering of Iris

#Load iris dataset
data("iris")
irisDataScaled<- scale(as.matrix(iris[, 1:4]))
kmeansClusters<- kmeans(irisDataScaled, 3, nstart = 25)

#Visualisation of resuls using fviz_cluster from factoextra
library("factoextra")
fviz_cluster(kmeansClusters, irisDataScaled, stand = FALSE, geom = "point")

The resulting figure would be

kmeanswithiris

The output from the fviz_cluster function is a ggplot. If you are to use fviz_cluster within a loop,  the output ggplot should be printed out explicitly as

for (i in 1:iterEnd){
.....
print(fviz_cluster(kmeansClusters, irisDataScaled, stand = FALSE, geom = "point")
......
}