1 / 14

Learning Regression Trees

Learning Regression Trees. from Time-Changing Data Streams. Bla ž Sovdat August 27, 2014. The Stream Model. Example. ). (adult, female, 3 .141 , 0.577 ) (child, male, 2.1728, 0.1123) (child, female, 2.1728, 1.12) (child, male, 149, 1.23) ….

Download Presentation

Learning Regression Trees

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Learning Regression Trees from Time-Changing Data Streams BlažSovdat August 27, 2014

  2. The Stream Model Example • ) (adult, female, 3.141, 0.577) (child, male, 2.1728, 0.1123) (child, female, 2.1728, 1.12) (child, male, 149, 1.23) … • Data arrives in the form of examples (tuples) • Examples arrive sequentially, one by one • No control over the speed and order of arrival • The underlying “process” that generates stream examples might change (non-stationary data) • Use a limited amount of memory, independent of the size of the stream (infinite data)

  3. Data Stream ENVIRONMENT • Requirements of the data stream environment: • Process one example at a time, inspect it only once • Use a limited amount of memory • Work in a limited amount of time • Be ready to predict at any time • Typical use of data stream learner: • The learner receives a new example from the stream (1) • The learner processes the example (2, 3) • The learner is ready for the next example (4) • Different evaluation techniques Data stream prediction cycle Alfred Bifet and Richard Kirkby. Data Stream Mining: A Practical Approach. 2009.

  4. INTERMEZZO: DECISION TREES • Regression tree represents a mapping from attribute space to real numbers • Examples are tuples of attribute values • Each attribute has a range of possible values: • Discrete (also “categorial”) attribute: sex with range {male, female} • Numeric attribute: temperature with range R (reals) • The target attribute is a real number • Concrete example: Example: ((male,first,adult),no) Example Tom Mitchell. Machine Learning. McGraw Hill. 1997.

  5. Intermezzo: CART • Famous batch learner for regression trees • Start with a set of examples , i.e., the training set • Each example is of the form, where • Pick the attribute that maximizes standard deviation reduction (SDR) • Partition the set according to the attribute • Recursively apply the procedure on each subset L. Breiman, J. Friedman, C.J. Slone, R.A. Olshen. Classification and Regression Trees. CRC Press. 1984.

  6. A Problem • Let’s modify CART to a streaming setting • Data is not available in advance, and we only see a (small) sample of the stream • When and on what attribute to split? • What attribute is “the best” relative to the whole stream? • Idea:Apply Hoeffding bound to confidently decide when to split

  7. Simplified Hoeffding bound • Well-known result from probability, also known as additive Chernoff bound, proved by Wassily Hoeffding • Many applications in theoretical computer science (randomized algorithms, etc.) and machine learning (PAC bounds , Hoeffding trees, etc.) • Theorem(Hoeffding, 1963). Let be a sum of independent bounded random variables, with , and let . Then • The result is independent of the distribution Randomized Quicksort does at most comparisons “with high probability” Wassily Hoeffding. Probability Inequalities for Sums of Bounded Random Variables. Journal of the American Statistical Association. 1963. Rajeev Motwani, PrabhakarRaghavan. Randomized Algorithms. Cambridge University Press. 1995.

  8. Applying the Hoeffding Bound • Let and be the best and the second-best attributes (i.e. attributes with highest SDRs) • Let and be estimated standard deviation reductions, computed from examples, for attributes and • If , then with probability at least , where • To see this, solve for • Note that means is better than , i.e., it is obvious that iff, assuming SDRs are positive • This is all we need to scale up the CART learner: Each leaf accumulates examples until it is confident it found the “truly best” attribute Elena Ikonomovska. Algorithms for Learning Regression Trees and Ensembles on Evolving Data Streams. PhD thesis. 2012.

  9. Fast Incremental Model Trees • Learning: • Start with an empty leaf (the root node) • Sort a newly arrived example into a leaf • Update statistics, compute SDRs, and compute • Accumulate examples in the leaf until • Split the leaf: create new leaf nodes • Predicting: • Sort example down the tree, into a leaf • Predict the average of examples from the leaf The big picture Elena Ikonomovska. Algorithms for Learning Regression Trees and Ensembles on Evolving Data Streams. PhD thesis. 2012.

  10. Extensions of the FIMT Learner • Handling numeric attributes (histogram, BST, etc.) • Stopping criteria (tree size, thresholds, etc.) • Fitting a linear model in leaves (unthresholded perceptron) • Handling concept drift (with Page-Hinkley test)

  11. Regression trees in qminer • Syntacticallyno difference between regression and classification (almost) • A variant of the FIMT-DD learner available in QMiner • The learner exposed via QMiner Javascript API • Pass algorithm parameters and data stream specification in JSON format • Several stopping and splitting criteria • Change detection mechanism, using Page-Hinkley test • Can export the model anytime (XML and DOT formats supported) • Usage examples available on GitHub • The algorithm expects two (learning) or three (predicting) parameters: • vector of discrete attribute values; • vector of numeric attribute values; • target variable value (not needed for prediction)

  12. REGRESSION TREES IN QMINER // algorithm parameters varalgorithmParams = { "gracePeriod":300, "splitConfidence":1e-6, "tieBreaking":0.005, "driftCheck":1000, "windowSize":100000, "conceptDriftP":false, "maxNodes":15, "regLeafModel":"mean" "sdrThreshold":0.1, "sdThreshold":0.01, "phAlpha":0.005, "phLambda":50.0, "phInit":100, }; // describe the data stream varstreamConfig = { "dataFormat": ["A", "B", "Y"], "A": { "type":"discrete", "values": ["t", "f"] }, "B": { "type":"discrete", "values": ["t", "f"] }, "Y": { "type":"numeric" } }; //process the stream while (!streamData.eof) { /* parse example */ ht.process(vec_discrete, vec_numeric, target); } // use the model var val = ht.predict(["t", "f"], []); // export the model ht.exportModel({ "file":"./sandbox/ht/model.gv", "type":"DOT" }); // create a new learner var ht = analytics.newHoeffdingTree(streamConfig, algorithmParams);

  13. REGRESSION TREES IN QMINER • The algorithm is pretty fast: tens of thousands of examples per second • Scales poorly with the number of attributes (quadratic in ) • When using information gain as attribute selection criterion, needs time • Numeric attribute discretization is expensive (both space and time) • Would love to get feedback from people • From now on: Change the algorithm as needed

  14. THE END • Been flirting with NIPS 2013 paper • A completely different approach to regression tree learning • Essentially boils down to approximate nearest neighbor search • Very general setting (metric-measure spaces) • Strong theoretical guarantees SamoryKpotufe, Francesco Orabona.Regression-tree Tuning in a Streaming Setting. NIPS 2013.

More Related