Skip to main content

Posts

Showing posts from August, 2019

Regularization in Deep Learning / Machine Learning - Prevent Overfitting

image source: mlexplained Overfittng happens in every machine learning (ML) problem.  Learning how to deal with overfitting is essential to mastering machine learning.  The fundamental issue in machine learning is the tension between optimization  and generalization. Optimization refers to the process of adjusting a model to get the  best performance possible on the training data (the learning in machine learning ),  whereas generalization refers to how well the trained model performs on data it has  never seen before . The goal of the game is to get good generalization, of course, but you don’t control generalization; you can only adjust the model based on its training  data.  The processing of fighting overfitting is a way  called regularization . [1].  How do you know whether a model is overfitting? The best initial method is to measure error on a training and test set. If you see a low error on the training set and...

Encapsulation VS Abstraction in Object-Oriented Programming

Encapsulation  binds together the data and functions that manipulate the data, keeping it safe from interference and misuse. Real-World Example:   Every time you log into your email account( Gmail, Yahoo, Hotmail or official mail), you have a whole lot of processes taking place in the backend, that you have no control over. So your password, would probably be retrieved in an encrypted form, verified and only then you are given access. You do not have any control, over how the password is verified, and this keeps it safe from misuse. Abstraction  is a process of hiding the implementation from the user, only the functionality is exposed here. So you are aware only of what the application does, not how it does it. Real-World Example:   When you log into your email, compose and send a mail. Again there is a whole lot of background processing involved, verifying the recipient, sending a request to the email server, sending your email. Here you are only interested in compo...