Machine Learning – Experience

I recently completed CS 7641 – Machine Learning as part of my OMSCS coursework. The course was really enjoyable and informative.

The course was taught by Professors Charles Isbell and Micheal Littman. Both are really awesome. Contrary to most other courses on the topic, they have managed to make the course content easy to understand and interesting, without losing out on any of its essences. All videos are structured as conversations between the Profs where one acts as the teacher and other as the student – very effective.

All the course videos are available publicly on Youtube – link. Also, I would recommend watching this funny Capella on ML based on Thriller by the Profs – link. 🙂

The course was a literature survey and general introduction into the various areas in ML. It was primarily divided into 3 modules:

  • Supervised learning – where we are given a dataset with labels (emails classified as spam or not). You try to predict the labels for future data based on what you’ve already seen or ‘learned’.
    • Techniques include Decision Trees, K-Nearest Neighbours, Support Vector Machines (SVM), Neural Networks etc
  • Unsupervised learning – all about finding patterns in unlabeled data. Eg: Group similar products together (clustering) based on customer interactions. This can be really helpful in recommendations etc.
    • Randomized Optimization, clustering, feature selection and transformation etc.
  • Reinforcement learning – the most exciting one (IMHO). This overlays many concepts we usually consider as part of Artificial Intelligence. RL is about incentivizing machines to learn various tasks (such as playing chess) by providing different rewards.
    • Markov Decision Processes, Game Theory etc.
    • I found the concepts in GT such as the Prisoners Dilemma, Nash Equilibrium etc. and how they tie into RL interesting.

All of these are very vast subjects in themselves. The assignments were designed in such a way that we got to work with all of these techniques at least to some extent. The languages and libraries that we use were left to our choice, though guidance and recommendations were provided. Through that, got the opportunity to work with Weka, scikit-learn and BURLAP.

Overall, enjoyed the course really well. Hoping to take courses like Reinforcement Learning (link) to learn more about the topics in upcoming semesters.

Google summer of code 2014 – Experience

This blog has been long pending. Infact, I took part in GSoC 2014 and GSoC 2015 application process has already started. But I’ll share my experience anyway.

I interned with Raxa. They are into building web and mobile applications to help small clinics and hospitals go online. Their applications are build on top of the OpenMRS platform. Raxa was fully open source earlier but have moved to a hybrid model presently. All the GSoC projects are open source and available through GitHub.

I started late in the application process. I didn’t have specific plans for applying to GSoC this time. The list of organizations had been announced and application deadline was pretty close. One fine day, I thought I’ll just glance over the organizations that have been accepted and see if there are any that meets my areas of expertise. Raxa was planning to enable patients without smart phones to access their medical services using phone calls via IVR (Interactive Voice Response) and via SMS. This required knowledge of an open source telephony server called Asterisk. I had spend a decent chunk of my third year working on a social initiative/startup called Dial Blood which was built on Asterisk. Much of my final year was spend working on Findauto which was an SMS based auto rickshaw booking startup. Hence it made a lot of sense for me to apply for this project.

My application emphasized on why I’m the right person to work on this project and contained a week-by-week systematic and clear breakdown of how I’ll go about completing the project. The key features I proposed to enable were:

  • Appointment scheduling via SMS or call
  • Calling/submitting queries to doctors

One feedback I got on my application was that there was scope for more to be done in three months. They wanted to make sure I was productivity engaged through out the three months with additional tasks to take up if I manage to finish these early. IVR can be at times seem complicated to the rural audience Raxa was primarily trying to appeal to. Hence instead of asking people to press digits (press 1 for English, 2 for Hindi..), I thought of using voice recognition and natural language processing to hear their response and act accordingly. The inclusion of this task made my application reasonably strong.

I applied only to Raxa and thankfully made it when the results came out. They had selected four interns – one girl from Srilanka, one IIT Delhi grad who had previously interned with them outside GSoC and another student who was pursuing his masters degree in computer science, apart from me. They all were working on really interesting projects which included mobile application development to machine learning. More details can be found here.

We also used to have weekly meetings with the whole Raxa team. Our progress was evaluated each week. I was assigned a mentor. I could reach out to him anytime for any assistance. My project was a continuation of last year’s GSoC project. I had some difficulty in the code ramp up because of limited documentation. Apart from that, Asterisk part went smoothly. For the voice recognition part, I was planning to use Google’s voice recognition APIs. But Google had deprecated the free version by then. Other popular alternatives like Spinx had limitations working with Asterisk because of some frequency mismatch issues. This was a blocker for me. My mentor helped me identify a NLP startup (Wit.AI) working in this domain. They had really powerful APIs available for free. I used those in my GSoC project and managed to implement the feature successfully.

Another main task that I did was research on what’s the best way to take the service into production. Various options including Amazon EC2, own servers and third party services were explored. I also contacted various telephony service providers to inquire about PRI lines and their pricing. We were not able to take the service into production because of some constraints Raxa had. But I was code complete and production ready by end of summer.

We had a final demo day where all 4 of us presented our projects. We all managed to complete GSoC successfully. It was a really good experience for me to work on such a big project end to end under strict time constraints. Not to mention the stipend and awesome goodies.. 🙂

My GSoC project code link – https://github.com/Raxa/voice/tree/master/Asterisk

Wiki link – https://raxaemr.atlassian.net/wiki/pages/viewpage.action?pageId=50724873

– Written using WordPress for Android

Where do I start (programming)?

One of the most common questions people new to programming face is “Where does one start?
The number of programming languages and platforms out there has made it slightly overwhelming for newcomers to get started. I’ll try to answer this question with my (relatively small) experience of over 6 years dabbling in various technologies. My answer would be slightly biased to a particular platform/language (as you will notice soon). Latest trends have seen Atwood’s Law become a reality.

It says that any application that can be written in JavaScriptwill eventually be written in JavaScript.

Everything got it’s Javascript equivalent including JS based servers such as Node.JS and MVC frameworks such as Sail.JS. The Javascript based MEAN (MongoDB, Express.JS, Angular.JS, Node.JS) stack is gaining popularity over WAMP/LAMP (Windows/Linux, Apache, MySQL, PHP/Python) stacks.

Over the last few years, the notion of app stores have caught up rapidly. Apart from the largest app stores from Apple (for iPhone) and Google (Android), almost all players such as Microsoft, Blackberry and Amazon have come up with their own app stores. We’ve also seen the inception of various new mobile platforms such as Ubuntu for Mobile, Firefox OS and Tizen (by the Linux community). They’ll have their own stores of course.
Now what does all these mean to a developer trying to commercialize a software product? You can’t simply develop for one major platform (read Windows desktops) and expect the money to flow in. That era is over. It would be a serious waste of development time to port your application to the native code for each of these platforms as well.
Web is THE only solution here. All platforms presently support Web apps natively i.e. we can run our web-based application on these OSes like native applications without the aid of any browser. The latest web standards like HTML5 specifically address such usage by facilitating direct access to various mobile hardware such as camera and GPS to web applications. In fact Firefox OS is specifically designed to support web apps.

The trends mentioned above must be apparent to anyone closely following the Tech industry. But I’ve seen many of my friends interested in learning programming sitting down with C/C++ only to lose interest soon afterwards and complaining how boring it is. A basic knowledge of these languages (from the 1980s) might be helpful in understanding the basic concepts of programming. But these are NOT a must have for a modern-day programmer. Nobody even uses these in the industry anymore (mostly). Similarly don’t think web development isn’t part of mainstream programming. Surprisingly a vast majority of people including computer science students have that incorrect notion. Most companies now predominantly work with web technologies. It’s our syllabus that has got it wrong.
If you are seriously interested in programming, here is what I suggest:

  • Learn basics of programming (C/C++, ideally don’t spend more that a few weeks)
  • Learn HTML and CSS => build static websites
  • Learn Javascript => build interactive websites
  • Learn a server-side language => build web applications (PHP, Python, JSP, ASP, Ruby Javascript etc)
  • Learn a server-side framework => build better and bigger web apps
  • Optionally learn mobile app development for a mobile platform (Java for Android, Objective C for iOS etc)
  • Optionally learn one industry standard core programming language like a Java or C# in-depth. This is esp. relevant for computer science students looking for jobs/internships.
  • Optionally learn to use a few CMSs ( Drupal, WordPress, Joomla etc.)

That’s it. You are good to go.
In the server-side, there are vast number of languages to choose from. If you choose to go with Javascript for server side as well, you get to avoid learning another language though you’ll be skipping over a major era in the evolution of web technologies.
There are various frameworks for most popular languages out there like Zend, CodeIgniter and Laravel for PHP,  Django for a Python, Ruby on Rails (ROR) for Ruby, Sail.JS for Javascript etc. Such frameworks take care of basic things needed by all web apps such as security so that developers can focus on their application logic.
You should choose a framework that suits the requirements of the product that you’re building.

My answer is mostly addressing students interested in learning programming for working on some idea that they have or for the fun of it. If you are a computer science student who’s looking to take your programming knowledge to the next level, I suggest you take a different path.
Hone your knowledge of various data structures (stacks, queries, linked lists) and algorithms (sorting, searching, recursion etc). I would recommend ‘Introduction to Algorithms‘ by Corman as a must-read and primary reference. In case of Kerala university, algorithm analysis and design is in S7. By the time you would have missed out on lot of good placement/internship/coding-competition opportunities.
So start as early as you can (atleast by early second year). Try to participate in monthly cookoffs at Codechef, do their practice questions, attempt problems in various websites like TopCoder, target and prepare for international coding competitions like ACM ICPC etc. Trying to attempt these one or two weeks before college placements isn’t going to get you the best results. Also sign up for some computer science oriented community like the IEEE Computer Society or ACM or Computer Society of India (CSI) to stay abreast of the latest developments in various domains and to stay connected to the industry.

I hope this will help students get a better idea on how to get started with programming.
The views expressed here are my personal opinion. Please feel free to share your suggestions in the comments. 🙂

My learnings from B-Tech Life

I recently had the opportunity to be awarded Mar Baselios Youth Excellence Award 2014. The award was given by the Honorable Minister of Home & Vigilance, Govt. of Kerala, Shri. Ramesh Chennithala.

Image

 

I had delivered a short speech on receiving the award. An extended version of the same was also given for publishing in the MBCET college magazine. My talk was mostly about the key lessons that I’ve learned in my relatively short life so far. The ideas I presented are nothing new but still I am surprised how few students actually live by these. Below I would like to share key excerpts from the speech. 


 

In this world, each one of us faces widely varied situations and circumstances. Not all of them might be directly beneficial for us. But all of these experiences help shape our perspectives. For a keen enough observer, there is a lot to be learned from his/her surroundings. I would like to share a few things I have picked up in my journey so far and have proven priceless to me.

The first and probably most important thing I have learned is about persistence. Former American President Calvin Coolidge has said

“Nothing in this world can take the place of persistence. Talent will not: nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not: the world is full of educated derelicts. Persistence and determination alone are omnipotent”.

If you work hard enough, things will simply fall in place.

Next is opportunity. In this world, there is always enough and more opportunity for those in the look out for it. Most of us fail to notice this. At times when opportunity presents itself in our face, we feel overwhelmed and shy away from it, thinking we are not good enough. Please don’t do that. Have faith in yourself and leverage your opportunities.

In developing countries like India, many burning problems like hunger, poverty and transportation are yet to be solved.  At the same time, we have access to the same level of knowledge that researchers in world class universities have, thanks to the Internet. These are all opportunities for engineers like us to step up and contribute.Vinod khosla of Sun Microsystems has said

“Freedom to fail is a key ingredient in success. Try and fail, but do not fail to try. Every disadvantage in India is an opportunity to do something big“.

We engineers have a moral obligation to contribute to our nation’s growth.

Another is optimism. Like Steve Jobs said

“the people who are crazy enough to think they can change the world are the ones who do”.

We have the freedom to take risks and make mistakes. We might fail. But we have nothing to lose. Be optimistic. The battle is not over until you give up. So up your stakes, take risks, make mistakes, chase your dreams and live your life to the fullest so that you’ll have no regrets looking back.


 

(extended version given for college magazine)

Now lets not get too superficial or distant. We are part of a system which involves classes, learning, exams, university etc. But one thing we should realize is that all systems are or were made by ordinary people like us. This lends them two attributes that we can take advantage of –

  • they are designed with the average audience in mind.
  • they are not fool-proof.

Most of us must have faced a dichotomy in our school days – either be the studious ‘teacher’s pet’ student or the so-called ‘cool’ back bench mischief maker. But in college that need not be the case – here you can have the cake and eat it too. The reality is that everyone studies mainly during the few days before the university exams. This leaves us enough and more time to focus and hone our skills and pursue other varied interests. It’s upto us to take advantage of this time and invest it in the right things. Make good friends, spend quality time with them and have fun.

At the same time find something that you are really passionate about – be it sports, art, coding or whatever and invest lot of quality time in excelling in it. In the book Outliers, author Malcolm Gladwell says that it takes roughly ten thousand hours of practice to achieve mastery in a field. Start now! Involve in various clubs in college such as IEEE, NSS, Entrepreneurship Development Cell, Drama club etc. Travel a lot. Meet and interact will a lot of different people. All these will help you grow as a person.

I would like to end my words with another famous quote by Steve Jobs –

“Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma – which is living with the results of other people’s thinking. Don’t let the noise of other’s opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”

 

LabX – Startup Village Internship takeaways

This post had been delayed for quite some time due to my exams. These are the key takeaways from my LabX – Startup Village internship – listed briefly.

  • Learned how market research and competitive analysis is performed

○ Identified tools used for the analysis.
○ Understood what to look for in the vast amount of available information.
○ Learnt to process and present the raw data as useful information.
○ Avoiding plagiarism, properly referencing and citing details etc.

  • Acquired basic working knowledge on a new domain life sciences

○ Got a high level overview of the drug development process, steps involved etc.
○ Got to appreciate the size of the drug development market in general and the cancer cure vertical in particular.
○ Developed more confidence in getting out of comfort zone and tackling unknown domains.

  • Was able to take part in a software development cycle OSUTEAM

○ Understood how custom softwares are build from a customer standpoint and a developer standpoint.
○ Understood how technically sound softwares may fail to meet end user expectations and how that can be resolved.
○ Was able to understand more about ontologies, semantic web (ResearchIQ, met Omkar Lele)

  •  Learned a lot of new perspectives and strategies on entrepreneurship 10Xelerator

○ Interacted with a lot of entrepreneurs who were passionate about their causes.
○ Got lot of guidance from entrepreneurs (mentors) who had been there, done that.
○ Learned a lot from hands on workshops on things like team building, storytelling, brand building, pitching etc.
○ Worked closely with a startup called Stockleap (10x participant), helped design the development strategy.
○ Had first hand experience of the entrepreneurship culture of the west.

  •  Takeaways outside the program

○ Met many interesting people from a diverse background

■ Stayed with and learned a lot from PhD. and Masters students in computer science (and other branches as well).
■ Interacted and took guidance from professors in computer science (Prof. Rajeev Ramnath, Prof. Arnab Nandi) as well as business (Prof. H. Unnava Rao).
■ Met a lot of MBA students from Fisher COB and learned about opportunities for future business studies.
■ Met people who have led social entrepreneurship initiatives (like Farooq Busari from ShakePoverty), people who guide social innovators (like Patrick Westerlund from Tony Wells Foundation) and took guidance for implementing DialBlood.
■ Met IP coordinator Jennifer Warner, Technology Commercialisation & Knowledge Transfer Office and learned about market potential for a patent related software product.

○ Attended a lot of technical and startup meetups

■ Including Startup saturdays, Wakeup Startup, weekly Python Dojos, MongoDB meetup, Ohio Linux Fest, AngularJS meetup, Columbus CodeJam etc.

○ Saw a lot of beautiful places within Columbus and outside (Boston, Las Vegas) as well.
○ Worked on a project called Intopia Simulation for use by an MBA program.
○ Read startup books like The Lean Startup, The Art of the Start etc.

Pdf – LabX Internship Takeaways

10X Accelerator

I’d been lucky enough to take part in the 10X accelerator during my internship with Fisher college.

10x accelerator program was started by the TEC Institute few years back and presently accelerating it’s fourth batch. Its presently being operated by Founders Factory. Ten startups are given 10 weeks of high profile mentorship, office space and 20k$ each. 10x focuses on early stage startups & even accept ones in their ideation phase.
First of all, an accelerator is any platform which helps startups get their product to market faster and thus make money faster. Various startups require various types of assistance to get to this objective.  So from a startup perspective, it’s not just important to get into any accelerator but getting into the one that’s right for them could make all the difference.
I got the opportunity to attend one of their initial key operational meetings where they selected the top 10 startups to accelerate from the top 25. This was very valuable for me as I got to know the key criteria for getting into an accelerator. Some of these include:

  • The entrepreneurs themselves. A successful startup requires a wholesome team including a hustler, a pro developer, a marketing guy etc. There are also cases of founders managing multiple of these roles by themselves.
  • The match between mentors available and the startup requirements is really important.
  • Whether the startup can be considerably accelerated during the acceleration period. (Some startups with really great ideas didn’t get through because 10 weeks were too short for meaningful acceleration).

Each week of 10x has a theme to it. All activities, talks, meetings etc are based on a that theme. Some of the themes include:

  • Lean Product Week
  • Story Telling Week
  • Branding UX Week
  • Technical Development Week
  • Sales Strategy Week
  • Leadership and Team Building Week
  • Capital Access Planning Week

I got the opportunity to attend talks and interact with very interesting people during my time there. Various successful entrepreneurs who had been through the pains of setting up their own business shared their insights – a wide range of perspectives were shared on a daily basis.

One of the best sessions I attended was that Mike Blackwell, an experienced entrepreneur and lean advocate. His opinions were rooted in reality. The first thing he said was that he doesn’t care about our idea. Nor are his opinions/feedback about our ideas going to be of any use for us. The point here being that only the actual target audience will be able to validate a new startup idea. No use running it through a thousand others for feedback. Another key insight was regarding the lean methodology which has gained immense popularity lately. Mike said that blindly adopting that too is a bad idea. The main idea of the lean methodology is to iterate through a Build-Measure-Learn(BML) cycle where you build often, release often, make or break, learn from the same and improve. Eric Ries, who wrote ‘The Lean Startup‘ book had setup his startup in the valley where money was abundant. His startup had a burn rate of more that 50k per month. Such a startup can afford to throw hours and hours of developer time into new features which may or may not appeal to customers. According to Mike, we can filter out may of the conceived features even before passing through the BML cycle. This advice is especially valuable to companies which are not as lucky as the ones in the valley. In fact I personally feel that such an approach is extremely lacking most Indian startups. First thing people do on getting an idea is to spend the next few months developing their dream product which in the end most often turn out to be something nobody wants. All this burns away the initial investment and delays the time to market. Validation of the idea is the key!

One of the most valuable takeaway from 10x was the opportunity to closely interact with the founders of the 10 startups in this year’s program. There are teams from various parts of the world including Australia and Israel, from different backgrounds and age groups. Each of them still continues to motivate me – extremely passionate about their idea, highly self motivated & focused. Day in and day out, they are working very hard to bring their dreams to reality. The fact that they are also normal people like us but with the exception of extra ordinary will power struck me. My only regret is that I couldn’t take part in the entire program. It’s nearing it’s completion with the Demo day fast approaching on Nov 15th. A large number of VCs and angel investors will be attending that day. Paul Singh, of 500 Startups fame is the Keynote speaker. I’m pretty excited about the event and wish the very best for all 10 startups.

DialBlood

Now we are onto something.. something BIG, hopefully. Our bloodbank database management project has managed to attract some initial stage angel funding. We have launched our phase 1 beta version at DialBlood. We have been provided with SMS packs and a Asterisk pre-configured server to create our first working prototype. 

Presently working on configuring the same. We have been given access to the remote server via SSL. This offers some interesting yet initially difficult challenges. Learning to use the CLI (Command Line Interface) of the various tools involved. Learning call file generation and Asterisk Manager Interface coding using phpagi-agmanager library.

Hope to get the system in place within the next 2 weeks.

In the meanwhile, interested people can check out a softphone demonstration of our initial sytem (present one slightly modified) here: