Tuesday, November 4, 2014

غالب ندیم دوست سے آتی ہے بوےِ دوست
مسغول  حق ہوں بندگیِ بو تراب میں 

Tuesday, October 7, 2014

Ada jaffery

ہونٹوں پہ کبھی ان کے میرا نام ہی آئے
آئے تو سہی بر سرِ الزام ہی آئے

حیران ہیں، لب بستہ ہیں، دلگِیر ہیں غنچے
خوشبو کی زبانی تیرا پیغام ہی آئے

لمحاتِ مسرت ہیں تصوّر سے گریزاں
یاد آئے ہیں جب بھی غم و آلام ہی آئے

تاروں سے سجالیں گے رہِ شہرِ تمنا
مقدور نہیں صبح، چلو شام ہی آئے

کیا راہ بدلنے کا گِلہ ہم سفروں سے
جِس رہ سے چلے تیرے درو بام ہی آئے

تھک ہار کے بیٹھے ہیں سرِ کُوئے تمنا
کام آئے تو پھر جذبئہِ ناکام ہی آئے

باقی نہ رہے ساکھ، ادا, دشتِ جنوں کی
دل میں اگر اندیشئہِ انجام ہی آئے

Sunday, October 5, 2014

A poem by Shahzad Nayyer

ﺗﻮ ﺑﻨﺎ ﮐﮯ ﭘﮭﺮ ﺳﮯ ﺑﮕﺎﮌ ﺩﮮ ، ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﺭﮨﻮﮞ ﮐﻮ ﺯﮦ ﮔﺮ ﺗﺮﮮ ﺳﺎﻣﻨﮯ، ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﺗﺮﯼ ” ﭼﻮﺏِ ﭼﺎﮎ “ ﮐﯽ ﮔﺮﺩﺷﯿﮟ ﻣﺮﮮ ﺁﺏ ﻭﮔِﻞ ﻣﯿﮟ ﺍُﺗﺮ ﮔﺌﯿﮟ
ﻣﺮﮮ ﭘﺎﺅﮞ ﮈﻭﺭﯼ ﺳﮯ ﮐﺎﭦ ﮐﮯ ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﺗﺮﯼ ﺍُﻧﮕﻠﯿﺎﮞ ﻣﺮﮮ ﺟﺴﻢ ﻣﯿﮟ ﯾﻮﻧﮩﯽ ﻟﻤﺲ ﺑﻦ ﮐﮯ ﮔﮍﯼ ﺭﮨﯿﮟ
ﮐﻒِ ﮐﻮﺯﮦ ﮔﺮ ﻣﺮﯼ ﻣﺎﻥ ﻟﮯ ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﻣﺠﮭﮯ ﺭﮐﺘﺎ ﺩﯾﮑﮫ ﮐﮯ ﮐﺮﺏ ﻣﯿﮟ ﮐﮩﯿﮟ ﻭﮦ ﺑﮭﯽ ﺭﻗﺺ ﻧﮧ ﭼﮭﻮﮌ ﺩﮮ
ﮐﺴﯽ ﮔﺮﺩﺑﺎﺩ ﮐﮯ ﺳﺎﻣﻨﮯ، ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﺗﺮﺍ ﺯﻋﻢ ﻓﻦ ﺑﮭﯽ ﻋﺰﯾﺰ ﮨﮯ، ﺑﮍﮮ ﺷﻮﻕ ﺳﮯ ﺗُﻮ ﺳﻨﻮﺍﺭ ﻟﮯ
ﻣﺮﮮ ﭘﯿﭻ ﻭ ﺧﻢ ، ﻣﺮﮮ ﺯﺍﻭﯾﮯ ، ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﺗﺮﮮ "ﺳﻨﮓِ ﭼﺎﮎ " ﭘﮧ ﻧﺮﻡ ﮨﮯ ﻣﺮﯼ ﺧﺎﮎِ ﻧﻢ، ﺍِﺳﮯ ﭼُﮭﻮﺗﺎ ﺭﮦ
ﮐﺴﯽ ﺍﯾﮏ ﺷﮑﻞ ﻣﯿﮟ ﮈﮬﺎﻝ ﮐﮯ ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍُﺗﺎﺭﻧﺎ
ﻣﺠﮭﮯ ﮔﻮﻧﺪﮬﻨﮯ ﻣﯿﮟ ﺟﻮ ﮔُﻢ ﮨﻮﺋﮯ ﺗﺮﮮ ﮨﺎﺗﮫ، ﺍِﻥ ﮐﺎ ﺑﺪﻝ ﮐﮩﺎﮞ
ﮐﺒﮭﯽ ﺩﺳﺖِ ﻏﯿﺮ ﮐﮯ ﻭﺍﺳﻄﮯ ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍﺗﺎﺭﻧﺎ
ﺗﺮﺍ ﮔﯿﻼ ﮨﺎﺗﮫ ﺟﻮ ﮨﭧ ﮔﯿﺎ ﻣﺮﮮ ﺑﮭﯿﮕﮯ ﺑﮭﯿﮕﮯ ﻭﺟﻮﺩ ﺳﮯ
ﻣﺠﮭﮯ ﮈﮬﺎﻧﭗ ﻟﯿﻨﺎ ﮨﮯ ﺁﮒ ﻧﮯ، ﻣﺠﮭﮯ ﭼﺎﮎ ﺳﮯ ﻧﮧ ﺍﺗﺎﺭﻧﺎ

Thursday, October 2, 2014

Work and love

Work is love made visible.
And if you cannot work with love but only with distaste, it is better that you should leave your work and sit at the gate of the temple and take alms of those who work with joy.
For if you bake bread with indifference, you bake a bitter bread that feeds but half man's hunger.
And if you grudge the crushing of the grapes, your grudge distils a poison in the wine.
And if you sing though as angels, and love not the singing, you muffle man's ears to the voices of the day and the voices of the night.

(Khalil Gibran)

Saturday, September 27, 2014

Machine intelligence

The Turing test will classify something as intelligent if a human cannot distinguish between answers from that something and a human. This test is flawed because you can cheat and design a system aimed at getting it past this test without having any real intelligence. The Lovelace test on the other hand declares a machine intelligent if it can come up with an idea or solution in a domain in which it was not designed to work.
Original idea from here.

Some interesting suff I came across while surfing about this:
Self taught machine learning: ICML Paper , https://plus.google.com/u/0/+ResearchatGoogle/posts/EMyhnBetd2F, http://googleblog.blogspot.ca/2012/06/using-large-scale-brain-simulations-for.html
It learned to classify cats on its own.
Photoshopping images automatically

Daniel Kahneman's Thinking Fast & Slow

Dr. Kahneman is one of the two psychologists, the other being Pavlov, to have won the Nobel prize. I am currently reading his book "Thinking fast and slow". I was attracted to it by first listening to a talk by him at Google in which he makes the following interesting statements:
1. We have two modes of thinking: System-1 which is akin to intuition and is innate and stores highly skilled responses and System-2 which produces a more "reasoned" response. For example, applying the brakes is an instinctive reaction to seeing an unexpected object appear on the road while driving whereas solving the following riddle correctly requires a system-2 response: "A bat and a ball cost $1.10 and the bat costs $1 more than the ball. How much does the ball cost?". The immediate "system-1" response to this question is $0.10 which is incorrect. The correct answer is $0.05. It might be interesting to try out this idea to see what kinds of students succeed at, say a university or a job, based on there response to similar questions and then design a learning system and use it to identify and predict what our selection criteria should be.
2. Humans are great at making short predictions or predictions/decisions when the feedback is immediate or when the pattern is fairly regular. Intuition can be developed in such cases and experts in different fields are able to do it. It is hard to develop an intuition in other cases. Long term predictions or decisions in the absence of regularity are hard. In marginal cases with some predictability but poor, formulas can do better than humans, i.e., if there are weak cues formulas can do a better job than humans in making predictions. This point has implication for machine learning -- based on this I think that machine learning applications have a better chance to win against humans in such scenarios.
Some other examples are: Are you willing to pay $1 extra to have a gift shipped to you tomorrow rather than the 2nd business day?, or the marshmallow test: "you can have one marshmallow now or two if you wait 15 minutes!".
2. System-1 can be trained and system-2 can be educated. If you encounter icy road conditions then your system-1 response will, over time, become different from applying brakes. This is what is called "skill" or "experience".
3. Identifying the situation in which to resist system-1 and apply system-2 requires effort and can lead to good decisions.
4. Intuition can lead to errors. One of the ways in which intuition works is that when presented with a question, system-1 returns the answer to a related easier problem which may or may not be correct because its an answer to a related but not the same question. For example: when one is told that a person learned to read and write at the age of 4 and is asked to tell the GPA of that person in college. One way of answering it is to compute the probability of a person being able to read and write fluently at age 4 and map it onto the percentile of GPA scores to find the GPA. This example was given by Dr. Kahneman as an illustration of this case. I think that this is not a bad choice when you are given no other information. I even think that this is a rational choice.
5. Both systems can make errors. System-2 is not necessarily rational. It is also based on experiences and may not use all available information. Thus we can still make serious mistakes when we think a lot.
6. Cues we may be unaware of affect our decision making. For example: putting a poster of "watching eyes" over an honesty payment box in a tea room can change the decision of whether they deposit some money into the box or simply sneak out. Advertisement does the same thing. The best way to remain unaffected by such things and, consequently, make more reasoned choices is to stay away from such stuff. Scientific publishing can also be affected by similar biases unless serious precautions are taken. 

Friday, September 26, 2014

A poem I was able to write after a long pause. It describes a court room to settle a feud amongst words. The title of the poem is "A courtroom of words".
(منظرِ عدالتِ الفاظ)
عدالت بھری تھی لفظوں سے
جرم بھی
مجرم بھی
مدعا بھی
واقعہ بھی
معصوم اور
ملزوم بھی
قاتل اور
مقتول بھی
سچی باتیں
جھوٹے بول
سب پیش ہوئے
وکیل بڑھے
گواہوں سے
سوال ہوئے
کٹہرے میں
قانون کے
معانی کھلے
سزا تو جزا میں نہ بدل سکی لیکن
منصف نے یہ فیصلہ دیا
"!حرفِ گناہ بے گناہ ہے"