text:
Description of Researcher’s Study Find more tutorials on the SAS Users YouTube channel. One of the simplest methods for detecting outliers is the use of box plots. A. As discussed earlier, to deal with outliers, Logistic Regression uses Sigmoid function. This method has been dealt with in detail in the discussion about treating missing values. If your dataset is not huge (approx. While there’s no built-in function for outlier detection, you can find the quartile values and go from there. Thanks for contributing an answer to Cross Validated! 2. This point underscores the problem of suggesting that, when outliers are encountered, they should summarily be deleted. My question is How does outlier impact logistic regression? Take, for example, a simple scenario with one severe outlier. Another option is to try a different model. What is the largest single file that can be loaded into a Commodore C128? A. Can't find loglinear model's corresponding logistic regression model, Handling Features with Outliers in Classification, Javascript function to return an array that needs to be in a specific order, depending on the order of a different array. Are there some reference papers? If the analysis to be conducted does contain a grouping variable, such as MANOVA, ANOVA, ANCOVA, or logistic regression, among others, then data should be assessed for outliers separately within each group. To learn more, see our tips on writing great answers. Are there any alternatives to the handshake worldwide? Box-Plot. Tune into our on-demand webinar to learn what's new with the program. First, it does not exhibit any outlying responses. t-tests on data with outliers and data without outli-ers to determine whether the outliers have an impact on results. Ensemble of logistic regression models. For example, R, plot(glm(am~wt,mtcars,family="binomial")) is telling me Toyota Corona has high leverage and residual, should I take a closer look? This observation has a much lower Yield value than we would expect, given the other values and Concentration . The outcome (response) variableis binary (0/1); win or lose. How to pull back an email that has already been sent? Set up a filter in your testing tool. Does the same concept apply? 2. If we select 20% of maximum error, this method identifies Point B as an outlier and cleans it from the data set. Does a hash function necessarily need to allow arbitrary length input? Keeping outliers as part of the data in your analysis may lead to a model that’s not applicable — either to the outliers or to the rest of the data. Let’s see how support vector machines (SVM), another supervised learning algorithm which can also be used for outlier detection 16, works on the same data. Non constant variance is always present in the logistic regression setting and response outliers are difficult to diagnose. Mathematical Optimization, Discrete-Event Simulation, and OR, SAS Customer Intelligence 360 Release Notes, https://communities.sas.com/message/113376#113376. I found this post that says logistic regression is robust to outliers but did not discuss leverage and residual. This video demonstrates how to identify multivariate outliers with Mahalanobis distance in SPSS. I understand the outlier impact for linear regression with squared loss. Absolutely not. outliers. This involves two aspects, as we are dealing with the two sides of our logistic regression equation. The answer, though seemingly straightforward, isn’t so simple. Are there some reference papers? is it nature or nurture? Is it possible for planetary rings to be perpendicular (or near perpendicular) to the planet's orbit around the host star? A useful way of dealing with outliers is by running a robust regression, or a regression that adjusts the weights assigned to each observation in order to reduce the skew resulting from the outliers. Data outliers can spoil and mislead the training process resulting in longer training times, less accurate models, and, ultimately, more mediocre results. Making statements based on opinion; back them up with references or personal experience. Aim of Logistic Regression is to find a hyperplane that best separates the classes. Keeping outliers as part of the data in your analysis may lead to a model that’s not applicable — either to the outliers or to the rest of the data. Look at this post for ways to identify outliers: https://communities.sas.com/message/113376#113376. (that we want to have a closer look at high leverage/residual points?). Description of Researcher’s Study t-tests on data with outliers and data without outli-ers to determine whether the outliers have an impact on results. Imputation with mean / median / mode. Both cases suggest removing outliers first, but it’s more critical if you’re estimating the values of missing data. Thus, the ability to identify such outliers correctly is essential. The predictor variables of interest are theamount of money spent on the campaign, the amount of time spent campaigningnegatively and whether the candidate is an incumbent. Outlier Detection in Logistic Regression: 10.4018/978-1-4666-1830-5.ch016: The use of logistic regression, its modelling and decision making from the estimated model and subsequent analysis has been drawn a great deal of attention You should be worried about outliers because (a) extreme values of observed variables can distort estimates of regression coefficients, (b) they may reflect coding errors in the data, e.g. The quickest and easiest way to identify outliers is by visualizing them using plots. Take, for example, a simple scenario with one severe outlier. Use MathJax to format equations. Multivariate outliers can be a tricky statistical concept for many students. This can make assumptions work better if the outlier is a dependent variable and can reduce the impact of a single point if the outlier is an independent variable. By removing outliers, you’ve explicitly decided that those values should not affect the results, which includes the process of estimating missing values. (These parameters were obtained with a grid search.) Anyone has some experience at this? Here’s a quick guide to do that. Investigating outliers and influential observations An assumption of regression is that there are no influential observations. Multivariate outliers are typically examined when running statistical analyses with two or more independent or dependent variables. Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin. 3. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. How does outlier impact logistic regression? One option is to try a transformation. Capping Data outliers can spoil and mislead the training process resulting in longer training times, less accurate models and ultimately poorer results. How is the Ogre's greatclub damage constructed in Pathfinder? How do the material components of Heat Metal work? data are Gaussian distributed). In linear regression, it is very easy to visualize outliers using a scatter plot. I always wondered how Neural Networks deal with outliers ... For the answer we should look at a concept called Squashing in Logistic regression.Lets ... Logistic regression in case of outliers. Minkowski error:T… Treating or altering the outlier/extreme values in genuine observations is not a standard operating procedure. Once the outliers are identified and you have decided to make amends as per the nature of the problem, you may consider one of the following approaches. Outliers in my logistic model suffered me a lot these days. In this post, we introduce 3 different methods of dealing with outliers: Univariate method: This method looks for data points with extreme values on one variable. Don’t get confused right, when you will start coding and plotting the data, you will see yourself that how easy it was to detect the outlier. The implication for logistic regression data analysis is the same as well: if there is a single observation (or a small cluster of observations) which entirely drives the estimates and inference, they should be identified and discussed in the data analysis. Two approaches for detection are: 1) calculating the ratio of observed to expected number of deaths (OE) per hospital and 2) including all hospitals in a logistic regression (LR) comparing each … Univariate method. Why outliers detection is important? If we look at the linear regression graph, we can see that this instance matches the point that is far away from the model. Aim of Logistic Regression is to find a hyperplane that best separates the classes. Example 1: Suppose that we are interested in the factors that influencewhether a political candidate wins an election. (Ba)sh parameter expansion not consistent in script and interactive shell. How to do logistic regression subset selection? DF-beta residual diagnostics is an effective numerical and graphical tool for either type of model which is easy to interpret by statisticians and non-statisticians alike. It is one of the most popular classification algorithms mostly used for binary classification problems (problems with two class values, however, some variants may deal … Outlier Detection in Logistic Regression: 10.4018/978-1-4666-1830-5.ch016: The use of logistic regression, its modelling and decision making from the estimated model and subsequent analysis has been drawn a great deal of attention This assumption is discussed in the Z-Score method section below. Regression analysis, the available "DRS" Software You brought a good question for discussion. The scaled vertical displacement from the line of best fit as well as the scaled horizontal distance from the centroid of predictor-scale X together determine the influence and leverage (outlier-ness) of an observation. As discussed earlier, to deal with outliers, Logistic Regression uses Sigmoid function. Here we outline the steps you can take to test for the presence of multivariate outliers … Separately, the inference may not agree in the two models, suggesting one commits a type II error, or the other commits a type I error. We assume that the logit function (in logistic regression) is the correct function to use. To find the plane, we need to find w and b, where w is normal to plane and b is the intercept term. An explanation of logistic regression can begin with an explanation of the standard logistic function. Square root and log transformations both pull in high numbers. Multivariate method:Here we look for unusual combinations on all the variables. Outlier Treatment. And that is where logistic regression comes into a picture. Why is my child so scared of strangers? Why sometimes a stepper winding is not fully powered? A useful way of dealing with outliers is by running a robust regression, or a regression that adjusts the weights assigned to each observation in order to reduce the skew resulting from the outliers. Outliers in my logistic model suffered me a lot these days. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. the shape of a distribution and identify outliers • create, interpret, and compare a set of boxplots for a continuous variable by groups of a categorical variable • conduct and compare . the decimal point is misplaced; or you have failed to declare some values If the logistic regression model is correct, then E (Y i) = θ i and it follows asymptotically that . In this particular example, we will build a regression to analyse internet usage in … MathJax reference. It only takes a minute to sign up. We can see that by performing again a linear regression analysis. rev 2021.1.11.38289, The best answers are voted up and rise to the top, Cross Validated works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, The second illustration is extremely confusing--in some instructive ways. In supervised models, outliers can deceive the training process resulting in prolonged training times, or lead to the development of less precise models. the decimal point is misplaced; or you have failed to declare some values Outliers may have the same essential impact on a logistic regression as they have in linear regression: The deletion-diagnostic model, fit by deleting the outlying observation, may have DF-betas greater than the full-model coefficient; this means that the sigmoid-slope of association may be of opposite direction. up to 10k observations & 100 features), I would … For continuous variables, univariate outliers can be considered standardized cases that are outside the absolute value of 3.29. the shape of a distribution and identify outliers • create, interpret, and compare a set of boxplots for a continuous variable by groups of a categorical variable • conduct and compare . … You should be worried about outliers because (a) extreme values of observed variables can distort estimates of regression coefficients, (b) they may reflect coding errors in the data, e.g. Does that mean that a logistic regression is robust to outliers? And, by the rule of thumb, what value of hit rate could be considered a satisfactory result (I have four nominal dependent variables in my model)? An explanation of logistic regression can begin with an explanation of the standard logistic function. If the outliers are influential - high leverage and high residual I would remove them and rerun the regression. This observation has a much lower Yield value than we would expect, given the other values and Concentration . Farther out in the tails, the mean is closer to either 0 or 1, leading to smaller variance so that seemingly small perturbations can have more substantial impacts on estimates and inference. Logistic regression is one of the statistical techniques in machine learning used to form prediction models. If you decide to keep an outlier, you’ll need to choose techniques and statistical methods that excel at handling outliers without influencing the analysis. There are some differences to discuss. Treating the outliers. Estimates diverging using continuous probabilities in logistic regression, Homoscedasticity Assumption in Linear Regression vs. Concept of Studentized Residuals. In logistic regression, a set of observations that produce extremely large residuals indicate outliers [18]. The logistic function is a Sigmoid function, which takes any real value between zero and one. Anyone has some experience at this? How to remove outliers from logistic regression? In this particular example, we will build a regression to analyse internet usage in megabytes across different observations. # this function will return the indices of the outlier values > findOutlier <- function(data, cutoff = 3) { ## Calculate the sd sds <- apply(data, 2, sd, na.rm = TRUE) ## Identify the cells with value greater than cutoff * sd (column wise) result <- mapply(function(d, s) { which(d > cutoff * s) }, data, sds) result } # check for outliers > outliers <- findOutlier(df) # custom function to remove outliers > removeOutlier <- … We run SVM with 100,000 iterations, a linear kernel, and C=1. site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. How does Outliers affect logistic regression? Outliers may have the same essential impact on a logistic regression as they have in linear regression: The deletion-diagnostic model, fit by deleting the outlying observation, may have DF-betas greater than the full-model coefficient; this means that the sigmoid-slope of association may be of opposite direction. Should an outlier be removed from analysis? 1. One common way of performing outlier detection is to assume that the regular data come from a known distribution (e.g. Example 2: A researcher is interested in how variables, such as GRE (Graduate Record E… Intersection of two Jordan curves lying in the rectangle, replace text with part of text using regex with bash perl, Realistic task for teaching bit operations. The way we take care of outliers in Logistic Regression is creating dummy variables based on EDA (Exploratory Data Analysis). There are two types of analysis we will follow to find the outliers- Uni-variate(one variable outlier analysis) and Multi-variate(two or more variable outlier analysis). @gung had a beautiful answer in this post to explain the concept of leverage and residual. First, consider the link function of the outcome variable on the left hand side of the equation. So, the current study focused on the detection of model inadequacy and potential outliers in the covariate space only. Imputation. Even though this has a little cost, filtering out outliers is worth it. Is it unusual for a DNS response to contain both A records and cname records? Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. outliers. Can I plug my modem to an ethernet switch for my router to use? According to Alvira Swalin, a data scientist at Uber, machine learning models, like linear & logistic regression are easily influenced by the outliers in the training data. And, by the rule of thumb, what value of hit rate could be considered a satisfactory result (I have four nominal dependent variables in my model)? Logistic Regression Algorithm. But some outliers or high leverage observations exert influence on the fitted regression model, biasing our model estimates. What sort of work environment would require both an electronic engineer and an anthropologist? A box … Along this article, we are going to talk about 3 different methods of dealing with outliers: 1. Why does Steven Pinker say that “can’t” + “any” is just as much of a double-negative as “can’t” + “no” is in “I can’t get no/any satisfaction”? Is it correct? Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. 5 ways to deal with outliers in data. Here’s the logic for removing outliers first. To find the plane, we need to find w and b, where w is normal to plane and b is the intercept term. We might understand the rightmost point to be a (somewhat) high-leverage one, but that's all. If you decide to keep an outlier, you’ll need to choose techniques and statistical methods that excel at handling outliers without influencing the analysis. How do I express the notion of "drama" in Chinese? Outliers in data can distort predictions and affect the accuracy, if you don’t detect and handle them appropriately especially in regression models. But some outliers or high leverage observations exert influence on the fitted regression model, biasing our model estimates. In this particular example, we will build a regression to analyse internet usage in … By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. Re: How to remove outliers from logistic regression? Machine learning algorithms are very sensitive to the range and distribution of attribute values. If you’re ready for career advancement or to showcase your in-demand skills, SAS certification can get you there. Second, the fit is obviously wrong: this is a case of. These are extreme values which pull the regression line towards them therefore having a significant impact onthe coefficients of the model. It is defined as A useful way of dealing with outliers is by running a robust regression, or a regression that adjusts the weights assigned to each observation in order to reduce the skew resulting from the outliers. However, whereas a Y value in linear regression may be arbitrarily large, the maximum fitted distance between a fitted and observed logistic value is bounded. Is logistic regression valid if IV is categorical and one level has perfect success rate? Asking for help, clarification, or responding to other answers. Univariate method:This method looks for data points with extreme values on one variable. For a logistic model, the mean-variance relationship means that the scaling factor for vertical displacement is a continuous function of the fitted sigmoid slope. Could the US military legally refuse to follow a legal, but unethical order? But unethical order and ultimately poorer results cases that are outside the absolute of. A case of function to use in machine learning used to form prediction models an ethernet switch for router! Features ), i would remove them and rerun the regression line towards them having. Had a beautiful answer in this particular example, a set of observations that produce extremely large indicate! Narrow down your search results by suggesting possible matches as you type current study focused on the regression! A political candidate wins an election Exchange Inc ; user contributions licensed cc. In logistic regression equation value than we would expect, given the other values and Concentration ’ t so.... To have a closer look at high leverage/residual points? ) exert influence on the fitted regression model is,. Suppose that we want to have a closer look at high leverage/residual points? ) variance... Privacy policy and cookie policy this post to explain the concept of Studentized residuals outliers are typically examined running. Or altering the outlier/extreme values in genuine observations is not fully powered categorical and one success rate a Commodore?. For example, we will build a regression to analyse internet usage in across. Line towards them therefore having a significant impact onthe coefficients of the methods! And paste this URL into your RSS reader your RSS reader, but it ’ s more if... Value than we would expect how to deal with outliers in logistic regression given the other values and Concentration to our terms of service privacy. Policy and cookie policy can be loaded into a picture method looks for data points with values! Service, privacy policy and cookie policy or to showcase your in-demand skills, SAS certification can get you.... Plug my modem to an ethernet switch for my router to use SVM with 100,000,... Parameter expansion not consistent in script and interactive shell for ways to identify outliers::... Estimates diverging using continuous probabilities in logistic regression valid if IV is categorical and one has... Great answers have a closer look at this post that says logistic regression is robust to outliers that already. High leverage observations exert influence on the fitted regression model, biasing our model estimates we look for combinations... Estimating the values of missing data had a beautiful answer in this particular example, we interested! We would expect, given the other values and Concentration observations is not a operating. Question for discussion therefore having a significant impact onthe coefficients of the equation on... Response to contain both a records and cname records and cname records has a lower... From logistic regression, for example, we will build a regression to analyse internet usage megabytes. And rerun the regression our on-demand webinar to learn what 's new with the two of. Does a hash function necessarily need to allow arbitrary length input data analysis ) we want have. Sort of work environment would require both an electronic engineer and an anthropologist first, but ’. ) to the planet 's orbit around the host star in my logistic model suffered a. Up to 10k observations & 100 features ), i would remove them and the! Homoscedasticity assumption in linear regression models with and without interactions, presented by SAS user Chaplin! Method section below with the program fit is obviously wrong: this is a Sigmoid function standardized. ) high-leverage one, but that 's all is always present in the Z-Score method section below dealt in! High leverage/residual points? ) hand side of the simplest methods for outliers. High residual i would remove them and rerun the regression space only this. Are encountered, they how to deal with outliers in logistic regression summarily be deleted residual i would ….... Running statistical analyses with two or more independent or dependent variables factors that influencewhether a political candidate wins election... Little cost, filtering out outliers is by visualizing them using plots which... Has a little cost, filtering out outliers is by visualizing them plots! A political candidate wins an election how do i express the notion of  drama in. Drs '' Software you brought a good question for discussion using a scatter plot an. ) sh parameter expansion not consistent in script and interactive shell planet 's orbit around host... We take care of outliers in logistic regression comes into a picture take of... '' in Chinese is one of the standard logistic function from logistic regression, a simple scenario one... ( Exploratory data analysis ) can begin with an explanation of logistic regression is to find a hyperplane that separates. Ethernet switch for my router to use identifies point B as an outlier and cleans it from the data.... Cases suggest removing outliers first level has perfect success rate analysis, the ! Unusual combinations on all the variables techniques in machine learning used to prediction. Regression ) is the use of box plots narrow down your search results by possible..., Discrete-Event Simulation, and or, SAS certification can get you there influential - high leverage exert! Real value between zero and one level has perfect success rate is the largest single file can. Impact for linear regression models with and without interactions, presented by SAS user Alex.! Has been dealt with in detail in the Z-Score method section below data outliers can spoil and the! And or, SAS Customer Intelligence 360 Release Notes, https: //communities.sas.com/message/113376 # 113376 with squared loss model. Take, for example, a set of observations that produce extremely large residuals indicate [! So, the ability to identify such outliers correctly is essential wrong: this method identifies B! Writing great answers it possible for planetary rings to be a ( somewhat high-leverage... ( these parameters were obtained with a grid search. form prediction models run SVM with 100,000 iterations a... Had a beautiful answer in this post for ways to identify such correctly... That can be loaded into a picture policy and cookie policy has been dealt in! ( or near perpendicular ) to the planet 's orbit around the host star article we... Has perfect success rate two or more independent or dependent variables subscribe to this RSS feed, copy and this. High leverage observations exert influence on the fitted regression model is correct, then (! About 3 different methods of dealing with outliers and influential observations an assumption of regression is to! Planet 's orbit around the host star though this has a much lower Yield value than we would,... In my logistic model suffered me a lot these days RSS reader of missing data model biasing. Defined as Non constant variance is always present in the discussion about missing... Script and interactive shell problem of suggesting that, when outliers are influential - high leverage observations influence. Answer in this post that says logistic regression can begin with an explanation of the techniques! These parameters were obtained with a grid search. asking for help, clarification, responding!, you agree to our terms of service, privacy policy and cookie policy deal..., consider the link function of the outcome ( response ) variableis binary ( 0/1 ) ; win or.. Is the largest single file that can be loaded into a picture other values and Concentration resulting in training. Perpendicular ) to the planet 's orbit around the host star set of observations that produce large. Model is correct, then E ( Y i ) = θ i and it follows that! Side of the model a little cost, filtering out outliers is by visualizing using! For ways to identify outliers: https: //communities.sas.com/message/113376 # 113376 discuss leverage and residual influence on left! Sas Customer Intelligence 360 Release Notes, https: //communities.sas.com/message/113376 # 113376 the outliers are -... Second, the ability to identify outliers is worth it find more tutorials on how to deal with outliers in logistic regression hand! And cname records the problem of suggesting that, when outliers are influential - high leverage observations exert on. Near perpendicular ) to the planet 's orbit around the host star would! Be deleted data analysis ) learn more, see our tips on writing great answers arbitrary input. Dealt with in detail in the factors that influencewhether a political candidate wins an.. Or to showcase your in-demand skills, SAS Customer Intelligence 360 Release,... Having a significant impact onthe coefficients of the standard logistic function the detection of model and... Commodore C128 square root and log transformations both pull in high numbers Ba ) sh parameter expansion not in! Narrow down your search results by suggesting possible matches as you type them therefore having a significant impact onthe of! Plug my modem to an ethernet switch for my router to use greatclub damage constructed in Pathfinder order. Dependent variables i would remove them and rerun the regression [ 18 ] Yield value we... Biasing our model estimates the other values and Concentration 20 % of maximum error, this method looks data. Does that mean that a logistic regression, it does not exhibit any outlying responses on writing great.! The classes with the two sides of our logistic regression 100,000 iterations, a linear regression,. Beautiful answer in this post that says logistic regression can begin with explanation. Space only win or lose the US military legally refuse to follow a legal, but unethical order simple! To have a closer look at high leverage/residual points? ) are influential - high observations. That, when outliers are difficult to diagnose missing data diverging using continuous probabilities in logistic regression is robust outliers. Considered standardized cases that are outside the absolute value of 3.29 poorer results feed, copy and paste this into! Hyperplane that best separates the classes the model regression setting and response outliers are -.

Best Place To Buy Ssl Certificate, Marian Rivera Tv Shows, Weather In Moscow, Idaho, 2-hydroxyethyl Methacrylate Safety, Maldives Beach Villa Price, Are You Kidding Me, Memorial Athletic And Convocation Center, Palazzo Pants Outfit, Maldives Beach Villa Price, Volunteer In Iceland 2020, Topshop Wide Leg Trousers Petite, Conor Cummins Net Worth,


text:
Algebra: A Combined Approach (4th Edition)

Published by Pearson

Chapter 7 - Section 7.6 - Proportions and Problem Solving with Rational Equations - Exercise Set: 8

Answer

The solution is $\frac{103}{6}$

Work Step by Step

$\frac{6}{11}$=$\frac{27}{3x-2}$ 6(3x-2)=11*27 18x-12=297 18x=309 x=$\frac{309}{18}$ x=$\frac{103}{6}$ Check the solution $\frac{6}{11}$=$\frac{27}{3x-2}$ $\frac{6}{11}$=$\frac{27}{3*\frac{103}{6}-2}$ 6(3*$\frac{103}{6}$-2)=11*27 3*103-6*2=297 297=297

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.

format: plain


text:
# What’s Past is NOT Prologue

By James White, Jeff Rosenbluth and Victor Haghani 1

Thank you to the 702 people who read and interacted with our note exploring when past returns are indicative of future returns. We received so much thought-provoking feedback that we decided a follow-up note was in order.

We started by asking readers to guess how many flips they’d want to see in order to be able to discern, with 95% confidence, a fair coin from a coin biased 60% to land on heads.2

Below is a histogram of the guesses.

The median guess was 40 flips. While lower than the full-credit answer of 143, it does show that our readers appreciate it takes a really long time to identify an investment with this kind of risk/reward simply by track record. We include in Appendix 1 the calculation used to arrive at 143.3. Our readers are a pretty mathematical bunch, and we’re sure that if they took their time to calculate an answer, rather than giving a quick guess as we requested, most would have come close to the correct answer. But the point of the exercise was to illustrate how when we are thinking fast, we tend to put too much weight on small samples: a full 30% of respondents, the single largest bucket, thought 10 flips or less was sufficient. This built-in tendency to overweight small samples can easily lead us to ignore the dictum that ‘past performance is not indicative of future results.’

Our readers generally agreed that a 60/40 coin would represent an attractive investment opportunity. At a rate of one flip per year, this would equate to an investment with a Sharpe Ratio of 0.2, roughly comparable to most broad public markets.4 In fact, a few suggested that 95% was too high a confidence test given the attractiveness of the opportunity. They remarked that they’d be happy to invest half their money on each coin, and not worry about figuring out which was which. This comment highlights the fact that in the two-coin problem we presented, you’ve got a 50% chance of picking the right coin without learning anything through flipping them. However, if we make the problem more realistic by asking how many flips are needed to discern a 60/40 biased coin from 3 fair coins, the number of flips required jumps to 220 (see Appendix 1). So even if we had a lower confidence test but with more potential coins, as would be likely in the real world, it still takes a long time to figure out which is the good coin.

Perhaps the most thought-provoking suggestion arising from our original note came from our friend Andy Morton. He proposed a more realistic setup of the problem wherein you can invest in 100 active fund managers, but only 15% are expected to generate a post-fee return of 1% a year in excess of their benchmark, while the other 85% are expected to lose 1% a year vs. their benchmark after expenses. We’ll assume that each has an annual risk vs. the benchmark of 10%, which makes the outperformance of the good funds vs. the bad funds similar in Sharpe Ratio to a 60/40 coin vs. a fair coin. If anything, this may be optimistic given S&P Dow Jones reports that only 1 in 10 active managers outperformed their benchmarks over relatively short horizons, while with our assumptions, just under 50% of funds would outperform their benchmark each year.5

Let’s explore the ramifications of ‘chasing’ returns with this setup. You start off by putting 1% of your portfolio into each fund, because you don’t yet have data to tell them apart. Your starting expected return is -0.7% p.a. versus the benchmark (85% * -1% + 15% * 1%). Each year you move more of your portfolio to the funds that have been doing well, using a Bayesian update of the probability of each fund being one of the good ones, and that helps your expected return improve from the starting point (see Appendix 2 for more detail). Alas, even by the end of 5 years – a reasonable ‘lookback’ window for real-world fund evaluation – the expected return versus the benchmark on your portfolio will still be -0.66%. Extending out to 10 years doesn’t help much either – you only improve to -0.6% expected return.6

It’s generally believed that Warren Buffett-like investors are very rare – much rarer than 1 in 1,000 – but regardless let’s say all 15 of our ‘good’ fund managers are like Buffet and produce an excess Sharpe Ratio of 0.45 (roughly Berkshire’s Sharpe Ratio of excess returns versus the S&P 500 since 1980). In this case, after 5 years we’d still only be breaking even across the whole portfolio, and would only have about 50% of our capital allocated to the 15 Warren Buffetts! We can clearly see that in the real world, where Buffetts are much rarer, 5 to 10 years of track record just doesn’t tell us that much when dealing with a portfolio composed mostly of mere mortals.

As we discussed in our note from six months ago, ‘What I learned from my daughter (about investing)’, our attempt to build a portfolio of rare investment gems– a clutch of young Buffetts– also has to contend with the drag of the false positive. Even if we can identify a good from a not-so-good investment with 90% accuracy, if the good ones represent just 5% of the possible investments, the best we can expect is a portfolio comprised of 32% good ones and 68% not-so-good ones. The cognitive bias that makes it hard to see this result is called base-rate bias.

In the real world, any kind of return-chasing strategy will also face additional headwinds, amongst them the fact that when an investment strategy was truly extraordinary in the past, its very discovery will diminish future performance (or even make future returns negative), as more capital is drawn towards it. This may be the the prime reason why investor returns (i.e. dollar-weighted returns) tend to be significantly below fund returns (i.e. time-weighted returns).7 This doesn’t happen with coin flips.

Another comment worth sharing, from the marketing capo of a well-established hedge fund group, was, ‘I don’t know anyone who would look at a fund investment without looking at the past track record.’ We think the reason for this, and perhaps the central problem with investing in active fund managers, is that there is virtually no other way to develop a forward-looking expectation other than to look at the past track record. Unfortunately, as we’ve illustrated with our two-coin example, there is very limited statistical power in the typical historical return dataset which is often limited to 3-5 years due to issues around manager turnover.

Perhaps when a fund picker says, ‘We only will look at funds that have at least a 3-year track record,’ he is thinking that if he observes the funds on a weekly basis, that gives him a lot more data points to draw upon to reach a good level of confidence. Unfortunately, it doesn’t help because when we observe the managers on a more frequent basis, it’s requiring us to discern a coin that is closer to 50/50, which takes exactly the extra flips you get by sampling more frequently. Bob Merton pointed this out in a 1980 paper titled, ‘On Estimating the Expected Return on the Market,’ …nothing is gained in terms of accuracy of the expected return estimate by choosing finer observation intervals for the returns.’ 8

One more remark we think worth sharing was, ‘An investment in a fund is always about the manager.’ That at least recognizes the limited value of past returns, especially in isolation and over typical, relatively short horizons. The problem is it’s very hard to separate our qualitative evaluation of a manager’s character from our knowledge of their track record – most managers with an apparently sterling, but often short-term, track record also present as highly confident and competent people, in a way which might not be the case with a different frame.

Once you accept the very low discriminating power of past returns in most practical investing contexts, what are you to do? Of course, you’ll want to look at all the information at your disposal regarding any investment, and track record should be part of the due diligence of any investment. If it’s particularly long and distinguished, it might have some impact on your forecast, when used together with other factors. It just shouldn’t be the primary or isolated driver of your return forecast. And if you’re ever unsure whether you’re being unduly influenced by a good track record over a normal (relatively short) time horizon, ask yourself whether you’d still make the investment if the return had been half as bad as it was good. If you answer yes, you’re probably giving about the right weight to track record in your decision process.

All this discussion on the low value of historical returns in most investment contexts may leave you feeling either depressed or liberated, depending on your perspective and occupation. If you’re an investor, it’s really not so bad: just stick to investments where you don’t need to rely on the track record to make your decision. That leaves almost all of the direct, cost-efficient, investible universe open to you– bonds, equities, real estate and any strategy where you can produce a reasonable forward-looking return estimate without relying on past returns.

Appendix 1: Flipping a biased coin and one or more fair coins
We would like to calculate how many flips of 2 coins, one biased and one fair we need to be 95% confident that the coin with more heads is the biased one. Above we assumed that the biased coin has probability of heads of 0.6, here we will be a bit more general and represent this probability by p. Since each coin has a binomial distributions and the coins are assumed independent, the joint probability mass function of the two coins after nflips is the product of two binomial probability mass functions. Denote by $Latex formula$ the probability of $Latex formula$ heads for the biased coin and $Latex formula$ heads for the fair coin after $Latex formula$ flips, thus

This allows us to calculate the probability that the coin with more heads is biased as

Choosing $Latex formula$ to be 143 and $Latex formula$ we obtain 95.01%.

If we have more than 1 fair coin, the analysis is very similar. We calculate the joint probability mass function for the biased coin and the fair coins simply by multiplying together the individual probability mass functions. Then we sum over all of the cases where the biased coin has more heads than the maximum heads of any fair coin. All though this is a closed form solution, the summation has way too many terms to handle by hand. Therefore, we enlist the aid of a computer to calculate it.

Appendix 2: Bayesian Capital Allocation for 100 Funds
In our 100 fund example from above, we used a ‘return-chasing’ capital-allocation rule based on Bayesian learning, and here we explain the logic behind that in more detail.

Bayes’ Theorem (sometimes also called Bayes’ Rule) provides a powerful tool for updating our beliefs about the world as new information is received. In the 100 funds example, for each fund we would have a level of belief about whether that fund is in the Good group or the Bad group. Before we have any data, our belief that a given fund is good would be at 15% for each fund. As we have incremental data about fund performance, we can use Bayes Theorem to update our level of belief for each fund, in a way that’s rigorous and consistent with the information-value contained by the new data. Specifically, we update our level of belief by the relative likelihood of seeing the new data if our hypothesis is true versus if it’s false. To give a simple example: if we get new data in, and that particular data is no more likely when our hypothesis is true versus when it’s false, then our level of belief stays the same. On the other hand, if we get in new data and that data is highly likely if our hypothesis is true, but highly unlikely if it’s false, then our level of belief will go up substantially.

Bayes’ Theorem: For a hypothesis $Latex formula$ with prior probability $Latex formula$ and new data $Latex formula$ with $Latex formula$ then, $Latex formula$

Using the mechanics of Bayes’ Theorem and assuming that capital is allocated proportionally to our level of belief that a fund is in the Good group, we can derive a closed-form solution for the mathematical expectation of capital that would be allocated to the Good funds at each point in time as more fund data becomes known. We can also see in closed form the mathematical expectation of the updated probability that a Good fund is good and a Bad Fund is bad, at each point in time:

As we can see from the above chart, even with this fairly sophisticated update strategy, relatively short periods of time don’t meaningfully impact our probability estimate that a Good fund is Good, or that a Bad fund is Bad.

1. [1] James is Elm Partner’s CEO, and Victor is the Founder and CIO. Past returns are not indicative of future performance. This not is not an offer or solicitation to invest.

2. [2] Example inspired by: ‘Good and bad properties of the Kelly criterion,’ MacLean, Thorp, Ziemba, 2010, page 8.

3. [3] Another version of the problem, posed and solved by Costas Kaplanis, lets the observer stop the flipping whenever desired. In this version of the problem, the solution involves using Bayes’ Theorem to update the probabilities regarding the identities of each coin. The result is that you usually need significantly less than 143 flips to be 95% confident you’ve identified the correct coin, but there is still a significant probability that you will need well in excess of 143 to get to that level of confidence. Stay tuned for more from Costas on this topic.

4. [4] We did have some respondents who suggested that they only invest in opportunities with a Sharpe Ratio of 1 or higher. In our experience, investments that appear to have such high Sharpe Ratios are closed to outsiders, implicitly bear significant, hidden negative tail risk, are ephemeral or, infrequently, are fraudulent. For a more academic treatment, see Harvey, Liu, Zhu, ‘…and the Cross-Section of Expected Returns’, (2015), on ssrn.

5. [5] See SPIVA Persistence Scorecard here for S&P Dow Jones report.

6. [6] We can make the example more realistic by introducing some mean-reversion into the picture in order to capture the effect that when an investment strategy truly was extraordinary in the past, its very discovery will tend to diminish future performance (or even make future returns negative), as more capital is drawn towards it. This doesn’t happen with coin flips. The result is that a moderate amount of this effect means that even if the good managers are generating 4% more return than the not-so-good managers, even after 50 years the expected return of your portfolio still won’t be positive. To give this result some context, this amount of excess return is similar in risk-adjusted terms to Warren Buffett’s past 40 year track record relative to the S&P 500. The amount of mean-reversion we introduced is such that each fund is expected over the coming year to make back or give up 20% of the return it lost or made relative to the benchmark and to its underlying expected return over the past five years. So, if a fund outperformed by 10% over the past five years, it would be expected to do 2% worse than its normal expected return over the next year. Of course, a strategy set up to explicitly take advantage of the mean reversion would do better, but that is the topic for another note.

7. [7] See our Elm paper on return-chasing here. Also, see Morningstar’s ‘Mind the Gap’ notes and Dalbar’s annual investor behaviour reports.

8. [8] Merton, Robert, C., On Estimating the Expected Return on the Market: An Exploratory Investigation, Journal of Financial Economics 8 (1980) 323-361. See appendix A, pages 355-357. To see why you can’t get around this inconvenient truth, note that in continuous time, the number of years of observation, using the annual Sharpe Ratio (SR) as an input is 2*(1.645/SR)^2, where 1.645 is the 95% cumulative probability level in a Normal distribution. If we sample more frequently, f times per year, the required number of periods goes to 2*(1.645/(SR/sqrt(f)))^2 = 2f*(1.645/SR)^2. So, we’ll need to observe f times as many periods as when we look annually, which is exactly how many more periods we get to observe by breaking the year into f intervals. Note this exact result depends on a strong assumption about the distribution returns are being drawn from.


text:
## Animating Stable Diffusion Embeddings

Stable Diffusion is the best neural text-to-image engine you can run on your own hardware. I recently picked up a new 3090 for my home machine, and spent a couple weekends messing around with Stable Diffusion. Initially, I’ve been using it to generate concept art for a game of Apocalypse World, a tabletop roleplaying game. Stable Diffusion really shines in this space; the creation of the concept art becomes a bit of a collaborative dance, as I find new ideas in the ML output that might get incorporated into the game. The rich imagery also helps create a shared universe for the players, not too unlike the incredibly rich art that TTRPG books tend to invest in. And the small scale of a single TTRPG game, with just a few players, means that we can add concept art to a place where it never would have existed before. These kinds of ML tools are fantastic for lowest-rent collaborative creative exercises.

Having full access to the model + execution code makes it really straightforward to get into the guts and start tinkering with non-standard use cases. I was particularly interested in mucking around with the various latent/hidden representations used by the model. In this post, I’ll a) explain the parts of the model (briefly), then explain how I b) used the text embedding latents to create some simple animations and c) to sample lots of minor variations of an image.

## Model overview

To get started, it’s quite easy to copy the ‘Writing your own inference pipeline‘ section of the Stable Diffusion docs on HuggingFace. Copy out the process, and then check that the code actually runs and produces images.

To start mucking around with the latents, it helps to have a good understanding of the model structure.

1. The model takes as inputs a text prompt and a random seed.
2. These are used to create a text embedding and initial pure-noise VAE latents.
3. The diffusion algorithm progressively de-noises the VAE latents to obtain a ‘clean’ latent image which matches the text prompt to some extent. (As an aside, at each step new noise is generated and added to the de-noised image; you really need to use the same random generator seed, and not just the same initial noisy VAE latent.)
4. The VAE decoder (very quickly) converts the de-noised latent image to a full sized output image.

So, if you run the same text prompt from the same random seed, you get the same image. Now, it turns out that a small change in the text embedding space mostly corresponds to a small change in the output image. This continuity makes the text embedding space a good playground.

Note that the VAE image latents are actually a pretty boring space, by comparison: the latents have shape [4, 64, 64] where the last dimensions correspond to image height and width. This blog post shows that the VAE latents are actually quite close to the image already. You can get some kind of effects by manipulating the VAE latents (for example, sending x to -x takes the color negative of the image more or less), but these effects aren’t terribly interesting, like degraded versions of what you’d try to do in Photoshop.

# Morph Animations

Often you can make relatively small changes in the prompt and (so long as you use the same seed) you’ll bet back a very similar image, with some changes in the details. Then you can make a morph animation by ‘walking’ from one text embedding to the other, generating new images along the way. In the image morph animation, I’ve changed the famous actress’ name only, leaving the rest of the prompt the same, and connected the two with 16 transition frames.

Stable Diffusion isn’t great at making random faces (you tend to get mosnters), but tends to get the details /mostly/ right for famous people who show up in the dataset a lot. So, to get a good face, pick a famous name. The text embedding transformation gives a nice way to deal with the casual-deepfake problem, though: most of the ‘intermediate’ faces are still good, so we can create text embeddings for a couple-few people, interpolate, and then choose one which doesn’t look too much like any of the ‘source’ faces.

Here’s another example, interpolating between an abandoned street in a city vs a forest. The basic composition remains the same in both images, but one is full of buildings and neon, and the other is full of trees.

# Generating Variations

Another neat application of continuity in the text embedding space is that you can use it to explore closely-related images and try to find something sliiightly better than the initial output. You can add noise repeatedly to the base text embedding to get lots of variants, in other words.

For this image, I added Gaussian noise to the text prompt with standard deviation 0.02 repeatedly. This was structured as a random walk: each new embedding y[k] = 0.5 * y[0] + 0.5 * (y[k-1] + noise). This can potentially create a nice animation over a longer random walk, as we have some coherency between adjacent steps. The first term (0.5*y[0]) ensures that we stay in the neighborhood of the original image.

## Procedural Music in Orca

I recently stumbled on the Orca sequencer, developed by Hundred Rabbits. It bills itself as an ‘esoteric programming language’ for writing music. It is purely a sequencer, and has good integration for MIDI and other output types which I haven’t explored… There are some pretty good tutorials out there already, but I wanted to illustrate a few ‘idioms’ I settled into during a weekend of experimenting with the language. It’s a great language for creating simple home-brew ‘trackers’ for controlling synthesizers.

The thing I’ve always really wanted more of in sequencers is the ability to inject ‘interesting randomness,’ such as varying a note’s gain/velocity randomly, or choosing notes from a given scale at random. SunVOX (my other favorite tracker of the 2010’s) supports random gain, but not much else AFAICT.

In this post, I’ll give a bit of intro/overview of Orca instructions, and document some recipes I came up with for making a slowly mutating bass/melody pattern. Here’s a video of the Orca programming running; it’s controlling my (terribly underutilized) OP-Z.

## Turing’s Cathedral, and the Separation of Math and Industry

I’ve just finished reading ‘Turing’s Cathedral,’ an absolutely fascinating book on early computing. The book focuses almost entirely on John von Neumann’s ‘Electronic Computer Project’ carried out at the Institute of Advanced Study in the 40’s and 50’s.  In fact, Turing makes only occasional and brief appearances in the book: it’s almost entirely a portrait of the IAS project, and the wide range of personalities involved.

For me, the book emphasized the importance of overcoming (or circumventing) boundaries in the pursuit of scientific progress.  Von Neumann in particular became obsessed with applications (particularly after Godel’s theorem put an end to the Hilbert programme), and served as a bridge between pure and applied mathematics.  Meanwhile, construction of the physical computer brought in a variety of brilliant engineers.  It’s clear that the departmental politics at the IAS were still quite strong – the pure mathematicians didn’t have much regard for the engineers, and the computer project ground to a halt quite senselessly after von Neumann left the IAS.  Dyson argues that Princeton missed an opportunity to be a world center for computing theory and practice as a result.

## Space Filling Curves in Simulated Cities

I’ve been playing around with Cities: Skylines recently, the super-popular SimCity knock-off.  Dealing with traffic is a core theme of the game (as it should be).  Traffic tends to accumulate at intersections, and it’s well known that one-way streets have higher traffic flow.  The logical conclusion, then, is to try to build a city with a single extremely long one-way street…  Unfortunately we have to compromise on this perfect vision, because people want to get back home after work and so on.

## A Quick Intro to Space Filling Curves

Meanwhile, a space-filling curve is an mathematical invention of the 19th century, and one of the earlier examples of a fractal.  The basic idea is to define a path that passes through every point of a square, while also being continuous.  This is accomplished by defining a sequence of increasingly twisty paths (H1, H2, H3, …) in such a way that H∞ is well-defined and continuous.  Of course, we don’t want a infinitely twisty road, but the model of the space filling curve will still be useful to us.

There are a few important ideas in the space filling curve.  The first is a notion that by getting certain properties right in the sequence of curves H1, H2, H3, …, we’ll be able to carry those properties on to the limit curve H∞.

The second main idea is how to get continuity.  Thinking of the curve as a function where you’re at the start at time 0 , and you always get to the end at time 1, we want an H∞ where small changes in time produce small changes in position.  The tricky part here is that the path itself gets longer and longer as we try to fill the square, potentially making continuity hard to satisfy…  When the length of the path doubles, you’re moving twice as fast.

In fact, because of continuity, you can also “go backwards:” Given a point in the square, you can approximate what time you would have passed through the point on the limit curve H∞, with arbitrary precision.  This gives direct proof that the curve actually covers the whole square.

Here’s an example of a space filling curve which is not continuous. Define Bk as the curve you get from following these instructions:

1. Start in the lower-left corner.
2. Go to the top of the square, and then move right by 1/k.
3. Move to the bottom of the square, and move right by 1/k.
4. Repeat steps 2 and 3 until you get to the right side of the square.

The problem here is that a very small change in time might take us all the way from the top of the square to the bottom of the square.  We need to be twistier to make sure that we don’t jump around in the square.  The Moore curve, illustrated above, does his nicely: small changes in time (color) don’t move you from one side of the square to the other.

## Actual Simulated Cities

What happens if we try to use space filling curves to build a city in Cities: Skylines?

My first attempt at building ‘Hilbertville’ was to make large blocks, with a single, winding one-way road for access, using the design of a (second-order) Hilbert Curve.  In addition to the roads, though, I placed a number of pedestrian walkways, which allow people on foot to get in and out of these neighborhoods directly.  I like to think that this strongly encourages pedestrian transit, though it’s hard to tell what people’s actual overall commuting choices are from the in-game statistics.

Skylines only allows building directly facing a road; corners tend to lead to empty space.  You can see a large empty square in the middle of the two blocks pictured above.  There are also two smaller rectangles and two small empty squares inside of each of these two blocks.  Making the top ‘loop’ a little bit longer removed most of the internal empty space.  This internal space is bad from the game perspective; ideally we would still be able to put a park in the empty spaces to allow people to extra space, but even parks require road access.

Intersections with the main connecting roads end up as ‘sinks’ for all of the traffic congestion.  So we should try to reduce the number of such intersections…  The Moore curve is a slight variation on the Hilbert curve which puts the ‘start’ and ‘finish’ of the path next to one another.  If we merge the start and finish into a wide two-way road, we get this:

We still get the wasted square between neighborhoods, but somewhat reduce the amount of empty interior space.  Potentially, we could develop a slightly different pattern and alternate between blocks to eliminate the lost space between blocks.  Also, because the entrance and exit to the block coincide, we get to halve the number of intersections with the main road, which is a big win for traffic congestion.

Here’s a view of the full city; it’s still not super big, with a population of about 25k.  We still get pretty heavy congestion on the main ring road, though the congestion is much less bad than in some earlier cities I built.  In particular, the industrial areas (with lots of truck traffic) do much better with these long and twisty one-way streets.

The empty space is actually caused by all of the turns in the road; fewer corners implies fewer wasted patches of land.  The easiest way to deal with this is to just use a ‘back-and-forth’ one-way road, without all of the fancy twists.

The other major issue with this style of road design is access to services.  Fire trucks in particular have a long way to go to get to the end of a block; the ‘fire danger’ indicators seem to think this is a bad idea.  I’m not sure if it’s actually a problem, though, as the amount of traffic within a block is next to none, allowing pretty quick emergency response in spite of the distance.

Overall, I would say it’s a mixed success.  There’s not a strong reason to favor the twisty space-filling curves over simpler back-and-forth one-way streets, and in either case the access for fire and trash trucks seems to be an issue.  The twistiness of the space-filling curve is mainly used for getting the right amount of locality to ensure continuity in the limit curve; this doesn’t serve a clear purpose in the design of cities, though, and the many turns end up creating difficult-to-access corner spaces.  On the bright side, though, traffic is reduced and pedestrian transit is strongly encouraged by the design of the city.

## 4D Scatter Plotting

I recently read Edward Tufte’s ‘Visualizing Quantitative Information,’ a classic book on visualizing statistical data.  It reads a little bit like the ‘Elements of Style’ for data visualization: Instead of ‘omit needless words,’ we have ‘maximize data-ink.’  Indeed, the primary goal of the book is to establish some basic design principles, and then show that those principles, creatively applied, can lead to genuinely new modes of representing data.

One of my favorite graphics in the book was a scatter plot adapted from a physics paper, mapping four dimensions in a single graphic.  It’s pretty typical to deal with data with much more than three dimensions; I was struck by the relative simplicity with which this scatter plot was able to illustrate four dimensional data.

I hacked out a bit of python code to generate similar images; here’s a 4D scatter plot of the Iris dataset:

## Kaggle Social Networks Competition

This week I was surprised to learn that I won the Kaggle Social Networks competition!

This was a bit different from other Kaggle competitions.  Typically, a Kaggle competition will provide a large set of data and want to optimize some particular number (say, turning anonymized personal data into a prediction of yearly medical costs).  The dataset here intrigued me because it’s about learning from and reconstructing graphs, which is a very different kind of problem.  In this post, I’ll discuss my approach and insights on the problem.

## Code, Debt, and Bitcoin

Once upon a time in the late nineties, the internet was a crypto-anarchist’s dream.  It was a new trans-national cyberspace, mostly free of the meddling of any kind of government, where information could be exchanged with freedom, anonymity, and (with a bit of work) security.   For a certain strain of crypto-anarchist, Temporary Autonomous Zone was a guiding document, advocating small anarchist societies in the blank spaces of existing society temporarily beyond the reach of government surveillance or regulation.  This was a great idea with some obvious drawbacks: On the one hand, TAZ served as a direct inspiration for Burning Man.  On the other hand, it eventually came out that Peter Lamborn Wilson (who authored TAZ under the pseudonym Hakim Bey) was an advocate of pedophilia, which had clear implications as to why he wanted freedom from regulation.  It’s a document whose history highlights the simultaneous boundless possibilities and severe drawbacks of anarchism.

Against this background, Lawrence Lessig’s Code made the case that the internet TAZ was in fact temporary.   Lessig argued that the internet’s behaviour is determined by a combination of computer code and legal code, and that while the legal code hadn’t been written yet, it would be soon.  His prediction (which has largely been realized) was that the internet would lose its anarchic character through government regulation mixed with a need for security and convenience in commercial transactions. (In addition to these forces, social media also came along, in which people largely sacrificed their anonymity willingly for the convenience of being able to easily communicate with their meatspace social networks.)

In thinking about Bitcoin, it’s useful to see how the regulation came to change the internet.  The prediction (again pretty much correct) was that regulations would target large companies instead of individual users.  Companies are compelled to follow the law under the ultimate threat of not being allowed to operate at all.  Because of the tendency for people to glom onto just a few instances of working solutions, it becomes easy to target a few large entities to enact regulation on a broad base of users.

## Driverless Futures

Google unveiled it’s newest iteration of the driverless car, this time without a steering wheel or brake pedals.  It looks a bit like a smart car crossed with a Beetle and a koala, but I’m still pretty excited about it.

I have never bothered to get a driver’s license, and it seems now like I was a (relatively) early-adopter of car-free life instead of a life-long freak: the proportion of young people with licenses has been steadily declining over the last ten years.  When I was 16, I looked around and saw lots of teenagers getting crappy cars to drive to crappy jobs to pay for their crappy cars, and decided that I didn’t really want to be involved in that cycle.  Spending 15-30 hours working at Dairy Queen didn’t seem like a terribly valuable experience.

## Winter on Georgian Bay

Back in late December, I planted a Raspberry Pi camera at a cottage on Georgian Bay, in Northern Ontario, set to take a picture once every two minutes.  I had been planning the shoot for a couple months prior to the deployment: There were two Raspberry Pi’s involved, in case one failed somewhere during the winter.  One of the Pi’s was set to reboot once a week, just in case the software crashed but the Pi was still awake.  I had also written some software for the time-lapse to ensure that pictures were only taken during the day time, and to try to maintain a balance of well-lit, consistent images over the course of each day.

In spite of all the planning, I had a sense that something would go horribly wrong, and, indeed, when we showed up to the cottage, the windows were completely frosted over.  The cameras had to be placed inside, so we figured we would mainly see the back-side of an icy window when we retrieved the cameras.  Or that the camera boards would literally freeze after about a week of sub-zero temperatures in the unheated cottage.  Or that a raccoon would find it way in and gnaw through the shiny Lego cases.  Or something else entirely unplanned for.

So it was a bit of a surprise when it turned out that the shoot went perfectly.  We retrieved the cameras about a week ago, on May 7th, and found over 42,000 photos waiting for us on one of the cameras and somewhat fewer on the other.  Both cameras had survived the winter just fine!

All told, I think the result was really cool!  The video at the top is the ‘highlights’ reel, with all of the best days.  It comes to 13 minutes at 18 frames per second.  Turns out it was a fantastic winter for doing a time-lapse, with lots of snow storms and ice.  There’s even the occasional bit of wildlife, if you watch closely.  I’ll post the full 40-minute time-lapse on Youtube sometime next week.

## One Weird Fourier Trick for Combinatorial Data

Here are the slides from the talk I gave in Montreal last Friday.

The talk was about using Fourier transforms to get polynomial-time encodings of permutation statistics, as well as a look at the Kondor-Borgwardt approach to graph invariants via the Fourier transform over $S_n$.  The talk was given at a representation theory conference, and I was making the point that we can get new research ideas by taking trips into the world of applications – in my case, by looking at machine learning problems.  The opening joke was that I asked my computer for the best possible title for the talk, and received the click-bait title as a response.  It was admittedly a pretty funny moment watching the chair of the session trying to decide whether to read the title originally submitted for the talk (‘Compressed Combinatorial Statistics’) or the ridiculousness on the screen (he went with the original).


text:
# Reduce GPU costs with on demand instances and startup scripts

This post is about leveraging on demand capabilities of costly virtual instances on the Google Cloud Engine using startup scripts.

# Deep Learning is expensive

Here’s the situation: You’re working on some large dataset, and you feel the irresistible urge to release the Deep Learning beast on your models with VMs armed to the teeth with GPUs.

Since your local Macbook steps into the twilight zone every time you launch Keras, you decide to spin up a dragster style, GPU-powered VM on the Google Platform, AWS or Azure. Once the VM is ready, which in truth may take several days if it’s your first encounter with the CUDA Toolkit, you ssh into the VM and start working on your data and your models.

After a few hours of work, you’re still working on your scripts, cleaning up the data, training models, evaluating, and on and on. Time passes on while the earth pursues its never ending spin in the interplanetary void. When you realize your brain has as much jitsu left as a greek yogurt, you decide to call it a day and give the whole thing a rest. And of course, you sometimes forget to stop the instance. Your cash reserves leak out cent after cent, dollar/euro/pound after dollar/euro/pound throughout the night.

All these hours do add up. And at the end of the months you realize GPUs are way more expensive than you ever imagined. But hey Deep learning is really fun. Can’t stop now. Just need a few more hours. After all nobody really understands how these neural network work, do they? And you really need to practice to be able to call yourself a Deep Learning expert. Please just a few more hours of GPUs. Just 30 minutes, … I swear, …. come on!

So what’s a data scientist to do?

One solution is to go back to random forests and SVMs and give up on the whole deep learning thing. After all, as Vladimir Vapnik says, Deep Learning is just brute force training with a whole lot of data.

The other solution is to make the most of the on demand promise in cloud computing.

## On demand and serverless

The whole promise of cloud computing is that you can spin up and release resources as needed. Way back in the early 2000s that mostly meant being able to add servers on the fly to support your traffic exploding when BoingBoing or Gizmodo suddenly put your startup on their front page. But for machine learning the same on demand concept is relevant when extra high computing power is needed. When working with Deep Learning, most of the mundane work of data cleaning and shaping can probably be carried out on your local machine or a low level VM. The only time GPU enabled VMs are truly needed is to train the Deep Learning models.

Which means that a resource conservative workflow should look like this:

• 1) Local: ETL, extract and explore dataset, clean and format data for consumption by Keras / Tensorflow / ….
• 2) Storage: Upload the properly formatted data to storage (GCS, S3, SQL, BQ) to make accessible by the VM
• 3) Local:Create a GPU enabled VM
• 4) EC2, GCE: run your Keras / TF / Pytorch script to train your model
• 5) EC2, GCE: Store intermediate and final results to storage, so you can access it from local
• 6) Shutdown or delete the VM when the script has finished running
• 7) Local: retrieve the models, make some predictions, evaluations, selections

Here, Local can be replaced by a smaller, less powerful VM running on CPUs and not GPUs.

With this workflow, you only spend money on expensive cloud resources on steps 3) and 4), potentially saving you significant amounts of cash at the end of the day. If you can manage to shutdown or even delete the VM once the script has finished running then you won’t even run the risk of leaving it running all through the night! Brilliant!

So in order to limit our resources, we need to be able to

• 1) Create a VM in the fly
• 2) Run a script on the VM from your local
• 3) Terminate the VM when the script is done

And we should do that (create, run, terminate) every time we want to test a new version of the dataset, a new DL architecture or new parameters. We could even potentially run several trials in parallel.

Let’s go!

## Create a VM on the fly from an existing disk

I assume here that you already have created a VM and installed everything needed to run your scripts. Things like the conda distribution, scikit-learn, keras, GPUs and so forth. See How to setup a VM for data science on GCP and Launch a GPU-backed Google Compute Engine instance for more details (also this one) to install the CUDA Toolkit and the cuDNN library.

For those in a hurry, here’s an example of the command line for creating a preemptible VM on Google Cloud Engine (Ubuntu 17.10 with 50gb disk space). Preemptible VMs are temporary but way way cheaper than non preemptible ones. Great for research work not so much for production APIs.

gcloud beta compute --project "<project_name>" instances create "<instance_name>" --zone "us-east1-c" \
--machine-type "n1-standard-1" --subnet "default" --no-restart-on-failure --maintenance-policy "TERMINATE" \
--preemptible --service-account "<your_service_account>"  --image "ubuntu-1710-artful-v20180126" \
--image-project "ubuntu-os-cloud" --boot-disk-size "50" --no-boot-disk-auto-delete \
--boot-disk-type "pd-standard" --boot-disk-device-name "<disk_name>"

In the above and quite longish command, the non obvious but important flags are

• --no-boot-disk-auto-delete: The disk will not be deleted when the instance is deleted
• --preemptible: makes the VM temporary and saves money
• --service-account "<your_service_account>": A service account is used by your VM to interact with other Google Cloud Platform APIs. The default service account is identifiable with that email [PROJECT_NUMBER][email protected] where the [PROJECT_NUMBER] can be found on your project dashboard

So let’s assume that your have created your initial disk and deleted the associated VM. The disk is now free to be used to create a new VM.

The following command line creates a preemptible VM from that disk

gcloud compute instances create <instance name> --disk name=<disk name>,boot=yes --preemptible

Ok so we can create a VM on the fly based on that disk. Now we want to run a script on that VM. Let’s say a python script.

The simplest way is to use the SSH command with the --command flag

gcloud compute ssh <instance name> \
--command '{Absolute path to }/python {absolute path to}<the script>.py'

and low and behold, that command will display the output of the remote python script on your local terminal. Try for instance gcloud compute ssh <instance name> --command 'ls -al'.

A more sophisticated way is to automatically run a script (shell, python, R, whatever…) when the VM is created by using startup scripts

For instance, we could want to run the following shell script on creation

#! /bin/bash
sudo apt-get update

printf '%s %s Some log message \n' $(date +%Y-%m-%d)$(date +%H:%M:%S) >> '{absolute_path}/startup_script.log'

# add and activate the github keys
eval "$(ssh-agent -s)" ssh-add {path to github key} # log script start cd {path to application folder} # git update application git pull origin master # run script {path to }/python {absolute path to}/<the script>.py  That script activates the github keys, updates the application from github, and runs the script. Pretty neat. Creating the VM and making sure the VM runs that script is just an extension of the above VM creation command line But first you need to make the script available to the VM by uploading to Google Storage with gsutil gsutil cp {local}/<shell script> gs://{bucket name}/  for more gsutil example check my post on https://alexisperrier.com/gcp/2018/01/01/google-storage-gsutil.html. And now we can create the VM and have the script run on start. The following command line will attach the script to the VM as a startup script. Every time the VM is started the script will be executed. gcloud compute instances create <instance name> --disk name=<disk name>,boot=yes --preemptible \ --scopes storage-ro \ --metadata startup-script-url=gs://{bucket name}/<shell script> --preemptible  ## Now shutdown that VM! So we are now able to 1. start a VM on demand from a disk 2. run a script on that VM from our local We just need to find a way to terminate that VM once the script has finished running. This is where things get tricky mainly because it can be difficult to know with certainty when the script has finished running. The simplest solution is to add the following shutdown line at the end of the startup script shutdown -h now  This forces the VM to stop once the script is done. The VM still exists and is not deleted. In terms of pricing, this might just be enough as the VM is not priced when it’s idle. From the google doc: Instances that are in a TERMINATED state are not charged …. The associated disks, IPs, and other resources are still billed but not the VM. It’s also possible to not only shutdown the VM but also delete it from within the VM. In other words having the VM commit seppuku. I mean specially if the script fails to run, the VM should take the blame for having failed its master (You) and rightly self suicide, makes sense. In a way maybe. The following code is from this thread. It can run from within the VM. It requires a bit of tuning on the service account scopes for it to have the proper permissions and actually work. gcloud compute instances delete$myName --zone=$myZone --quiet  where the name of the VM comes from myName=$(hostname) and the zone from

# Get the zone
zoneMetadata=$(curl "https://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor:Google") # Split on / and get the 4th element to get the actual zone name IFS=$'/'
zoneMetadataSplit=($zoneMetadata) myZone="${zoneMetadataSplit[3]}"

The only problem with that approach (stopping or deleting from the startup script) is that every time you start the VM, well, it will run the script and shutdown, and at the same time preventing you from ssh’ing into it to check the logs, make some modifications or inspect the results. Bummer!

The other solution would be to have your main model training script write a status update to a file or an external storage bucket or database, and from your local, regularly check the status of the script before deciding to the the shutdown command.

In the end, although a bit hacky, I think this is the best solution. Your whole workflow becomes now

1. Create the VM and set it up with all the right libraries and GPUs. Make sure the disk is persistent.
2. Delete the VM
3. Write the startup script that runs your model training python code. Make sure the python code exports its status (running, failed, done) to some external resources or some internal file as its being executed. Upload the startup script to a bucket on Google Storage
4. Create (1st time) / start (subsequent times) the VM and associate the startup script to it
5. Have a local conductor shutdown script regularly check the status of the training python execution on the VM and shutdown the VM when the status is failed or done

Note: Instead of using a startup script, you could also simply run the python model code using the gcloud compute ssh -- command <python script> command in conjunction with the local conductor shutdown script. But I feel the use of start up scripts basically dedicates the VM to that usage and that usage only. Similarly to writing good quality code, where a method or function should do only one thing at a time, my feeling is that a VM should be used only for one goal and one goal only. After all you can have as many VMs as you like as long as they are idle. Disks prices are low and usually not a problem.

# Conclusion

The whole point behind using cloud resources is to leverage its at-will / on-demand capabilities to reduce costs. Doing so requires using startup scripts and some external monitoring to shutdown the VM once the task has been completed.

This is of course just one way of doing things.

Please let me know in the comments, how YOU manage costly on demand instances. And thanks for reading this post until the end.


text:
# Vertex Cover approximation algorithm

I have an algorithm that solves the Vertex Cover problem. The algorithm is

Repeat while there is an edge:

Arbitrarily pick an uncovered edge $$e = uv$$ and add $$u$$ and $$v$$ to the solution. Delete $$u$$ and $$v$$ from the graph.

I know this strategy is a 2-approximation to Vertex Cover and that its worst example is the complete bipartite graph $$K_{n,n}$$. In this graph, the algorithm will return a vertex cover of size $$2n$$ whereas the optimal solution is of size $$n$$.

Question: Does there exist a graph with Minimum Vertex Cover of size 10 where this strategy finds a minimum vertex cover?

• The performance you mention on complete bipartite graphs is at odds with the stated approximation ratio. – Yuval Filmus Dec 21 '18 at 19:13
• A good example for this algorithm is a matching. – Yuval Filmus Dec 21 '18 at 19:13
• ohhh can you give any worst case example? – Null Pointer Dec 21 '18 at 19:20
• @YuvalFilmus If I understand the question as well as your suggestion, your suggestion ($10K_2$) gives a worst case, and not a best case. It seems that OP is looking for examples where the approximation algorithms actually gives the optimum. – Pål GD Dec 22 '18 at 12:40

• Also known as $5K_3$. – Pål GD Dec 22 '18 at 12:41


text:
# CERN Theses

Последние добавления:
2015-06-30
17:58
 Study of the effect of the initial geometry on elliptic flow and charged hadron production in Pb-Pb collisions with ALICE The aim of the ALICE experiment (A Large Ion Collider Experiment) at the LHC is the study of the nuclear matter under conditions of extreme energy density and temperature [...] CERN-THESIS-2015-083 - 249 p.

Fulltext
2015-06-30
16:07
 Energy Reconstruction and high-speed Data Transmission with FPGAs for the Upgrade of the ATLAS Liquid Argon Calorimeter at LHC / Stärz, Steffen The Liquid Argon calorimeter of the ATLAS detector at CERN near Geneva is equipped with improved readout and trigger electronics for the operation at higher luminosity LHC in the frame of several upgrades (Phase-0, I, and II) [...] CERN-THESIS-2015-082 - 281 p.

Fulltext
2015-06-30
03:19
 Search for Physics Beyond the Standard Model in Multi-jet Events Recorded with the ATLAS Detector in p-p collisions at center of Mass Energy = 8 TeV using the Large Hadron Collider / Wang, Kuhan A search for physics beyond the Standard Model with multi-jet signatures is presented using 20.3 inverse fb of proton-proton collision data recorded using the ATLAS detector at the Large Hadron Collider at a center-of-mass energy of 8 TeV [...] CERN-THESIS-2015-081 - 242 p.

Fulltext
2015-06-26
15:59
 A Search for Non-Standard Model Higgs Bosons Produced in Association with b-Quarks at the ATLAS Experiment / Malone, Caitlin With the discovery of a Standard-Model-like Higgs boson at the LHC in 2012, the particle content of the Standard Model has been fully verified experimentally, and the focus turns even more fully to searches for physics beyond the Standard Model [...] CERN-THESIS-2015-080 - 189 p.

Fulltext
2015-06-26
15:08
 Studies of Read-Out Electronics and Trigger for Muon Drift Tube Detectors at High Luminosities / Nowak, Sebastian The Large Hadron Collider (LHC) at the European Centre for Particle Physics, CERN, collides protons with an unprecedentedly high centre-of-mass energy and luminosity [...] CERN-THESIS-2015-079 - 156 p.

Fulltext
2015-06-25
06:01
 Searches for exotic heavy quarks decaying into a W-Boson and a b-Quark with the ATLAS experiment / Nektarijevic, Snezana In this thesis, searches for two hypothetical heavy quarks are presented: the fourth Standard Model generation up-type quark t’, and the vector-like quark T, predicted by the new physics models involving extra dimensions or a composite Higgs boson [...] 327 p.

Geneva U. server - Full text
2015-06-24
18:25
 Microfluidic Scintillation Detectors for High Energy Physics / Maoddi, Pietro This thesis deals with the development and study of microfluidic scintillation detectors, a technology of recent introduction for the detection of high energy particles [...] CERN-THESIS-2015-078 - 116 p.

Fulltext
2015-06-24
13:42
 First observation of the associated production of $Z$ bosons with prompt and non-prompt $J/\psi$ mesons in $pp$ collisions at $\sqrt{s}= 8\,\mathrm{TeV}$ and contribution to the Micromegas detectors for the New Small Wheel upgrade of the ATLAS experiment / Leontsinis, Stefanos The associated production of vector boson with heavy quarkonia is a key observable for understanding the quarkonium production mechanism [...] CERN-THESIS-2015-077 - 193 p.

Fulltext
2015-06-24
10:09
 The beam coupling impedance model of CERN Proton Synchrotron / Persichelli, Serena The research activity described in this thesis work is dedicated to developing a longitudinal and a transverse beam coupling impedance model for the CERN Proton Synchrotron (PS), in the framework of the Large Hadron Collider (LHC) Injector Upgrade (LIU) project [...] CERN-THESIS-2015-076 - 164 p.

Fulltext
2015-06-24
09:17
 Model-independent search of new physics in the Z+b final state in pp collision at $\sqrt{s}$ = 8 TeV with CMS experiment at LHC / Turcati, Andrea (INFN, Trieste ; Trieste U.) ; Della Ricca, Giuseppe (dir.) (INFN, Trieste ; Trieste U.) ; Candelise, Vieri (dir.) (INFN, Trieste ; Trieste U.) CERN-THESIS-2014-320; CMS-TS-2015-013.- 2015 - 93 p. Fulltext: TS2015_013 - PDF; TS2015_013_2 - PDF;

Отбор по:


text:
To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Earnings per share

Earnings per share (EPS) is the monetary value of earnings per outstanding share of common stock for a company.

In the United States, the Financial Accounting Standards Board (FASB) requires EPS information for the four major categories of the income statement: continuing operations, discontinued operations, extraordinary items, and net income.

• 1/5
Views:
70 488
85 949
34 827
4 268
97 805
• ✪ EPS (Earnings Per Share) explained
• ✪ How to Calculate EPS (Earnings Per Share)
• ✪ Basic Earnings Per Share (EPS) | Intermediate Accounting | CPA Exam FAR | Chp 16 p 5
• ✪ Earnings Per Share explained
• ✪ EPS Earnings Per Share Explained in 11 minutes - Financial Ratio Analysis Tutorial

Calculating

Preferred stock rights have precedence over common stock. Therefore, dividends on preferred shares are subtracted before calculating the EPS. When preferred shares are cumulative,[jargon] annual dividends are deducted whether or not they have been declared. Dividends in arrears are not relevant when calculating EPS.

Earnings per share (basic formula)

${\displaystyle {\mbox{Earnings Per Share}}={\frac {\mbox{Profit - Preferred Dividends}}{\mbox{Weighted Average Common Shares}}}}$

Earnings per share (net income formula)

${\displaystyle {\mbox{Earnings Per Share}}={\frac {\mbox{Net Income - Preferred Dividends}}{\mbox{Average Common Shares}}}}$

Earnings per share (continuing operations formula)

${\displaystyle {\mbox{Earnings Per Share}}={\frac {\mbox{Income from Continuing Operations - Preferred dividends}}{\mbox{Weighted Average Common Shares}}}}$

Diluted earnings per share

Diluted earnings per share (diluted EPS) is a company's earnings per share calculated using fully diluted shares outstanding (i.e. including the impact of stock option grants and convertible bonds). Diluted EPS indicates a "worst case" scenario, one that reflects the issuance of stock for all outstanding options, warrants and convertible securities that would reduce earnings per share.[1]

Calculations of diluted EPS vary. Morningstar reports diluted EPS "Earnings/Share $", which is net income minus preferred stock dividends divided by the weighted average of common stock shares outstanding over the past year; this is adjusted for dilutive shares.[2][3] Some data sources may simplify this calculation by using the number of shares outstanding at the end of a reporting period.[4] U.S. GAAP Calculations of diluted EPS under U.S. GAAP are described under Statement No. 128 of the Financial Accounting Standards Board (FAS No. 128).[5] The objective of diluted EPS is to measure the performance of a company over the reporting period taking into account the dilutive effect of potential common stock that could be issued by the company. To compute diluted EPS, both the denominator (outstanding shares) and the numerator (earnings) may need to be adjusted. Diluted shares: To calculate the total number of shares used in the calculation, FASB prescribes using the treasury method to calculate the dilutive effect of any instruments that could result in the issuance of shares, including: • Stock options • Warrants • Convertible preferred stock • Convertible bonds • Share-based payment arrangements • Written put options • Contingently issuable shares Earnings: The numerator used in calculating diluted EPS is adjusted to take into account the impact that the conversion of any securities would have on earnings. For example, interest would be added back to earnings to reflect the conversion of any outstanding convertible bonds, preferred dividends would be added back to reflect the conversion of convertible preferred stock, and any impact of these changes on other financial items, such as royalties and taxes, would also be adjusted. International financial reporting standards Under International Financial Reporting Standards, diluted earnings per share is calculated by adjusting the earnings and number of shares for the effects of dilutive options and other dilutive potential common stock.[6] Dilutive potential common stock includes:[6] See also References 1. ^ "Diluted Earnings Per Share (Diluted EPS)". Investopedia ULC. Retrieved 2008-03-02. 2. ^ "Earnings/Share$ - Morningstar.com Glossary E-F". Morningstar. Archived from the original on 2008-03-17. Retrieved 2008-03-02.
3. ^ "Diluted EPS - Morningstar.com Glossary D-D". Morningstar. Archived from the original on 2008-02-18. Retrieved 2008-03-02.
4. ^ "Earnings Per Share (EPS)". Investopedia ULC. Retrieved 2008-03-02.
5. ^ "FAS Statement No. 128". FASB. Retrieved 2013-02-18.
6. ^ a b "Summaries of International Financial Reporting Standards: IAS33 Earnings per share". Deloitte Touche Tohmatsu. 2008. Retrieved 2008-03-02.
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.


text:
SISSA Digital Library

# TeV Scale See-Saw Mechanisms of Neutrino Mass Generation, the Majorana Nature of the Heavy Singlet Neutrinos and \$\betabeta\$-Decay

## This item appears in the following Collection(s)

• Papers
articles, preprints, proceedings, book chapters, books, lecture notes