Regression
Trend Following with Logistic Regression
In this post, we'll cover a pragmatic logistic regression classifier to mimic a trend following strategy for the S&P 500 ETF, SPY. The pipeline takes in daily prices for SPY along with several SPDR sector ETFs and macro ETFs for gold, Yen, Swiss Franc etc. Once all Open, High, Low, Close, and Volume data has been received from yfinance, a feature space (the set of columns if thinking in a spreadsheets world) is built using select indicators included in TA-lib. The features are then reduced to 4 n-components with Principal Component Analysis; the model is trained on these n principal components, using ground truth labels generated by a brute force optimized dual moving average crossover. Initially, I opted to use the default boundary of .5 for the binary classification. On visual inspection, there is a gap in this logic -- as the classifier appears exceedingly optimistic (subjective).
Sampling To Improve Predictions For Underrepresented Observations In Imbalanced Data
Kjรฆrsgaard, Rune D., Grรธnberg, Manja G., Clemmensen, Line K. H.
Data imbalance is common in production data, where controlled production settings require data to fall within a narrow range of variation and data are collected with quality assessment in mind, rather than data analytic insights. This imbalance negatively impacts the predictive performance of models on underrepresented observations. We propose sampling to adjust for this imbalance with the goal of improving the performance of models trained on historical production data. We investigate the use of three sampling approaches to adjust for imbalance. The goal is to downsample the covariates in the training data and subsequently fit a regression model. We investigate how the predictive power of the model changes when using either the sampled or the original data for training. We apply our methods on a large biopharmaceutical manufacturing data set from an advanced simulation of penicillin production and find that fitting a model using the sampled data gives a small reduction in the overall predictive performance, but yields a systematically better performance on underrepresented observations. In addition, the results emphasize the need for alternative, fair, and balanced model evaluations.
Consumer adoption of telemedicine in 2021
Thank you to the Stanford Center of Digital Health for their continued collaboration on this work, with special gratitude to Natasha Din, MD, Clark Seninger, MBA, Sravya Rallapalli, Ashish Sarraju, MD, James Tooley, MD, Krishna Pundi, MD, Mario Funes-Hernandez, MD, and Mintu Turakhia, MD. Nearly two years into the COVID-19 pandemic, more consumers have used telemedicine than ever before. Venture investment in telemedicine is up, and big and small players are making land grabs for their share of the market, with many rolling out virtualโfirst care offerings. So with these accelerants--balanced with the full return of in-person care--what's the state of telemedicine? To answer this question and many more, we have surveyed U.S. adults every year since 2015 to check in with consumers and their relationship to digital health.
Variable Selection and Regularization via Arbitrary Rectangle-range Generalized Elastic Net
Ding, Yujia, Peng, Qidi, Song, Zhengming, Chen, Hansen
We introduce the arbitrary rectangle-range generalized elastic net penalty method, abbreviated to ARGEN, for performing constrained variable selection and regularization in high-dimensional sparse linear models. As a natural extension of the nonnegative elastic net penalty method, ARGEN is proved to have variable selection consistency and estimation consistency under some conditions. The asymptotic behavior in distribution of the ARGEN estimators have been studied. We also propose an algorithm called MU-QP-RR-W-$l_1$ to efficiently solve ARGEN. By conducting simulation study we show that ARGEN outperforms the elastic net in a number of settings. Finally an application of S&P 500 index tracking with constraints on the stock allocations is performed to provide general guidance for adapting ARGEN to solve real-world problems.
Triangulation candidates for Bayesian optimization
Gramacy, Robert B., Sauer, Annie, Wycoff, Nathan
Bayesian optimization is a form of sequential design: idealize input-output relationships with a suitably flexible nonlinear regression model; fit to data from an initial experimental campaign; devise and optimize a criterion for selecting the next experimental condition(s) under the fitted model (e.g., via predictive equations) to target outcomes of interest (say minima); repeat after acquiring output under those conditions and updating the fit. In many situations this "inner optimization" over the new-data acquisition criterion is cumbersome because it is non-convex/highly multi-modal, may be non-differentiable, or may otherwise thwart numerical optimizers, especially when inference requires Monte Carlo. In such cases it is not uncommon to replace continuous search with a discrete one over random candidates. Here we propose using candidates based on a Delaunay triangulation of the existing input design. In addition to detailing construction of these "tricands", based on a simple wrapper around a conventional convex hull library, we promote several advantages based on properties of the geometric criterion involved. We then demonstrate empirically how tricands can lead to better Bayesian optimization performance compared to both numerically optimized acquisitions and random candidate-based alternatives on benchmark problems.
The Maths Behind Linear Regression
Let us discuss Linear Regression, a type of Supervised Learning algorithm often used in Data Science and other ML related predictive models, and the maths behind it. Feature data values are also called independent variables because they are not influenced by anything, they are just the property of that particular dataset. Similarly target data values are also called dependent variables because they are in some way related to the feature or dependent variables. We know that our data will not all be related in the same linear manner. Based on this, our task in Linear Regression is to find the best possible relationship for which the error or deviation of the actual target from the target that we get from our relationship is as small as possible.
Artificial Intelligence and Design of Experiments for Assessing Security of Electricity Supply: A Review and Strategic Outlook
Priesmann, Jan, Mรผnch, Justin, Ridha, Elias, Spiegel, Thomas, Reich, Marius, Adam, Mario, Nolting, Lars, Praktiknjo, Aaron
Assessing the effects of the energy transition and liberalization of energy markets on resource adequacy is an increasingly important and demanding task. The rising complexity in energy systems requires adequate methods for energy system modeling leading to increased computational requirements. Furthermore, with complexity, uncertainty increases likewise calling for probabilistic assessments and scenario analyses. To adequately and efficiently address these various requirements, new methods from the field of data science are needed to accelerate current methods. With our systematic literature review, we want to close the gap between the three disciplines (1) assessment of security of electricity supply, (2) artificial intelligence, and (3) design of experiments. For this, we conduct a large-scale quantitative review on selected fields of application and methods and make a synthesis that relates the different disciplines to each other. Among other findings, we identify metamodeling of complex security of electricity supply models using AI methods and applications of AI-based methods for forecasts of storage dispatch and (non-)availabilities as promising fields of application that have not sufficiently been covered, yet. We end with deriving a new methodological pipeline for adequately and efficiently addressing the present and upcoming challenges in the assessment of security of electricity supply.
Amazon SageMaker Model Monitor: A System for Real-Time Insights into Deployed Machine Learning Models
Nigenda, David, Karnin, Zohar, Zafar, Muhammad Bilal, Ramesha, Raghu, Tan, Alan, Donini, Michele, Kenthapadi, Krishnaram
With the increasing adoption of machine learning (ML) models and systems in high-stakes settings across different industries, guaranteeing a model's performance after deployment has become crucial. Monitoring models in production is a critical aspect of ensuring their continued performance and reliability. We present Amazon SageMaker Model Monitor, a fully managed service that continuously monitors the quality of machine learning models hosted on Amazon SageMaker. Our system automatically detects data, concept, bias, and feature attribution drift in models in real-time and provides alerts so that model owners can take corrective actions and thereby maintain high quality models. We describe the key requirements obtained from customers, system design and architecture, and methodology for detecting different types of drift. Further, we provide quantitative evaluations followed by use cases, insights, and lessons learned from more than 1.5 years of production deployment.
Understanding Gradient Descent with simple mathematical intuition
In simple language, the gradient descent is an ML optimization strategy which facilitates the ML model to find the minimum loss (cost) function which relates to the optimal variable parameters. Let's understand the concept in detail by applying it on one of the most regression algorithms that ML engineers and Data scientists use, that is Linear Regression. For ease of understanding Gradient descent, we will use simple or univariate linear regression. Here, we are focusing on determining the relationship between one independent variable and one dependent variable(target variable). A univariate linear regression is mathematically represented by y mx c, where'y' is the dependent variable and'x' is the independent or target variable.
Test Set Sizing Via Random Matrix Theory
This paper uses techniques from Random Matrix Theory to find the ideal training-testing data split for a simple linear regression with m data points, each an independent n-dimensional multivariate Gaussian. It defines "ideal" as satisfying the integrity metric, i.e. the empirical model error is the actual measurement noise, and thus fairly reflects the value or lack of same of the model. This paper is the first to solve for the training and test size for any model in a way that is truly optimal. The number of data points in the training set is the root of a quartic polynomial Theorem 1 derives which depends only on m and n; the covariance matrix of the multivariate Gaussian, the true model parameters, and the true measurement noise drop out of the calculations. The critical mathematical difficulties were realizing that the problems herein were discussed in the context of the Jacobi Ensemble, a probability distribution describing the eigenvalues of a known random matrix model, and evaluating a new integral in the style of Selberg and Aomoto. Mathematical results are supported with thorough computational evidence. This paper is a step towards automatic choices of training/test set sizes in machine learning.