Haja Maideen M

Programming Random Bits

Page 2

Matlab/Octave to R

Analogous function and syntax of Matlab/Octave to R


Continue reading →

Predicting Gold Price - Experiment with machine learning algorithms

Machine Learning often applied to predict unknown values based on historical data available. Using simple ML models prediction become simple if right influencing features are chosen.

For example Gold prices are influenced by following factors,

  1. Gold Production
  2. Industrial / Consumer Demands (India and China play major role in consumer Jewellery demands)
  3. Economic/political situation in the world (Gold is often looked at stable investment options to offset outcome of other volatile financial investment options like stocks).

So historical values of following parameters are chosen as features to predict gold price

  1. World Gold Production in tonnes.
  2. Value of Dollar against major currencies.
  3. Crude Oil Rate
  4. DOW, Nasdaq, SP 500 historical data.

There are many Machine Learning models (algorithms) are available to choose from, but I used simple Linear Regression Model.

Continue reading →

How to represent Date Values in ML datasets

Many times we encounter data sets with date values as one of the feature to handle in machine learning problems (e-g historical data of share prices of a company over the period of time, with date as one feature).

One of the way to represent dates in ML datasets is converting it to equivalent numerical representation. I usually convert dates to unix timestamp value to handle better with numerical calculation in ML algorithms.

Excel have a easy way to convert cell value to unix time stamp. Excel stores dates internally as number of days since January 1, 1900.
In order to convert we can use the following formula


Continue reading →

Machine Learning 101

Completed Machine Learning course from Coursera

Continue reading →

Jan 2009: Enterprise IT Software: A Scam? Trap for companies…

When I was about to chose a degree, I was told that, computer science will become obsolete in few years once computerisation of all legacy manual systems are over, so i was advised to chose electronics.

When i look back, it was not the case. I made my career out of computers though I studied electronics, also I don’t think computer jobs are going to be obsolete in near future.

When working on any Enterprise projects, people do often get nervous about their job safety, what is going to happen after the project is over.

But the Software upgrades, support licenses renewals, new OS upgrades, Technology changes, new kind devices, keeps the the job relevant, as projects need to be rewritten, old systems need to EOLed for new technologies. The cycle continues and job safety guaranteed, and big software vendors survive in this cycle happily. It is a trap for enterprises, and scam for

Continue reading →


Ayappadi, a wonderful village surrounded by paddy fields and small Cauvery by river called ‘veera cholan’. Most of the people’s livelihood is paddy cultivation and its associated agriculture work, but in recent times as like any other Cauvery delta villages, agriculture become things of past. People started migrating to different parts of the world to make a living. Many people from this village live away from home, in alien countries, just to make money, leaving their spouses and kids back in the village. They spend most of their young age in other countries with out seeing their loved ones for many years.

I moved to this village at the age of 8 and lived there for 15 years. I still believe that, my friends at this village having great influence and impact on my life. My current thoughts are formed and shaped during my young ages at this village. If I look back, what ever me, my

Continue reading →

Sep 2007: XTreme Programming (Agile) – 101

  1. Light weight software development methodology for small to medium sized projects.
    No need to follow complex processes and filling tons of documents for anything, save the precious time the mighty programmers have and relieve them from pain of documentation and Bureaucracy.

  2. Work elbow-to-elbow with customer in all software development phases (Planning, developing, deploying).
    Review and receive feedback from customer all the time, customer need to be aware of the state of the application any given point of time.

  3. Release well tested software very frequently.
    Shorter release cycles (weekly/daily/monthly), follow test driven development, automate your testing and deployment.

  4. Follow Iterative software development cycles.
    Start with what ever information available, refine and rewrite as things become clear in an iterative way.

  5. Work very closely with the team, write code in pairs.
    Two person

Continue reading →

Sep 2007: Key Learnings – From Extreme Programming (Agile)

  • From my experience, don’t follow XP (Extreme Programming) methodology for bigger ERP kind of product development; follow this for smaller teams (~20 members) and 2 to 6 months project.
  • If the team is geographically dispersed, don’t even go near this methodology.
  • Have real customer, no proxy customer. Lack of proper requirement engineering leaves customer feedback only choice for validating the requirement to the implementation, so customer role is key to team success.
  • Don’t fake, pair programming. I observed many times one team member taking rest (or do something else) while other member coding, this defeat the purpose of getting quality output by pairing developers. Also pairing for non programming tasks (like server builds etc) not going to help, so avoid these.

Continue reading →

Duplicate Content Checking

I wrote this simple utility in C# to check any given document is already published anywhere in the internet or not. This application is needed for one of my friend, he runs a information portal site, and got many freelance writers for his website. The contents these freelancers write are in wide range of topics and very difficult for him to check whether the content is copied from any other website or not. He asked me help, and I wrote this simple application using Google SOAP api.

How this works:
This application work with assumption that Google crawled and stored content of all of the web in its index. The freelance writers send the content to my friend through email, and This application split the input document into many lines of texts and query the Google search index database using the search api (it is like searching a string in Google in a automated way) and check the given text

Continue reading →

Aug 2007: Who Is Carl Sagan?


He is my hero. Carl Sagan was an American astronomer (1934 – 1996), popularised astrophysics and astronomy to wider audience with his COSMOS television series and followed by serious of books related to astronomy, evolution. His crystal clear voice and poetic simple language mesmerised many people. He popularised science with his books and television programmes. I adore him a lot, he is my inspiration.

[Important events in his life]
1934: Born to Jewish parents, Brooklyn, New York.
1951: Graduated from Rahway High School in New Jersey.
1960: Doctorate in Astronomy and astrophysics.
1968: Worked in Harvard University.
1971: Director planetary studies, Cornell University.
1972: Associate Director Center for Radio Physics and Space Research, Cornell.
1972: Assembled the first physical message that was sent into space for NASA (He was adviser to NASA from his early days, one of the main

Continue reading →