Sign in

Data scientist. Currenty applying Ml and AI to detect damages on automobiles. Researching MLOps, Connect with me on mldiscussionwithck.slack.com

Genetic algorithm code for solving Travelling Salesman Problem.

Are you a hands on person like me and want to understand how one can write efficient Genetic Algorithm code in python.. from scratch?

I have used a framework called ray for running multiprocessing to speed up the calculation of Fitness function. But this article is about the concepts and not a deep dive in to code. You can use any language to implement the concepts mentioned here.

Complete code is available in the gihub repo.

Genetic Algorithm in python from scratch

Genetic algorithm code for solving Travelling Salesman Problem.

Are you a hands on guy like me…


As a part of the EDA series, I want to introduce you to an easy way to do univariate analysis in plotly interactively using a browser.

Plotly and it’s extension Dash have been downloaded 5 million times a month.

I will use the very basic Titanic dataset, but replacing the dataset is only a 2 line code change.

Assumptions

  1. You have cleaned the dataset
  2. Variables are in converted to right data type.

Once these steps are completed, using dash we can setup a simple browser based interface to do univariate analysis.

Install Dash and plotly

pip install dash dash-renderer dash-html-components dash-core-components…


Image source — https://www.tensorflow.org/datasets

What I understood from the study.

When you look at the training process, you see high training error and a worse validation error? You patiently wait hoping for the best and still end up with the same, wondering what happened, you think:

  1. Was the number of epochs too low?
  2. Was the model too simple to learn the “function”.
  3. Was the data insufficient?
  4. Is there an issue with the data pre processing?

More often than you imagine, the reason for the model to not perform well is closely related to the weight initialization and activation functions. Why does transfer learning perform better even…


Data science is not just importing libraries and calling a model.fit method.

That part comes way later, Data analysis is important to understand what we are up against. And as Andrew Ng mentions in his video Model-centric to Data-centric AI, we should start focussing on data rather than models.

This video is a must watch for beginners and professionals alike.

There are many tools to facilitate data analysis and I like plotly among all.

Plotly and it’s extension Dash have been downloaded 5 million times a month.

It is so widely used that there is a community AMI on…


Everyone enjoys good music, be it a song that calls you to the dance floor or a song that takes you through the memory lane. Music industry has been trying to make music that appeal to a greater set of audience; this has been a daunting task as everyone’s needs cannot be met by a few types of songs. This is where artists come in and try to create a new version of the song by:

  • Removing some instruments from the original music
  • Adding new instruments to the original music
  • Adding a specific style to the original music, etc.

The…

Chaithanya Kumar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store