Friday, August 15, 2014

Antonio Gulli Adaboost

Adaboost is one of my favorite Machine Learning algorithm. The idea is quite intriguing: You start from a set of weak classifiers and learn how to linearly combine them so that the error is reduced. The result is a strong classifier built by boosting the weak classifiers.

Mathematically, given a set of labels y_i = { +1, -1 } and a training dataset x_i, Adaboost minimizes the exponential loss function sum_i (exp - (y_i * f(x_i)) }. The function f = sum_t (alpha_t h_t) is a linear combination of the h_t classifier with weight alpha_t. For those loving Optimization Theory , Adaboost is a classical application of Gradient Descend.
The algorithm is quite simple and has been included in the top 10 data mining algorithms in 2007 and the Gödel prize in 2003. After Adaboost, Boostingbecome quite popular in the data mining community with application in Ranking and Clustering.

Here you have the code for AdaBoosting in C++ and Boost.


Antonio Gulli KMeans

K-means is a classical clustering algorithm..
Here you have a C++ code for K-means clustering.

(Edit: 12/05/013)
See also my more recent posting A new lighter implementation of K-means


Saturday, June 14, 2014

Here is why Amazon should have personal shoppers

I frequently buy objects but I am not really an expert for that particular domain.

For instance, I recently bought some Bluetooth speakers but I was not sure about the brand and the quality of the deal I was making.

In those situations, I would certainly pay a few bucks to someone who is well know expert and is willing to give me advices on what to buy.

Personal  shoppers are common on expensive objects, but I am thinking about something done on a massive scale. I think that Amazon would be the perfect place for making this working at scale

BTW, ranking personal shoppers is a clear machine learning problem

Friday, June 13, 2014

Here is why sending money should be as easy as chat

Today chat is the king and the growth is incredible. No surprise IRC predates the Web and ICQ came before Google.

So why don't we use chat messages to pay our bill and send money? The protocol should be easy: you receive a request of payment with a chat message and you answer with another chat message including your public key.

Should this the natural evolution for Whatsup, Line, Viber, WeChat and all the other instant messengers?

After all, you have your phone in your pocket more frequently than your credit card in your wallet.

Thursday, June 12, 2014

Here is why linkedin should be linked to search

Search is about leveraging users' interactions. Every time you submit a query and select a few links You provide valuable information to the search engine that will be later used for ranking. Normally this information are intrinsically provided. However, this is not the only possible interaction model.

For instance, imagine that you are a top IT executive with the secret passion of snowboarding. Why don't allow you to answer to search queries related to this topic?

Another example, imagine that you are a banker working in finance with the secret passion of interior design. You'd love to share your expertise with other people for free but with current search model this is not easy.

Today, everyone has a linkedin profile. So why do we extend the search model so that I can register myself for a specific search query and offer my expertise on that topic for future users who are submitting the same query?

I think that the problem of spam is completely avoided if we adopt Linkedin profiles for registering users.

Also, I think that users would love the serendipity of being in touch with other people sharing same interests.

BTW, did I say that I love acquarium, ham radio and late 80s music?





Wednesday, June 11, 2014

Here is why Amazon should start to sell money

Amazon is well-know to sell everything (including baby sitters now ;) So why they don't start selling money?
The idea could be a little crazy but here are the motivations:

  1. They have all users' credit history so it is very easy for them to assess credit rate
  2. They have all user's credit cards so it is very easy for them to assess credit rate
  3. They have a huge number of transactions so they can easily move money and let user borrow 
This will be a win-win situation. Amazon can increase the number of transactions by allowing users to borrow money. Users can find very interesting rates. The whole system can benefit because the credit rate will be based on dynamically evolving parameters constantly updated

So when Amazon will become a bank?

PS: same suggestion can be applied to Ebay and Alibaba

Tuesday, June 10, 2014

Jump array

Given an array of non negative numbers, start at the first element and reach the end with a minimum number of jumps. A jump cannot exceed the length contained in the current position.

x

Monday, June 9, 2014

LIS

Given an array of integers find the longest increasing subsequence