A Comparator function is nothing else but a function which we define to compare two objects. The data-type of these objects can be user-defined or it can be primitive.

Suppose we have to sort a vector in descending order. The code goes as follows.

Before we discuss logistic regression, I certainly hope that you do know what linear regression is, and here is a short summary for linear regression.

**What is Linear Regression?**

Linear Regression is a supervised machine learning algorithm which is used to predict a target value based on independent variables. When I say supervised it means that it needs labeled datasets to make predictions. The target value predicted using linear regression is a continuous value. How it works is that, Linear Regression model finds the best line that can accurately predict the output for continuous dependent variable. …

Software Developer at Samsung.