AI competitions don’t produce useful models

Awesome post totally recommended: AI competitions don’t produce useful models

TLTR; From the upper average top performing models the one that has the best accuracy is not necessarily the best one. The blog post argues that the test set is not big enough to differentiate among the best models so in most of the cases what we find is which model actually better overfitted everything.

Competing together, not against each other

In many instances people think they should sink the other ships to win the race but that -as it turns out- this is not true. They think in this way because they are thinking about a zero-sum game. However, that is not always the case, there are many environments where you can benefit more from collaboration than competition.

There is the case when the technologies are mature enough that standardisation works for the competitors. Competitors will work together to create a technical standard (e.g. ISO). If the main players accept that that will mean that everyone accepted that to be the way to go, and they should focus the resources on other areas. Areas where the reward may be much bigger if they get it right.

Companies can also collaborate to increase the market for which they are competing. It may make more sense to work together to attract more customers than to fight for a small piece of the existing pie.

Companies may agree on certain aspects to prevent new players entering the market. That may be the taxi industry. Few companies are the ones who manage the taxis preventing anyone from offering the service.

Working together for a bigger goal. That may be that both companies have a common aim and agree to put differences aside so they are able to work together and achieve a greater glory than they could alone. In this case may be the Allies during the WWII, or now-a-days companies or governments to achieve the AI supremacy.

Sharing ideas and information may enhance the speed at which innovation happen. Different competitors could scratch each other’s back and play their strengths. Doing that may help the industry itself. It may also help to reduce the risks, so instead of investing large amounts of money in one project one could invest smaller amounts in more projects and still obtain results from all of them.

So not everything about competition is competing. You can collaborate and still profit equally if not more from the partnership.

How to estimate a market size using facebook?

It always fascinated me how could estimate the market size. Many times, you have this wonderful idea but it turns out that no-one was asking for it. So here I’m going to explain how to estimate the market size using available resources in a very “rule of thumb way”.

So, the reason why I’m using Facebook in this case is because, like it or not everyone is there, and the big brother knows everything about us. Where we live, age, sex, but also what we like, political orientation, and a long etc.

We can start by going to Facebook to create a new marketing campaign. You say you want to create an ad and you want to direct people to your website (traffic).

In here you next select the profile you want to target. Age, sex, location, but the important part are the interests and activities. There are possible elements to select like dancing but also more behavioural such as travellers.

Once you have defined the persona you will be able to see how many people fit those categories and therefore your potential audience. With all of these questions you will have defined the size of your market.

Complaining about a problem without posing a solution is called whining

“Complaining about a problem without posing a solution is called whining”
– Theodore Roosevelt

Roosevelt seemed to be a very interesting persona. With many wonderful quotes and speeches like the man in the arena, April 1910. This speech I would say is the long version from today’s quote. Complaining about things does not help. We already live in a highly reactive world. Making this world better is not about someone else’s responsibility, it’s everyone’s. So, if you’re not improving it, you’re probably making it worse.

Owning a problem does not mean that you did something wrong, it does not mean that you should fix it. Owning a problem is about acknowledging that there is a problem and working towards a solution. That solution may be outside your reach, nevertheless it’s your responsibility to keep working on fixing it. That may mean working on finding the person who is able to fix it.

So next time when you find a problem, define it and work to fix it.

Hiding API keys in python using anaconda environment variables

First you should have anaconda 😉

Then we need to find out where the environment is located

echo $CONDA_PREFIX

We’ll create create the sub-directories

cd $CONDA_PREFIX
mkdir -p ./etc/conda/activate.d
mkdir -p ./etc/conda/deactivate.d
touch ./etc/conda/activate.d/env_vars.sh
touch ./etc/conda/deactivate.d/env_vars.sh

We’ll have to input the variables in

./etc/conda/activate.d/env_vars.sh

For example here we will add a secret key and a path

#!/bin/sh

export MY_KEY='secret-key-value'
export MY_FILE=/path/to/my/file/

Also important to unset the variables when we deactivate the environment we will need to edit the file

./etc/conda/deactivate.d/env_vars.sh

and we will add the following commands


#!/bin/sh

unset MY_KEY
unset MY_FILE

If we are inside the environment and we run python we can import the key and the path the following way

import os
os.environ.get('MY_KEY')

and you will get -for this example- as output

'secret-key-value'

This is the way to prevent committing to the repo private keys or private information

Summary: Pre-suasion by Robert Cialdini

Dr. Cialdini is the writer who brought the influence to the mass market with his first book Influence. Towards the end of 2016 he then later published a new book: Pre-suasion. He intended to extend and build upon his previous work. Overall the book was quite fast to read, full of examples and stories that made the ideas memorable. It is well written.

Lesson 1: You can lead the answers with your questions

For example, if I ask you: “Given the recent terrorist attacks in London, how dangerous do you perceive the threat of terrorism to be?” the question is clearly leading the answer. It’s the same with “Are you happy?” vs “Are you unhappy?”. The raw question is the same, but the last one persuades to look for dissatisfaction moments whereas the former one incentivises the search for happiness times.

Lesson 2: Whatever grabs our attention, we think is relevant

You cannot change people’s minds with facts and logic. People do not change their minds. But in general you can choose what to make relevant. You can choose what people pays attention and therefore considers important. During elections if media speaks about terrorism, security is going to be a relevant topic for the campaign.

Lesson 3: The choice of words matter

After reading a text about old people the readers walked slower than in the control group. The same effect but beneficial for us can be used if we get to use words that the reader links with positive feelings.

Lesson 4: Attention tunnels

If you funnel a person into answering certain things, then they will have a harder time backing off. For example, if you want someone to help you, ask them first if they are helpful people. Almost everyone will say yes, and when you ask to fill the questionnaire they will have difficulties in rejecting your offer.

Lesson 5: People only pay attention to Sex, Violence, and novelty

Sex (or a beautiful person in the ad) is good to sell products to be prettier or find a mate. If you want to sell coffee may not be as useful. One of the deepest instincts is survival. Therefore violence or danger are attention grabbers. If you tell about the *dangers* of smoking, chances are that people will quit (as it happened in the 50s). Humans are explorers by nature. We’re wired to find patterns, so if something changes our brain has to figure out what went different and the effects it will have for us.

Lesson 6: Keep people’s attention by making it about them

After grabbing someone’s attention you should retain it. To do so, make it about them. Not “they”, or “people”.

Lesson 7: Unfinished tasks are remembered

If you have a pending task you’ll be likely to remember. People desire closure. Once done people forget about it. An unfinished story or mystery will keep people captivated until the end.

Lesson 8: Mental associations

No thought exists on its own, all ideas are linked together. New associations can be created even when people are totally unaware of them. Also use the right wording for it. Maybe instead of business targets would be better business goals.

Lesson 9: Build trust

If you behave as if the other people already trusted you they will. And if people trust you then you already have a huge advantage.

Lesson 10: Unity

People should feel they have something in common with you, they should think that you’re part of the same unit. Unity is about shared groups, identities, and world views. To create unity you can move together (e.g. dance).

In the end this could be summarised as try to live an optimistic life and try to find the bright side always. Be confident that people are good and be genuinely curious about them.