Category: Data Science Interview Questions


  • Linear Regression – Evaluation Matrices

    Linear Regression – Evaluation Matrices

    Linear Regression – Evaluation Metrices Table Of Contents: Mean Absolute Error. Mean Squared Error. Root Mean Squared Error. R –  Squared Error Adjusted R – Squared Error. (1) Mean Absolute Error. Mean Absolute Error calculates the average difference between the calculated values and actual values. It is also known as scale-dependent accuracy as it calculates error in observations taken on the same scale. MAE provides a straightforward measure of the model’s accuracy, as it represents the average magnitude of errors without considering their direction. Formula: Example: To calculate the MAE, we follow these steps: Calculate the absolute differences between the

    Read More

  • Linear Regression – Problem Statements

    Linear Regression – Problem Statements

    Linear Regression – Problem Statements (1) Marketing Promotion TV vs Radio vs Social Media Each row corresponds to an independent marketing promotion where the business uses TV, social media, radio, and influencer promotions to increase sales. The features in the data are: TV promotional budget (in “Low,” “Medium,” and “High” categories) Social media promotional budget (in millions of dollars) Radio promotional budget (in millions of dollars) Sales (in millions of dollars) Influencer size (in “Mega,” “Macro,” “Micro,” and “Nano” categories) (2) USA Optimal Product Price Prediction Dataset This dataset contains product prices from Amazon USA, with a focus on price

    Read More

  • Gradient Descent Algorithm

    Gradient Descent Algorithm

    Gradient Descent Algorithm Table Of Contents: What Is Gradient Descent? Algorithm Requirements. What Is Gradient? How Gradient Descent Algorithm Works? (1) What Is Gradient Descent? Gradient descent (GD) is an iterative first-order optimisation algorithm, used to find a local minimum/maximum of a given function. This method is commonly used in machine learning (ML) and deep learning (DL) to minimise a cost/loss function (e.g. in a linear regression). Gradient Descent algorithm is the backbone of Machine Learning because whatever the loss function you give, it will find out its local minimum value. (2) Algorithm Requirements. The Gradient Descent algorithm does not work for all functions. There

    Read More

  • Linear Regression: OLS Technique

    Linear Regression: OLS Technique

    Linear Regression – OLS Technique. (1) Introduction. The Linear Regression model’s main objective is to find the best-fit line that will closely pass through all the points to minimize the loss. The question here is how to find out the best-fit line. We need some mathematical proof that this is my best-fit line. To solve this problem we have two techniques. Ordinary Least Square Technique. Gradient Descent Technique. (2) Ordinary Least Square Technique. In case of OLS technique we directly use the formula for ‘m’ and ‘b’ to derive the best fit line equation. Here in this vlog we will

    Read More

  • Extreme Gradient Boosting – Regression Algorithm

    Extreme Gradient Boosting – Regression Algorithm

    Extreme Gradient Boosting – Regression Algorithm Table Of Contents: Example Of Extreme Gradient Boosting Regression. Problem Statement: Predict the package of the students based on CGPA value. Step-1: Build First Model In the case of the Boosting algorithm, the first model will be a simple one. For the regression case, we have considered the mean value to be our first model. Mean = (4.5+11+6+8)/4 = 29.5/4 = 7.375 Model1 output will always be 7.373 for all the records. Step-3: Calculate Error Made By First Model To calculate the error we will do the simple subtraction operation. We will subtract the

    Read More

  • Gradient Boosting – Classification Algorithm

    Gradient Boosting – Classification Algorithm

    Gradient Boosting – Classification Algorithm Table Of Contents: Example Of Gradient Boosting Classification. Problem Statement: Whether the student will get placement or not is based on CGPA and IQ. Step-1: Build First Model – Calculate Log Of Odds. In the case of the Boosting algorithm, the first model will be a simple one. For the regression case, we have considered the mean value to be our first model. But it will not make any sense in the case of classification. Hence we will consider Log(odds) as our mathematical function for the first model. Log(Odds) The odds of an event happening

    Read More

  • Cat Boost Algorithm

    Cat Boost Algorithm

    Cat Boost Algorithms Table Of Contents: What is the CatBoost Algorithm? Features Of CatBoost Algorithm. Is tuning required in CatBoost? When and When Not to Use CatBoost (1) What Is The Cat Boost Algorithm? The term CatBoost is an acronym that stands for “Category” and “Boosting.” Does this mean the “Category’ in CatBoost means it only works for categorical features? The answer is, “No.” According to the CatBoost documentation, CatBoost supports numerical, categorical, and text features but has a good handling technique for categorical data.  The CatBoost algorithm has quite a number of parameters to tune the features in the processing stage. “Boosting” in CatBoost refers to

    Read More

  • Light Gradient Boosting

    Light Gradient Boosting

    Light Gradient Boosting Table Of Contents: What Is a Light Gradient Boosting Algorithm? Key Features Of Light GBM. (1) Light Gradient Boosting. LightGBM is another popular gradient-boosting framework that is known for its excellent performance and efficiency. It is designed to be a faster and more memory-efficient implementation compared to traditional gradient-boosting algorithms like XGBoost. LightGBM introduces several key optimizations to achieve these improvements. (2) Key Features Of Light GBM. Gradient-based One-Side Sampling (GOSS): LightGBM incorporates a technique called Gradient-based One-Side Sampling (GOSS) to reduce the number of data instances used for gradient-based decision-making. GOSS focuses on keeping the instances

    Read More

  • Extreme Gradient Boosting

    Extreme Gradient Boosting

    Extreme Gradient Boosting Table Of Contents: Evolution Of Tree Algorithms. What is XGBoost, And Why Is It So Popular? What Are The Features Supported By XGBoost? Installation of XGBoost. Should we use XG-Boost All The Time? Hyper-Parameters Involved In XG-Boost. (1) Evolution Of Tree Algorithm Artificial neural networks and deep learning lead the market for unstructured data like images, audio, and texts. At the same time, when we talk about small or medium-level structured data, tree-based algorithms dominate the market. And when we say tree, it all starts with the basic building block, i.e., Decision Trees DTs were able to

    Read More

  • Gradient Boosting Algorithm

    Gradient Boosting Algorithm

    Gradient Boosting Algorithm Table Of Contents: Introduction What Is the Gradient Boosting Machine Algorithm? How Does Gradient Boosting Machine Algorithm Work? Example Of Gradient Boosting Algorithm. (1) Introduction: The principle behind boosting algorithms is first we build a model on the training dataset, then a second model is built to rectify the errors present in the first model. Let me try to explain to you what exactly this means and how this works. Suppose you have n data points and 2 output classes (0 and 1). You want to create a model to detect the class of the test data. Now what

    Read More