Machine Learning Introduction – 1: Set up your workstation

Recently, we are planning to use machine learning in one of our core product in Telenor Health. So, I am seriously looking into machine learning for the last few days. Though I have a computer science degree, to be honest, I didn’t have a good grasp on machine learning rather than having some basic knowledge of some algorithm like linear regression, K nearest neighbor algorithm and some familiarity with some machine learning term like neural network, deep learning etc. Many people are doing machine learning without having CS degree. So I thought, why not give it a try?


I am writing this series in English, though I English is not very good. One reason is this will improve my English writing skill and other thing is my foreign friends could understand what I learn. So, pardon me for my writing.

I knew in the field of machine learning, two languages are very popular. One is R and another is Python. As I am already very familiar with Python, so I am going for Python. First you need to install python and other machine learning library. I assume you have already installed python in your machine. Rather than windows every operating system comes with python installed. If not, then do a quick google search and I guarantee you will figure it out.

Python has some great library for machine learning. I am going to install them right now. I will be using virtualenv for this cause I don’t want my machine filled with these libraries. Python has a very popular distribution called Anaconda. If you are using that, you will have lot of these tools already installed. But I am going for the simpler approach. I will be using pip to install these package. But before that, lets start with virtualenv setup. In your terminal just type-

pip install virtualenv

Then, I am going to create a new environment called env.

virtualenv env -p /usr/local/bin/python3

I will be using python 3.6 throughout this series. So I pass -p flag for the python3 path. As I am in macOS, that is my path. You could find the path by writing which python3 in the terminal. As the environment is created, then you can activate that by typing-

source env/bin/activate

Make sure whenever you are working with this setup, you always start is form the terminal. If you close the terminal windows, then the environment will be deactivated. You can also deactivate it by typing-


As, our environment is ready, then lets start with numpy. This is a very popular look for numerical calculation in python.

pip install numpy

Then we will install two other dependencies named pandas and matplotlib. First one is a data analysis tool and second one is for plotting numerical data into beautiful diagram.

pip install pandas matplotlib

Then lastly install scikit-learn with pip by following command-

pip install scikit-learn

Though pip should install all the dependencies of scikit-learn, but for some weird reason, it didn’t install scipy. So, we have to install it manually as well.

pip install scipy

Now, as we have setup all our dependencies, we could check it by running-

pip freeze

You will find a tons of module installed. Thats because the libraries we installed are dependent on those libraries.

Our machine is ready for doing some fun with machine learning. See you in next episode. Happy learning.

Why you should consider laravel as your go to framework of choice

Recently I was in a debate with 3 other very great software professional at Basis Software Expo, 2017 about Laravel vs Django. I know, comparing between these two is like comparison between orange and apple. Actually, our main target was to present the feature set that these two frameworks offer but in a form of debate so that, people especially the newcomers get a good grasp on these frameworks. We had a very limited time to debate, so we could not focus on all the parts. So, I think why not write a blog post about the topic and thus comes this blog post.

Laravel is a very popular web framework, it is the most popular php framework and probably the most popular web framework of any language as well. Though it is comparatively very new, but it has some awesome features. So, here is the features that you should know about laravel-

  • Laravel has a great community. It is huge and very friendly.
  • It has arguably the best learning site on the Interner, Laracasts. Jeffrey Way is a great teacher.
  • Laravel provides a whole eco-system. It ensures developer’s happiness from development to deployment.
    • Development: Valet, Homedtead
    • Built in Testing: both unit and browser testing
    • Code Review: NitpickCI
    • Asset Management: Elixir, Laravel Mix
    • Great Task runner: Laravel Envoy
    • Server Provisioning: Forge
    • Zero Downtime Deployment: Enroyer
    • Monitoring Tool: Cachet
  • Great ORM, built-in Queue System, Out of the box Redis support.
  • Scaffolding Tools: Spark, Backpack
  • Stable Release Cycle and LTS support. A new version of laravel comes every 6 months and a long-term support version comes in every 2 years.
  • Great features, like- realtime broadcasting (Echo), Multiple notification channels, Task schedular, Multiple drivers for most of the components(session, cache, queue, mail, events etc.)
  • Laravel has some great first party packages
    • Payment Gateway: Cashier
    • OAuth2 Server: Passport
    • Social Authentication: Socialite(support more than 80 sites)
    • Full-text search: Scout
  • Laravel is very beginner friendly with very little entry barrier.
  • Migration, Template Engine with markdown support.
  • Great Command Line Utility: Artisan.
  • Tons of community driven packages.

To be honest, Laravel is the best thing that happens to me in last 2-3 years. It prevented me from leaving php. I also wrote a bestseller book on Laravel in Bengali. If you are interested, you can also look into it.