Sunday, March 10, 2019

The Concept of Overfitting in Machine learning





If you are taking any Machine learning courses or practising to solve some ML problems.You would have come across this term called “Overfitting”.

Let’s try to understand it with a simple example:

We are trying to come up with a generic size of a T-shirt that suits an average person.(not extreme tall/short and weights).

And for that we got certain sample measurements from the existing population.

Now we have come up with certain values for hands, neck, back etc and designed a shirt.

Now based on the feedback received from each individual , we keep changing the measurements such that it fits just fine for people in the sample. 

The adjustments we are trying to make doesn’t generalise much as we are trying to make sure that the shirt fits  perfectly for the people who’s measurements are known.

Friday, March 8, 2019

using regular expression in sublime Text Editor

Sublime Text editor provides an easy way of replacing text using regular expressions.

Let's take a simple regex examples and replacing it with the values that we would like to have.

one of the sample text is :

"CreateTime" : ISODate("2018-12-21T15:10:30.145Z")

This has to be replaced with the value in the quotes.

We can do this using any of the programming language and use grouping and replace with the value.

The same can be done in sublime editor as well:

Just select Edit-->Replace.

Choose Regex mode



Select Replace All will do the job.