Regression
Linear Regression in Python: Explained with coding examples
Before I go to the implementation of Linear Regression in Python, we'll take a minute to understand what Linear Regression is. Linear Regression is a linear line that predicts the relationship of a dependent variable to an independent variable. From the above simple definition, you might be confused as to how the line predicts this relationship? Suppose we have the per capita income of the US by year, as shown in Figure 1 below. In the figure, each year has a corresponding income with it.
Special Issue! Foundational Algorithms, Where They Came From, Where They're Going
Years ago, I had to choose between a neural network and a decision tree learning algorithm. It was necessary to pick an efficient one, because we planned to apply the algorithm to a very large set of users on a limited compute budget. I went with a neural network. I hadn't used boosted decision trees in a while, and I thought they required more computation than they actually do -- so I made a bad call. Fortunately, my team quickly revised my decision, and the project was successful. This experience was a lesson in the importance of learning, and continually refreshing, foundational knowledge. If I had refreshed my familiarity with boosted trees, I would have made a better decision.
A Conditional Randomization Test for Sparse Logistic Regression in High-Dimension
Nguyen, Binh T., Thirion, Bertrand, Arlot, Sylvain
Identifying the relevant variables for a classification model with correct confidence levels is a central but difficult task in high-dimension. Despite the core role of sparse logistic regression in statistics and machine learning, it still lacks a good solution for accurate inference in the regime where the number of features $p$ is as large as or larger than the number of samples $n$. Here, we tackle this problem by improving the Conditional Randomization Test (CRT). The original CRT algorithm shows promise as a way to output p-values while making few assumptions on the distribution of the test statistics. As it comes with a prohibitive computational cost even in mildly high-dimensional problems, faster solutions based on distillation have been proposed. Yet, they rely on unrealistic hypotheses and result in low-power solutions. To improve this, we propose \emph{CRT-logit}, an algorithm that combines a variable-distillation step and a decorrelation step that takes into account the geometry of $\ell_1$-penalized logistic regression problem. We provide a theoretical analysis of this procedure, and demonstrate its effectiveness on simulations, along with experiments on large-scale brain-imaging and genomics datasets.
Modeling the dynamics of language change: logistic regression, Piotrowski's law, and a handful of examples in Polish
Górski, Rafał L., Eder, Maciej
The study discusses modeling diachronic processes by logistic regression. The phenomenon of nonlinear changes in language was first observed by Raimund Piotrowski (hence labelled as Piotrowski's law), even if actual linguistic evidence usually speaks against using the notion of a "law" in this context. In our study, we apply logistic regression models to 9 changes which occurred between 15th and 18th century in the Polish language. The attested course of the majority of these changes closely follow the expected values, which proves that the language change might indeed resemble a nonlinear phase change scenario. We also extend the original Piotrowski's approach by proposing polynomial logistic regression for these cases which can hardly be described by its standard version. Also, we propose to consider individual language change cases jointly, in order to inspect their possible collinearity or, more likely, their different dynamics in the function of time. Last but not least, we evaluate our results by testing the influence of the subcorpus size on the model's goodness-of-fit.
Multi-output machine learning models for kinetic data evaluation : A Fischer–Tropsch synthesis case study
Machine learning model like Lasso regression is not sufficient for multi-output Fischer Tropsch synthesis prediction. Artificial Neural Network regression able to capture complex non-linearity in Fischer Tropsch synthesis kinetic data. Shap interpretation technique finds process variable ranking in model prediction. Predicting the impact of input process variables on chemical processes is key to assess their performance of the latter. Models explaining this impact through a mechanistic approach are rarely readily available, complex in nature and/or require long development time.
Theoretically Accurate Regularization Technique for Matrix Factorization based Recommender Systems
Regularization is a popular technique to solve the overfitting problem of machine learning algorithms. Most regularization technique relies on parameter selection of the regularization coefficient. Plug-in method and cross-validation approach are two most common parameter selection approaches for regression methods such as Ridge Regression, Lasso Regression and Kernel Regression. Matrix factorization based recommendation system also has heavy reliance on the regularization technique. In this paper, we prove that such approach of selecting regularization coefficient is invalid, and we provide a theoretically accurate method that outperforms the most widely used approach in both accuracy and fairness metrics.
On Learning Mixture of Linear Regressions in the Non-Realizable Setting
Ghosh, Avishek, Mazumdar, Arya, Pal, Soumyabrata, Sen, Rajat
While mixture of linear regressions (MLR) is a well-studied topic, prior works usually do not analyze such models for prediction error. In fact, {\em prediction} and {\em loss} are not well-defined in the context of mixtures. In this paper, first we show that MLR can be used for prediction where instead of predicting a label, the model predicts a list of values (also known as {\em list-decoding}). The list size is equal to the number of components in the mixture, and the loss function is defined to be minimum among the losses resulted by all the component models. We show that with this definition, a solution of the empirical risk minimization (ERM) achieves small probability of prediction error. This begs for an algorithm to minimize the empirical risk for MLR, which is known to be computationally hard. Prior algorithmic works in MLR focus on the {\em realizable} setting, i.e., recovery of parameters when data is probabilistically generated by a mixed linear (noisy) model. In this paper we show that a version of the popular alternating minimization (AM) algorithm finds the best fit lines in a dataset even when a realizable model is not assumed, under some regularity conditions on the dataset and the initial points, and thereby provides a solution for the ERM. We further provide an algorithm that runs in polynomial time in the number of datapoints, and recovers a good approximation of the best fit lines. The two algorithms are experimentally compared.
Day 15–60 days of Data Science and Machine Learning
Hope you all had a great Halloween weekend [ I dressed up as "Mother of Dragons" along with my cool " Game of thrones" techie friends];) #winteriscoming. Let's get back and learn some more data science and machine learning. I hope you all have already grasped the Python essentials, Statistics and Maths from day 1 -- day 8(links shared below), Pandas part 1 and part 2 on Day 9, Day 10, Numpy as Day 11, Data Preprocessing Part 1 as Day 12, Data Preprocessing part 2 as Day 13th, Hands on Regression Part 1 as Day 14th. In this post we will cover how we can implement Regression -- part 2 as Day 15. The Linear Regression method is basically a linear approach for modeling the relationship between a scalar dependent variable y and one or more explanatory variables (or independent variables) as it just minimizes the least squares error: for one object target y x T * w, where w is model's weights.