Shared posts

07 Jun 03:30

Asymmetry in Government Bond Returns

by Ippei Fujiwara, Lena Mareen Korber, Daisuke Nagakura
Is there asymmetry in the distribution of government bond returns in developed countries? Can asymmetries be predicted using financial and macroeconomic variables? To answer the first question, we provide evidence for asymmetry in government bond returns in particular for short maturities. This finding has important implications for modelling and forecasting government bond returns. For example, widely used models for yield curve analysis such as the affine term structure model assume symmetrically distributed innovations. To answer the second question, we find that liquidity in government bond markets predicts the coefficient of skewness with a positive sign, meaning that the probability of a large and negative excess return is more likely in a less liquid market. In addition, a positive realized return is associated with a negative coefficient of skewness, or a small probability of a large and negative return in the future.
07 Jun 03:28

A Semiparametric Early Warning Model of Financial Stress Events

by Ian Christensen, Fuchun Li
Alexander Didenko

использовать FSI как input в boosting для Меуччи

The authors use the Financial Stress Index created by the International Monetary Fund to predict the likelihood of financial stress events for five developed countries: Canada, France, Germany, the United Kingdom and the United States. They use a semiparametric panel data model with nonparametric specification of the link functions and linear index function. The empirical results show that the semiparametric early warning model captures some well-known financial stress events. For Canada, Germany, the United Kingdom and the United States, the semiparametric model can provide much better out-of-sample predicted probabilities than the logit model for the time period from 2007Q2 to 2010Q2, while for France, the logit model provides better performance for non-financial stress events than the semiparametric model.
07 Jun 03:27

ECB projections as a tool for understanding policy decisions

by Paul Hubert
Alexander Didenko

must read

The European Central Bank publishes inflation projections quarterly. This paper aims at establishing whether they influence private forecasts and whether they may be considered as an enhanced means of implementing policy decisions by facilitating private agents’ information processing. We provide original evidence that ECB inflation projections do influence private inflation expectations. We also find that ECB projections give information about future ECB rate movements, and that the ECB rate has different effects if complemented or not with the publication of ECB projections. We conclude that ECB projections enable private agents to correctly interpret and predict policy decisions.
07 Jun 03:27

The influence and policy signaling role of FOMC forecasts

by Paul Hubert
Alexander Didenko

must read

Policymakers at the Federal Open Market Committee (FOMC) publish forecasts since 1979. We examine the effects of publishing FOMC inflation forecasts in two steps using a structural VAR model. We assess whether they influence private inflation expectations and the underlying mechanism at work: do they convey policy signals for forward guidance or help interpreting current policy decisions? We provide original evidence that FOMC inflation forecasts are able to influence private ones. We also find that FOMC forecasts give information about future Fed rate movements and affect private expectations in a different way than Fed rate shocks. This body of evidence supports the use of central bank forecasts to affect inflation expectations especially while conventional policy instruments are at the zero lower bound
07 Jun 03:21

Forecasting disaggregates by sectors and regions : the case of inflation in the euro area and Spain

by Gabriel Pino, Juan de Dios Tena, Antoni Espasa
Alexander Didenko

research ticket: "Are financial information flows spatially cointegrated? An evidence from emerging market IFCs"

We study the performance of different modelling strategies for 969 and 600 monthly price indexes disaggregated by sectors and geographical areas in Spain, regions, and in the EA12, countries, in order to obtain a detailed picture of inflation and relative sectoral prices through geographical areas for each economy, using the forecasts from those models. The study also provides a description of the spatial cointegration restrictions which could be useful for understanding price setting within an economy. We use spatial bi-dimensional vector equilibrium correction models, where the price indexes for each sector are allowed to be cointegrated with prices in neighbouring areas using different definitions of neighbourhood. We find that geographical disaggregation forecasts are very reliable on a regional level in Spain as they improve the forecasting accuracy of headline inflation relative to alternative methods. Geographical disaggregation forecasts are also reliable for the EA12 but only because derived headline inflation forecasting is not significantly worse than alternative forecasts. These results show that regional analysis within countries is appropriate in the euro area. These highly disaggregated forecasts can be used for competitive and other type of macro and regional analysis
07 Jun 03:16

Overcoming the difficulties of developing and transferring an input-output model for electricity consumption forecasts to the users

by Paixão, Paulo, Buratini, Ricardo, Guilhoto, Joaquim José Martins
This paper relates an ongoing experience of developing and transferring the knowledge required to understand and operate a regionally disaggregated supply and use input-output model. This R&D project is financed by ANEEL, the Brazilian regulatory agency for electricity generation and distribution, and it is conducted in partnership between an electricity utility company, CPFL, and the Department of Economics at the University of São Paulo (FEA/USP) in Brazil. A brief account of the model theoretical structure is provided, from which three major improvements are expected: a) a better impact assessment of structural economic changes on the consumption of electricity; b) analyses tailored to the specific regional boundaries of the CPFL area of operation; and c) the identification of direct and indirect changes on electricity consumption accruing from regional development. In order to establish an in-company team capable of applying the model in response to their day to day managerial demands, a training program was devised in order to make them as familiar as possible with the necessary input-output theoretical background, and also skillful enough so as to efficiently apply the model. The paper relates the challenges that have been found in doing so, which means not only transferring academic knowledge to an audience not familiarized to input-output economics within a time schedule severely constrained by the pressure of daily work, but also to match this knowledge to the company technical interests.
07 Jun 03:15

A New Graphical Tool for Copula Selection

by (author unknown)
Journal of Computational and Graphical Statistics, Volume 22, Issue 2, Page 471-493, April 2013.
07 Jun 03:14

Automatic declustering of rare events

by Robert, C. Y.

The analysis of events with low probability but disastrous impact entails understanding how they cluster in time. We present an automatic three-step procedure for identifying clusters, estimating the cluster size distribution and constructing confidence intervals for the extremal index, which measures the degree of clustering of rare events. The third step combines empirical likelihood and parametric likelihood approaches. Simulations show that our new procedure performs very well for finite samples and outperforms previous methods in constructing confidence intervals for the extremal index when there is clustering in the data, as well as in estimating probabilities for small clusters.

07 Jun 03:11

SMOOTH DYNAMIC FACTOR ANALYSIS WITH APPLICATION TO THE US TERM STRUCTURE OF INTEREST RATES

by Borus Jungbacker, Siem Jan Koopman, Michel Wel
Alexander Didenko

must read

SUMMARY

We consider the dynamic factor model and show how smoothness restrictions can be imposed on factor loadings by using cubic spline functions. We develop statistical procedures based on Wald, Lagrange multiplier and likelihood ratio tests for this purpose. The methodology is illustrated by analyzing a newly updated monthly time series panel of US term structure of interest rates. Dynamic factor models with and without smooth loadings are compared with dynamic models based on Nelson–Siegel and cubic spline yield curves. We conclude that smoothness restrictions on factor loadings are supported by the interest rate data and can lead to more accurate forecasts. Copyright © 2013 John Wiley & Sons, Ltd.

07 Jun 03:11

How to Select Representative Samples

by Anton Grafström, Lina Schelin

ABSTRACT

We give a formal definition of a representative sample, but roughly speaking, it is a scaled-down version of the population, capturing its characteristics. New methods for selecting representative probability samples in the presence of auxiliary variables are introduced. Representative samples are needed for multipurpose surveys, when several target variables are of interest. Such samples also enable estimation of parameters in subspaces and improved estimation of target variable distributions. We describe how two recently proposed sampling designs can be used to produce representative samples. Both designs use distance between population units when producing a sample. We propose a distance function that can calculate distances between units in general auxiliary spaces. We also propose a variance estimator for the commonly used Horvitz–Thompson estimator. Real data as well as illustrative examples show that representative samples are obtained and that the variance of the Horvitz–Thompson estimator is reduced compared with simple random sampling.

07 Jun 03:10

Locality statistics for anomaly detection in time series of graphs. (arXiv:1306.0267v1 [stat.AP])

by Heng Wang, Minh Tang, Youngser Park, Carey E. Priebe

The ability to detect change-points in a dynamic network or a time series of graphs is an increasingly important task in many applications of the emerging discipline of graph signal processing. This paper formulates change-point detection as a hypothesis testing problem in terms of a generative latent position model, focusing on the special case of the Stochastic Block Model time series. We analyze two classes of scan statistics, based on distinct underlying locality statistics presented in the literature. Our main contribution is the derivation of the limiting distributions and power characteristics of the competing scan statistics. Performance is compared theoretically, on synthetic data, and on the Enron email corpus. We demonstrate that both statistics are admissible in one simple setting, while one of the statistics is inadmissible a second setting.

07 Jun 03:08

Wormhole Hamiltonian Monte Carlo. (arXiv:1306.0063v1 [stat.CO])

by Shiwei Lan, Jeffrey Streets, Babak Shahbaba

We propose a new Markov Chain Monte Carlo algorithm for sampling from multimodal distributions, especially when the dimension is high and the modes are isolated. Our method exploits and modifies the Riemannian geometric properties of the target distribution to create wormholes connecting modes in order to facilitate moving between them.

07 Jun 03:07

Online Tracking of a Drifting Parameter of a Time Series. (arXiv:1306.0325v1 [math.ST])

by Eduard Belitser, Paulo Serra

We propose an online algorithm for tracking a multivariate time-varying parameter of a time series. The algorithm is driven by a gain function. Under assumptions on the gain function, we derive uniform error bounds on the tracking algorithm in terms of chosen step size for the algorithm and on the variation of the parameter of interest. We give examples of a number of different variational setups for the parameter where our result can be applied, and we also outline how appropriate gain functions can be constructed. We treat in some detail the tracking of time varying parameters of an AR($d$) model as a particular application of our method.

07 Jun 03:03

A Gang of Bandits. (arXiv:1306.0811v1 [cs.LG])

by Nicolò Cesa-Bianchi, Claudio Gentile, Giovanni Zappella

Multi-armed bandit problems are receiving a great deal of attention because they adequately formalize the exploration-exploitation trade-offs arising in several industrially relevant applications, such as online advertisement and, more generally, recommendation systems. In many cases, however, these applications have a strong social component, whose integration in the bandit algorithm could lead to a dramatic performance increase. For instance, we may want to serve content to a group of users by taking advantage of an underlying network of social relationships among them. In this paper, we introduce novel algorithmic approaches to the solution of such networked bandit problems. More specifically, we design and analyze a global strategy which allocates a bandit algorithm to each network node (user) and allows it to "share" signals (contexts and payoffs) with the neghboring nodes. We then derive two more scalable variants of this strategy based on different ways of clustering the graph nodes. We experimentally compare the algorithm and its variants to state-of-the-art methods for contextual bandits that do not use the relational information. Our experiments, carried out on synthetic and real-world datasets, show a marked increase in prediction performance obtained by exploiting the network structure.

07 Jun 02:49

Agent-based multi-optional model of innovations diffusion. (arXiv:1306.1110v1 [stat.AP])

by Carlos E. Laciana, Nicolas Oteiza Aguirre

We propose a formalism that allows the study of the process of diffusion of several products competing in a common market. It is based on the generalization of the statistics Ising model (Potts model). For the implementation, agent based modeling is used, applied to a problem of three options; to adopt a product A, a product B, or non-adoption. A launching strategy is analyzed for one of the two products, which delays its launching with the objective of competing with improvements. The proportion reached by one and another product is calculated at market saturation. The simulations are produced varying the social network topology, the uncertainty in the decision, and the population's homogeneity.

07 Jun 02:46

The Dirichlet Portfolio Model: Uncovering the Hidden Composition of Hedge Fund Investments. (arXiv:1306.0938v1 [stat.AP])

by Laszlo F. Korsos
Alexander Didenko

must read

Hedge funds have long been viewed as a veritable "black box" of investing since outsiders may never view the exact composition of portfolio holdings. Therefore, the ability to estimate an informative set of asset weights is highly desirable for analysis. We present a compositional state space model for estimation of an investment portfolio's unobserved asset allocation weightings on a set of candidate assets when the only observed information is the time series of portfolio returns and the candidate asset returns. In this paper, we exhibit both sequential Monte Carlo numerical and conditionally Normal analytical approaches to solve for estimates of the unobserved asset weight time series. This methodology is motivated by the estimation of monthly asset class weights on the aggregate hedge fund industry from 1996 to 2012. Furthermore, we show how to implement the results as predictive investment weightings in order to construct hedge fund replicating portfolios.

07 Jun 02:44

(More) Efficient Reinforcement Learning via Posterior Sampling. (arXiv:1306.0940v1 [stat.ML])

by Ian Osband, Daniel Russo, Benjamin Van Roy
Alexander Didenko

Меуччи

Most provably-efficient learning algorithms introduce optimism about poorly-understood states and actions to encourage exploration. We study an alternative approach for efficient exploration, \emph{posterior sampling for reinforcement learning} (PSRL). This algorithm proceeds in repeated episodes of known duration. At the start of each episode, PSRL updates a prior distribution over Markov decision processes and takes one sample from this posterior. PSRL then follows the policy that is optimal for this sample during the episode. The algorithm is conceptually simple, computationally efficient and allows an agent to encode prior knowledge in a natural way. We establish an $\tilde{O}(\tau S \sqrt{AT})$ bound on the expected regret, where $T$ is time, $\tau$ is the episode length and $S$ and $A$ are the cardinalities of the state and action spaces. This bound is one of the first for an algorithm not based on optimism, and close to the state of the art for any reinforcement learning algorithm. We show through simulation that PSRL significantly outperforms existing algorithms with similar regret bounds.

07 Jun 02:42

Valid post-selection inference. (arXiv:1306.1059v1 [math.ST])

by Richard Berk, Lawrence Brown, Andreas Buja, Kai Zhang, Linda Zhao

It is common practice in statistical data analysis to perform data-driven variable selection and derive statistical inference from the resulting model. Such inference enjoys none of the guarantees that classical statistical theory provides for tests and confidence intervals when the model has been chosen a priori. We propose to produce valid ``post-selection inference'' by reducing the problem to one of simultaneous inference and hence suitably widening conventional confidence and retention intervals. Simultaneity is required for all linear functions that arise as coefficient estimates in all submodels. By purchasing ``simultaneity insurance'' for all possible submodels, the resulting post-selection inference is rendered universally valid under all possible model selection procedures. This inference is therefore generally conservative for particular selection procedures, but it is always less conservative than full Scheffe protection. Importantly it does not depend on the truth of the selected submodel, and hence it produces valid inference even in wrong models. We describe the structure of the simultaneous inference problem and give some asymptotic results.

07 Jun 02:41

Inferring Robot Task Plans from Human Team Meetings: A Generative Modeling Approach with Logic-Based Prior. (arXiv:1306.0963v1 [cs.AI])

by Been Kim, Caleb M. Chacha, Julie Shah
Alexander Didenko

заседание investment committee

We aim to reduce the burden of programming and deploying autonomous systems to work in concert with people in time-critical domains, such as military field operations and disaster response. Deployment plans for these operations are frequently negotiated on-the-fly by teams of human planners. A human operator then translates the agreed upon plan into machine instructions for the robots. We present an algorithm that reduces this translation burden by inferring the final plan from a processed form of the human team's planning conversation. Our approach combines probabilistic generative modeling with logical plan validation used to compute a highly structured prior over possible plans. This hybrid approach enables us to overcome the challenge of performing inference over the large solution space with only a small amount of noisy data from the team planning session. We validate the algorithm through human subject experimentation and show we are able to infer a human team's final plan with 83% accuracy on average. We also describe a robot demonstration in which two people plan and execute a first-response collaborative task with a PR2 robot. To the best of our knowledge, this is the first work that integrates a logical planning technique within a generative model to perform plan inference.

07 Jun 02:39

Box-plot with R – Tutorial

by Fabio Veronesi

(This article was first published on R Video tutorial for Spatial Statistics, and kindly contributed to R-bloggers)


Yesterday I wanted to create a box-plot for a small dataset to see the evolution of 3 stations through a 3 days period. I like box-plots very much because I think they are one of the clearest ways of showing trend in your data. R is extremely good for this type of plot and, for this reason, I decided to add a post on my blog to show how to create a box-plot, but also because I want to use my own blog to help me remember pieces of code that I might want to use in the future but that I tend to forget.
For this example I first created a dummy dataset using the function rnorm() which generates random normal-distributed sequences. This function requires 3 arguments, the number of samples to create, the mean and the standard deviation of the distribution, for example: 

rnorm(n=100,mean=3,sd=1)

This generates 100 numbers (floats to be exact), which have mean equal to 3 and standard deviation equal to 1.
To generate my dataset I used the following line of code:

data<-data.frame(Stat11=rnorm(100,mean=3,sd=2),
Stat21=rnorm(100,mean=4,sd=1),
Stat31=rnorm(100,mean=6,sd=0.5),
Stat41=rnorm(100,mean=10,sd=0.5),
Stat12=rnorm(100,mean=4,sd=2),
Stat22=rnorm(100,mean=4.5,sd=2),
Stat32=rnorm(100,mean=7,sd=0.5),
Stat42=rnorm(100,mean=8,sd=3),
Stat13=rnorm(100,mean=6,sd=0.5),
Stat23=rnorm(100,mean=5,sd=3),
Stat33=rnorm(100,mean=8,sd=0.2),
Stat43=rnorm(100,mean=4,sd=4))

This line creates a data.frame with 12 columns that looks like this:



Stat11
Stat21
Stat31
Stat41
Stat12
Stat22
Stat32
Stat42
Stat13
Stat23
Stat33
Stat43
5
2
9
-3
10
4
1
1
4
1
5
9
6
13
8
3
7
3
10
10
10
5
9
8
4
4
6
0
10
6
7
6
6
8
2
7
6
7
6
3
9
1
7
0
1
0
6
0
0
2
8
1
6
8
0
8
3
10
9
8
0
19
10
0
11
10
5
6
5
8
10
1
7
4
5
-5
7
0
3
5
2
5
5
3
4
12
9
-4
7
1
9
0
7
2
1
7
7
3
9
0
11
0
8
1
7
0
7
7
6
19
8
3
10
10
9
6
0
2
8
2
6
13
6
-5
12
8
1
4
0
4
5
10
8
11
6
-1
11
4
4
1
4
6
6
10
8
13
5
-5
7
10
0
4
2
7
3
1
2
8
5
-2
5
7
4
2
7
0
3
1
8
11
7
3
11
1
0
9
2
3
5
8
4
19
5
-1
11
6
3
4
9
5
9
0
2
9
5
-3
12
7
6
4
8
2
6
8
7
10
5
-4
8
9
6
9
1
4
3
4






As I mentioned before, this should represent 4 stations for which the measure were replicated in 3 successive days.
Now, for the creation of the box-plot the simplest function is boxplot() and can be simply called by adding the name of the dataset as only argument:

boxplot(data)

This creates the following plot:

 It is already a good plot, but it needs some adjustments. It is in black and white, the box-plots are evenly spaced, even though they are from 3 different replicates, there are no labels on the axis and the names of the stations are not all reported.



So now we need to start doing some tweaking.
First, I want to draw the names of the stations vertically, instead of horizontally. This can be easily done with the argument las. So now the call to the function boxplot()becomes:

boxplot(data, las = 2)

This generates the following plot:




Next, I want to change the name of the stations so that they look less confusing. For doing that I can use the option names:

boxplot(data, las = 2, names = c("Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4"))


which generates this plot:

 




If the names are too long and they do not fit into the plot’s window you can increase it by using the option par:

boxplot(data, las = 2, par(mar = c(12, 5, 4, 2)+ 0.1), names = c("Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4"))




Now I want to group the 4 stations so that the division in 3 successive days is clearer. To do that I can use the option at, which let me specify the position, along the X axis, of each box-plot:

boxplot(data, las = 2, at =c(1,2,3,4, 6,7,8,9, 11,12,13,14), par(mar = c(12, 5, 4, 2) + 0.1), names = c("Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4","Station 1","Station 2","Station 3","Station 4"))

Here I am specifying that I want the first 4 box-plots at position x=1, x=2, x=3 and x=4, then I want to leave a space between the fourth and the fifth and place this last at x=6, and so on.



If you want to add colours to your box plot, you can use the option col and specify a vector with the colour numbers or the colour names. You can find the colour numbers here, and the colour names here



Here is an example:

boxplot(data, las = 2, col = c("red","sienna","palevioletred1","royalblue2","red","sienna","palevioletred1", 
"royalblue2","red","sienna","palevioletred1","royalblue2"),
 at = c(1,2,3,
To leave a comment for the author, please follow the link and comment on his blog: R Video tutorial for Spatial Statistics.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...
07 Jun 02:38

Feature Selection 3 – Swarm Mentality

by Max Kuhn
Alexander Didenko

использовать для оптимизации портфеля, в Меуччи - для генерации views, при оптимизации TTR

(This article was first published on Blog - Applied Predictive Modeling, and kindly contributed to R-bloggers)

"Bees don't swarm in a mango grove for nothing. Where can you see a wisp of smoke without a fire?" - Hla Stavhana

In the last two posts, genetic algorithms were used as feature wrappers to search for more effective subsets of predictors. Here, I will do the same with another type of search algorithm: particle swarm optimization.

Like genetic algorithms, this search procedure is motivated by a natural phenomenon, such as the movements of bird flocks. An excellent reference for this technique is Poli et al (2007). The methodology was originally developed for optimizing real valued parameters, but was later adapted for discrete optimization by Kennedy and Eberhart (1997).

The optimization is initiated with configurations (i.e. multiple particles). In our case, the particles will be different predictor subsets. For now, let's stick with the parameters being real-valued variables. A particular value of a particle is taken to be it's position. In addition to a position, each particle has an associated velocity. For the first iteration, these are based on random numbers.

Each particle produces a fitness value. As with genetic algorithms, this is some measure of model fit. The next candidate set of predictors that a particle evaluates is based on it's last position and it's current velocity.

A swarm of particle are evaluated at once and the location of the best particle is determined. As the velocity of each particle is updated, the update is a function of the:

  1. previous velocity,
  2. last position and
  3. the position of the best particle

There are other parameters of the search procedure, such as the number of particles or how much relative weight the positions of the individual and best particle are used to determine the next candidate point, but this is the basic algorithm in a nutshell.

As an example, consider optimzing the Rosenbrock function with two real-valued variables (A and B):

fitness = 100*(B - A^2)^2 + (A - 1)^2

The best value is at (A = 1, B = 1). The movie below shows a particle swarm optimization using 100 iterations. The predicted best (solid white dot) is consistently in the neighborhood of the optimum value at around 50 iterations. You may need to refresh your browser to re-start the animation.


When searching for subsets, the quantities that we search over are binary (i.e. the predictor is used or excluded from the model). The description above implies that the position is a real valued quantity. If the positions are centered around zero, Kennedy and Eberhart (1997) suggested using a sigmoidal function to translate this value be between zero and one. A uniform random number is used to determine the binary version of the position that is evaluated. Other strategies have been proposed, including the application of a simple threshold to the translated position (i.e. if the translated position is above 0.5, include the predictor).

R has the pso package that implements this algorithm. It does not work for discrete optimization that we need for feature selection. Since its licensed under the GPL, I took the code and removed the parts specific to real valued optimization. That code is linked that the bottom of the page. I structured it to be similar to the R code for genetic algorithms. One input into the modified pso function is a list that has modules for fitting the model, generating predictions, evaluating the fitness function and so on. I've made some changes so that each particle can return multiple values and will treat the first as the fitness function. I'll fit the same QDA model as before to the same simulated data set. First, here are the QDA functions:

qda_pso  0)
      {
      mod  0)
      {
      testROC 

Here is the familiar code to generate the simulated data:

set.seed(468)
training 

To run the optimization, the code will be similar to the GA code used in the last two posts:

set.seed(235)
psoModel 

Since this is simulated data, we can evaluate how well the search went using estimates of the fitness (the area under the ROC curve) calculated using different data sets: resampling, a test set of 500 samples and large set of 10,000 samples that we use to approximate the truth.

The swarm did not consistently move to smaller subsets and, as with the original GA, it overfits to the predictors. This is demonstrated by the increase in the resampled fitness estimates and mediocre test/large sample estimates:


One tactic that helped the GA was to bias the algorithm towards smaller subsets. For PSO, this can be accomplished during the conversion from real valued positions to binary encodings. The previous code used a value of 1 for a predictor if the "squashed" version (i.e. after applying a sigmoidal function) was greater than 0.5. We can bias the subsets by increasing the threshold. This should start the process with smaller subsets and, since we raise the criteria for activating a predictor, only increase the subset size if there is a considerable increase in the fitness function. Here is the code for that conversion and another run of the PSO:

smallerSubsets = .7, 1, 0)
  ## 'x' has particles in columns and predicors in rows, 
  ## so use apply() to threshold the positions
  apply(binary, 2, function(x) which(x == 1))
}
set.seed(235)
psoSmallModel 

The results are much better:


The large-sample and test set fitness values agree with the resampled versions. A smoothed version of the number of predictors over iterations shows that the search is driving down the number of predictors and keeping them low:


And here are the large-sample ROC curves so far:


For the simulated data, the GA and PSO procedures effectively reduced the number of predictors. After reading the last few posts, one could easily remark that I was only able to do this since I knew what the answers should be. If the optimal subset size was not small, would these approaches have been effective? The next (and final) post in this series will apply these methods to a real data set.

The code for these analyses are here and the modified PSO code is here. Thanks to Claus Bendtsen for the original pso code and for answering my email.

To leave a comment for the author, please follow the link and comment on his blog: Blog - Applied Predictive Modeling.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...
05 Jun 17:46

The First Number You Should Look for When Choosing a Mutual Fund

by Melanie Pinola

The First Number You Should Look for When Choosing a Mutual Fund

When it's time to pick a mutual fund for your investments, there's one number you should always look for. No, it's not the Morningstar 5-star rating or ranking on a "top funds" list. The key number is the expense ratio.

Read more...

    


14 May 06:04

IPO at LSE

Alexander Didenko

6 июня. Нужно идти

The interest in Russian and CIS equities among British and international investors in London has been steadily recovering after the 2008 financial crisis. In 2012, R
14 May 05:20

View: Retail sales

Alexander Didenko

Фолловеры из Алго: добавьте этот фид себе пожалуйста. Они нам нужны

In keeping with the now constant trend of baffle with BS, since everyone was expecting a weaker advance retail sales print, just like with the BLS report, it was virtually assured that the data woul
13 May 07:26

9 Things You Can Learn About Copywriting From David Ogilvy

by Content_Money
David Ogilvy is known throughout the copywriting and advertising industries as “The Father of Advertising.” For a quick snack-break-sized read, scan through these nine tips on copywriting, content writing, and general advertising, straight from the master.
13 May 07:26

How to Find Key Online Influencers

by BradFriedman
How much of our time, effort and money is spent targeting those that aren’t influential with our branding messages hoping to spread the word about our product our service? Is this an effective way to spend our time?
13 May 07:25

Mastering SEO for PR: Top 3 Best Practices

by CarrieMorgan
If helping our clients be more visible is the heartbeat of public relations, then learning to integrate basic SEO skills into the work we are doing is key in keeping that heartbeat strong. SEO for PR is a “must know” skill.
13 May 07:25

Best Times to Post on Social Media [INFOGRAPHIC]

by Brianna5mith
Social media is 24/7. Someone is always tweeting, posting on Facebook, or uploading a new picture to instagram. However, for social media managers and businesses alike, this can be quite of a challenge. We obviously can’t be online all day, even for those of us who are social media managers or strategist. But how do you know when to best reach your audience?
13 May 07:25

A 3-Step Guide to Tracking the ROI of a Facebook-Promoted Post

by adespressokristina
When you have a really important blog post, article or landing page that you want many people in your Facebook community to see, you should share the link in a post and then promote that post. Here's a simple 3-step guide to tracking the ROI of your Promoted Posts on Facebook.
13 May 07:24

How to Effectively Manage a Social Media Team

by Engaged-Leadership
From a leadership perspective, social media can be a touchy decision. The return on investment (ROI) is hard to measure, let alone justify, and it’s not exactly clear, from a data-driven perspective, how socialization online works. The truth is online marketing has taken the forefront of most successful business marketing plans. Leaders can’t ignore the significant impact that social media has on bringing traffic to websites, and, therefore, converting visitors into sales leads.