Techno Blender
Digitally Yours.
Browsing Tag

Linear

Are the OLS Estimators Normally Distributed in a Linear Regression Model? | by Aaron Zhu | Nov, 2022

Justification for the Normality AssumptionPhoto by Martin Sanchez on UnsplashWe all know that the normality assumption is optional to compute unbiased estimates in a linear regression model. In this post, we will discuss if the OLS estimators in a linear regression model are normally distributed and what assumptions would be needed to draw the conclusion.What are the OLS estimators in a linear regression model?The OLS estimators (β^) are computed from a sample to estimate the population parameters (β) in a linear…

Making Linear Predictions in PyTorch

Last Updated on November 28, 2022 Linear regression is a statistical technique for estimating the relationship between two variables. A simple example of linear regression is to predict the height of someone based on the square root of the person’s weight (that’s what BMI is based on). To do this, we need to find the slope and intercept of the line. The slope is how much one variable changes with the change in other variable by one unit. The intercept is where our line crosses with the $y$-axis. Let’s use the simple…

Training a Linear Regression Model in PyTorch

Last Updated on November 29, 2022 Linear regression is a simple yet powerful technique for predicting the values of variables based on other variables. It is often used for modeling relationships between two or more continuous variables, such as the relationship between income and age, or the relationship between weight and height. Likewise, linear regression can be used to predict continuous outcomes such as price or quantity demand, based on other variables that are known to influence these outcomes. In order to train…

Are the Error Terms Normally Distributed in a Linear Regression Model? | by Aaron Zhu | Nov, 2022

Justification for the Normality AssumptionPhoto by Martin Sanchez on UnsplashIn a linear regression model, the normality assumption (i.e., the error term is normally distributed) NOT required for calculating unbiased estimates. In this post, we’ll discuss under what situations we would need this normality assumption, why it is reasonable to make such an assumption, and how to check if the errors are normally distributed.What are the error terms in a linear regression model?The following is what a typical linear regression…

Transformers for Tabular Data (Part 3): Piecewise Linear & Periodic Encodings | by Anton Rubert | Nov, 2022

Advanced numerical embeddings for better performancePhoto by Pawel Czerwinski on UnsplashThis is the third part in my exploration of Transformers for Tabular Data.In the Part 2 I’ve described linear numerical embeddings and how they are used in the FT-Transformer model. This post is going to explore more complex versions of the numerical embeddings, so if you haven’t read the previous part, I highly recommend starting there and returning to this post afterwards.FT-Transformer. Image by author.As a reminder, above you can…

Is Sentinel Linear Search better than normal Linear Search?

What is Sentinel Linear Search?Sentinel Linear search is a type of linear search where the element to be searched is placed in the last position and then all the indices are checked for the presence of the element without checking for the index out of bound case.The number of comparisons is reduced in this search as compared to a traditional linear search. When a linear search is performed on an array of size N then in the worst case a total of N comparisons are made when the element to be searched is compared to all the…

Linear Classifier in Tensorflow – GeeksforGeeks

In this article, we will be using tf.estimator.LinearClassifier to build a model and train it on the famous titanic dataset. All of this will be done by using the TensorFlow API.Importing Libraries Python libraries make it easy for us to handle the data and perform typical and complex tasks with a single line of code.Pandas – This library helps to load the data frame in a 2D array format and has multiple functions to perform analysis tasks in one go.Numpy – Numpy arrays are very fast and can perform large computations in…

Comparing Linear and Logistic Regression | by Devesh Rajadhyax | Nov, 2022

Discussion on an entry level data science interview questionData Science interviews vary in their depth. Some interviews go really deep and test the candidates on their knowledge of advanced models or tricky fine-tuning. But many interviews are conducted at an entry level, trying to test the basic knowledge of the candidate. In this article we will see a question that can be discussed in such an interview. Even though the question is very simple, the discussion brings up many interesting aspects of the fundamentals of…

Improving TabTransformer Part 1: Linear Numerical Embeddings | by Anton Rubert | Oct, 2022

Deep learning for tabular data with FT-TransformerPhoto by Nick Hillier on UnsplashIn the previous post about TabTransformer I’ve described how the model works and how it can be applied to your data. This post will build on it, so if you haven’t read it yet, I highly recommend starting there and returning to this post afterwards.TabTransformer was shown to outperform traditional multi-layer perceptrons (MLPs) and came close to the performance of Gradient Boosted Trees (GBTs) on some datasets. However, there is one…

When Outliers are Significant: Weighted Linear Regression | by Daniel Kulik | Oct, 2022

Photo by Bekir Dönmez on UnsplashMethods for weighted regression that incorporate significant outliersOutliers are often mischievous. They have the potential to disrupt an otherwise simple process of regression by introducing themselves as data that is as equally important as the rest, often skewing the fitted model. A straightforward approach is to use outlier detection methods to remove them from the dataset prior to fitting a model. But this has its caveats. Sometimes outliers may be significant and are essential to…