I started with Emanuele's code and switched to data generated with scikit's "make classification" algorithm. I also added a Jupyter notebook blending demo : https://github.com/denson/kaggle_pbr
The general concept is that if we build multiple different models trained on different samples of our training data we get multiple predictions that are substantially better than chance and that are uncorrelated with each other.
In step 1 we take stratified fold samples of our training data and build multiple models (in this case RDF entropy,RDF-gini ET-entropy,ET-gini and GBT) on each fold. We then use the trained models to predict the training sample not in the training part of this fold. It is super important that you do not use a given model to predict training data that was used to train that model on that fold. We also predict all the test data with each model. These predictions are a way of transforming the training data and the test data into a different space with the predicted probabilities as the transformed information. We take a simple average of the predictions of each type of model (eg RDF-gini) and that becomes the transformed data for the next step. If we have 5 different models as in this case our input data for step 2 will have 5 columns and the same number of rows as the training set and test set respectively.
In step 2 we use a train a logistic regresson on the transformed training data and use it to predict the transformed test data. We take the predicted probabilities from the logistic regression as our final answer.
This method usually results in an improvement over a single highly tuned model for "hard" problems and not "simple" problems. By hard I mean that the decision boundary between classes is highly non-linear. Overlapping classes and non-linear relationships between features contribute to making problems hard.
This academic paper describes the concept:
Stacked Regressions
I found this at Kaggle:
Kaggle competion question
Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts
Saturday, April 1, 2017
Friday, September 4, 2015
Neural Network: A Step by Step Backpropagation Example
This great neural network tutorial goes step-by-step through backpropagation in training a neural network. There is also companion python code.
http://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/comment-page-1/
see also:
http://denson-data-science.blogspot.com/2015/09/a-neural-network-in-11-lines-of-python.html
http://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/comment-page-1/
see also:
http://denson-data-science.blogspot.com/2015/09/a-neural-network-in-11-lines-of-python.html
Tuesday, August 25, 2015
How to Select the Correct Encryption Approach
This article is a pretty good start at selecting an encryption method.
http://www.itbusinessedge.com/articles/how-to-select-the-correct-encryption-approach.html?google_editors_picks=true
http://www.itbusinessedge.com/articles/how-to-select-the-correct-encryption-approach.html?google_editors_picks=true
Thursday, July 30, 2015
Get Much Smarter About Machine Learning in 2 Minutes
This is a great presentation by Stephanie Yee and Tony Chu. It is targeted at people new to the concept/field of machine learning. There are excellent animations that make things very clear.
http://www.r2d3.us/visual-intro-to-machine-learning-part-1/
http://www.r2d3.us/visual-intro-to-machine-learning-part-1/
Wednesday, April 1, 2015
An Intuitive Explanation of Bayes' Theorem
This is a great introduction to Bayes' Theorem and strong evidence that a large majority of medical doctors are not scientists.
About 85% of doctors get this problem wrong!
http://www.yudkowsky.net/rational/bayes
About 85% of doctors get this problem wrong!
1% of women at age forty who participate in routine screening have breast cancer. 80% of women with breast cancer will get positive mammographies. 9.6% of women without breast cancer will also get positive mammographies. A woman in this age group had a positive mammography in a routine screening. What is the probability that she actually has breast cancer?
http://www.yudkowsky.net/rational/bayes
Thursday, January 8, 2015
Python for Data Science
This short primer on Python is designed to provide a rapid "on-ramp" to enable computer programmers who are already familiar with concepts and constructs in other programming languages learn enough about Python to facilitate the effective use of open-source and proprietary Python-based machine learning and data science tools.
http://nbviewer.ipython.org/github/gumption/Python_for_Data_Science/blob/master/1_Introduction.ipynb
Subscribe to:
Posts (Atom)