Pledging to do 100 days of Machine Learning and progress log!


< change language

It is a shame but I kind of dropped this when I was $41\%$ done...

I hope I man up and finish this in the near future.

After watching this video from Siraj Raval, I decided to jump right on board of the #100daysofMLcode initiative! (even though I am something like 73 days late...) The goal here is to devote (at least) 1h every day, for the next 100 days, to studying ML or writing code!

According to the rules posted by Siraj, I must:
  1. Make a public pledge for this, which this post is;
  2. Make a log of everything, which this post will also be;
  3. Whenever I see something related to this #100DaysofMLCode, be supportive!

Progress log

For the day $0$ I wrote this post and spent quite some time thinking about what I will do throughout. I am thinking of studying several topics about ML and then writing educative posts here, for the blog.
  1. For today I wrote this twitter proof, tackling a mathematical property of neural networks with linear activation functions.
  2. Started reading about Reinforcement Learning and Markov Decision Processes; already imagined a nice example I will be using when writing about this... it will involve cake, lemonade and eventually a stomach ache.
  3. I have been reading more about MDPs, and I found this answer on Cross Validated specially enlightening.
  4. Reading more about the functioning of MDPs in this blog (which seems to have taken inspiration from these slides for this particular blog post).
  5. Kept reading the resources from above; started sketching an example MDP to be used in my next blog post.
  6. Finished sketching the example MDP and did some calculations related to it; started writing the first blog post about this and created a representation of the MDP for the post.
  7. Finished writing and published this post on the basics of Markov Decision Processes.
  8. Started writing the second post on MDPs, where we will explore how the changes in $\gamma $ and the transition probabilities affect the policies.
  9. I wrote another post on MDPs, this time about the discount factor $\gamma$.
  10. Following up on the last post, I wrote here about how the optimal policy can change when the discount factor changes.
  11. Decided to use the Hanoi Towers as a model problem and started encoding it as an MDP; wrote some helper code for that and you can find such code here.
  12. Kept writing the code from the previous day and applied the algorithm of value iteration to the Hanoi Towers, solving them. The code is in this GitHub repo.
  13. Wrote this post on how to encode the problem of the Tower of Hanoi into an MDP.
  14. Wrote the code for the policy iteration algorithm to solve the Tower of Hanoi; the code is in my GitHub.
  15. Today I tried implementing Q-learning to solve the Tower of Hanoi. It isn't learning properly yet, so I decided not to upload the code to GitHub.
  16. For today I have been all over the internet to try and find the reason why my Q-learning algorithm isn't working... Still haven't succeeded.
  17. Because Q-learning wasn't working I tried to implement double Q-learning, just to be sure my problem wasn't one of bias. At first double Q-learning wasn't working as well, but now both algorithms are working just fine! They have been uploaded to GitHub now.
  18. Started writing a Python notebook where I will explain the algorithms and show how to use them to solve the Tower of Hanoi. Those explanations will also be put here in the blog as they are written. The notebook can be found in my GitHub as well.
  19. Kept on working on the notebook! Practically finished the section on value iteration.
  20. I had to stop a bit; sorry for that! I am back and I have been reading about ML on financial markets and have been taking an online course about data science. It isn't exactly the same as ML, but knowing how to handle data ought to make me better at ML, right?
  21. Kept taking the course Data Science: Visualization on edX.
  22. Today I read about using machine learning for text translation.
  23. Advanced a lot in one of the modules of the Data Science course...
  24. And today I finished it!
  25. I started the module on probability...
  26. And today I kept going...
  27. And finished it today!
  28. Today I resumed my work on the Hanoi RL notebook.
  29. Wrote about Q-learning and double Q-learning on my notebook.
  30. Started the new module of the Data Science course.
  31. Kept learning!
  32. Today I kept learning for the course I am taking.
  33. ...
  34. ...
  35. ...
  36. ...
  37. ...
  38. ...
  39. ...
  40. ...
  41. For the past days I have been studying for my online course... I think I have done around 2/3 of the course by now.

Are you into #100DaysofMLCode as well? Let me know in the comments what you have been doing!

Perdi-me quando estava a $41\%$ desta tarefa, o que é um pouco vergonhoso...

Espero decidir voltar a isto em breve.

Depois de ter visto este vídeo do Siraj Raval, decidi fazer parte do movimento #100DaysofMLCode! (apesar de já vir uns 73 dias atrasado...) O objetivo desta iniciativa é dedicar (pelo menos) 1h por dia, durante os próximos 100 dias, à aprendizagem automática (ML): quer estudando, quer escrevendo código.

De acordo com as regras que o Siraj publicou, devo:
  1. Comprometer-me publicamente a levar esta iniciativa até ao fim (e a fazer "figura de urso" se me perder a meio);
  2. Registar publicamente os meus progressos diários;
  3. Quando eu vir alguma coisa marcada com o hashtag #100DaysofMLCode, devo encorajar os autores.

Registo diário

Para o dia $0$ escrevi este post e gastei algum tempo a pensar sobre o que vou fazer. Tenciono ir estudando tópicos diversos e escrever posts educativos aqui no blog.
  1. Hoje escrevi esta prova num tweet, sobre uma curiosidade matemática relacionada com redes neuronais e a função de ativação linear.
  2. Comecei a ler sobre Reinforcement Learning e Markov Decision Processes. Também já imaginei um pequeno exemplo que vou usar para explicar estas noções; vai involver bolo, limonada e, quando chegar a altura, dores de barriga.
  3. Continuei a ler sobre MDPs e esta resposta no Cross Validated foi particularmente esclarecedora... ou se calhar foi só porque finalmente tudo fez "clique"!
  4. Ler mais sobre o modo como MDPs funcionam neste blog (que parece ter-se inspirado nestes slides para este post em particular).
  5. Continuei a ler os recursos disponíveis aqui em cima; comecei a rascunhar um MDP que vou usar no meu próximo post.
  6. Acabei o rabisco do MDP e fiz umas contas com ele; comecei a escrever o primeiro post do blog e criei uma representação esquemática do MDP para vos apresentar.
  7. Acabei de escrever e publiquei este post sobre Markov Decision Processes.
  8. Comecei a escrever o próximo post sobre MDPs, um post onde se vão explorar os efeitos de alterar o factor $\gamma $ e as probabilidades de transição.
  9. Escrevi outro post sobre MDPs, desta vez sobre o factor de desconto $\gamma$.
  10. No seguimento do último post, escrevi aqui sobre como a melhor estratégia pode variar quando o factor $\gamma$ varia.
  11. Decidi que o problema das Torres de Hanoi vai ser o meu problema exemplo e comecei a codificá-lo num MDP; escrevi algum código para me ajudar nessa tarefa e o dito código pode ser encontrado aqui.
  12. Acabei o código do dia anterior e usei o algoritmo de "value iteration" no problema das Torres de Hanoi, resolvendo-o. O código está todo neste repositório do GitHub.
  13. Escrevi este post sobre como transformar o problema da Torre de Hanoi num MDP.
  14. Escrevi o código para resolver a Torre de Hanoi com o algoritmo da policy iteration; o código está no meu GitHub.
  15. Hoje implementei o algoritmo de Q-learning para resolver a Torre de Hanoi. O código ainda não está a funcionar e por isso ainda não fiz o upload do ficheiro para o GitHub.
  16. Andei por todo o lado na internet a tentar descobrir porque é que o meu algoritmo de Q-learning não está a funcionar... Por enquanto, sem sucesso.
  17. O algoritmo de Q-learning não estava a funcionar e eu achei que pudesse ser um problema de bias, então tentei implementar double Q-learning. Primeiro, nenhum dos dois estava a funcionar, depois consegui pôr os dois a funcionar corretamente! Já fiz o upload do código para o meu GitHub now.
  18. Comecei a escrever um notebook de Python onde vou explicar os algoritmos que implementei e onde mostro como usá-los para resolver a Torre de Hanoi. Essas explicações também vão sendo postas aqui no blog à medida que forem concluídas. O notebook também pode ser encontrado no meu GitHub.
  19. Continuei a trabalhar no notebook e a secção sobre o algoritmo de value iteration está praticamente concluída.
  20. Infelizmente parei um par de dias, mas estou de volta! Tenho lido um pouco sobre ML nos mercados financeiros e tenho continuado um curso sobre ciência de dados que comecei no Verão. Eu sei que ML e ciência de dados não são a mesma coisa, mas saber mexer em dados há de me ser favorável, não?
  21. Continuei o curso sobre visualização de dados no edX.
  22. Hoje li sobre como usar ML para traduzir textos.
  23. Fiz grandes progressos num dos módulos do curso sobre ciência de dados...
  24. E hoje acabei-o!
  25. Hoje comecei o módulo sobre probabilidade.
  26. E hoje continuei-o...
  27. E acabei-o hoje!
  28. Hoje dei continuidade ao trabalho que já tinha feito no notebook sobre RL aplicado à Torre de Hanoi.
  29. Escrevi sobre Q-learning e double Q-learning no meu notebook.
  30. Comecei o módulo seguinte do curso de ciência de dados.
  31. Continuei a aprender.
  32. Hoje dei continuidade ao curso que estou a fazer.
  33. ...
  34. ...
  35. ...
  36. ...
  37. ...
  38. ...
  39. ...
  40. ...
  41. Nos últimos dias tenho estudado para o curso online. Acho que por esta altura já acabei 2/3 do curso.

Há aqui algum leitor envolvido com o #100DaysofMLCode? Digam nos comentários o que andam a fazer!

  - RGS

Popular posts from this blog

Tutorial on programming a memory card game

Markov Decision Processes 01: the basics

The hairy ball theorem and why there is no wind (somewhere) on Earth