Dealing with continuous-valued attributes

Podobne dokumenty
Hard-Margin Support Vector Machines

Linear Classification and Logistic Regression. Pascal Fua IC-CVLab

tum.de/fall2018/ in2357

Machine Learning for Data Science (CS4786) Lecture 24. Differential Privacy and Re-useable Holdout

TTIC 31210: Advanced Natural Language Processing. Kevin Gimpel Spring Lecture 9: Inference in Structured Prediction

Previously on CSCI 4622

Wprowadzenie do programu RapidMiner, część 2 Michał Bereta 1. Wykorzystanie wykresu ROC do porównania modeli klasyfikatorów

Machine Learning for Data Science (CS4786) Lecture11. Random Projections & Canonical Correlation Analysis

Rozpoznawanie twarzy metodą PCA Michał Bereta 1. Testowanie statystycznej istotności różnic między jakością klasyfikatorów

KORELACJA 1. Wykres rozrzutu ocena związku między zmiennymi X i Y. 2. Współczynnik korelacji Pearsona

Boosting. Sewoong Oh. CSE/STAT 416 University of Washington

Machine Learning for Data Science (CS4786) Lecture 11. Spectral Embedding + Clustering

Wprowadzenie do programu RapidMiner, część 3 Michał Bereta

Analysis of Movie Profitability STAT 469 IN CLASS ANALYSIS #2

Agnostic Learning and VC dimension

Wprowadzenie do programu RapidMiner, część 3 Michał Bereta

Wprowadzenie do programu RapidMiner Studio 7.6, część 9 Modele liniowe Michał Bereta

deep learning for NLP (5 lectures)

SSW1.1, HFW Fry #20, Zeno #25 Benchmark: Qtr.1. Fry #65, Zeno #67. like

Gradient Coding using the Stochastic Block Model

Compressing the information contained in the different indexes is crucial for performance when implementing an IR system

Maximum A Posteriori Chris Piech CS109, Stanford University

Zarządzanie sieciami telekomunikacyjnymi

TTIC 31210: Advanced Natural Language Processing. Kevin Gimpel Spring Lecture 8: Structured PredicCon 2

Helena Boguta, klasa 8W, rok szkolny 2018/2019

STATISTICAL METHODS IN BIOLOGY

Arrays -II. Arrays. Outline ECE Cal Poly Pomona Electrical & Computer Engineering. Introduction

Katowice, plan miasta: Skala 1: = City map = Stadtplan (Polish Edition)

Stargard Szczecinski i okolice (Polish Edition)

STATYSTYKA OD PODSTAW Z SYSTEMEM SAS. wersja 9.2 i 9.3. Szkoła Główna Handlowa w Warszawie

Drzewa klasyfikacyjne algorytm podstawowy

Weronika Mysliwiec, klasa 8W, rok szkolny 2018/2019

Automatyczne generowanie testów z modeli. Bogdan Bereza Automatyczne generowanie testów z modeli


Domy inaczej pomyślane A different type of housing CEZARY SANKOWSKI

KDD and DM 1 W8: REGUŁY DECYZYJNE. Nguyen Hung Son


Revenue Maximization. Sept. 25, 2018

Tychy, plan miasta: Skala 1: (Polish Edition)

Proposal of thesis topic for mgr in. (MSE) programme in Telecommunications and Computer Science

utrzymania swoich obecnych klientów i dowiedzia la sie, że metody data mining moga

MaPlan Sp. z O.O. Click here if your download doesn"t start automatically

Knovel Math: Jakość produktu

Wprowadzenie do programu RapidMiner, część 5 Michał Bereta

Wojewodztwo Koszalinskie: Obiekty i walory krajoznawcze (Inwentaryzacja krajoznawcza Polski) (Polish Edition)

Realizacja systemów wbudowanych (embeded systems) w strukturach PSoC (Programmable System on Chip)

Agenda. WEKA Podstawowe pojęcia. Przykład danych

DODATKOWE ĆWICZENIA EGZAMINACYJNE

ARNOLD. EDUKACJA KULTURYSTY (POLSKA WERSJA JEZYKOWA) BY DOUGLAS KENT HALL

Zakopane, plan miasta: Skala ok. 1: = City map (Polish Edition)

Algorytm FIREFLY. Michał Romanowicz Piotr Wasilewski

Uczenie ze wzmocnieniem

Wojewodztwo Koszalinskie: Obiekty i walory krajoznawcze (Inwentaryzacja krajoznawcza Polski) (Polish Edition)

Karpacz, plan miasta 1:10 000: Panorama Karkonoszy, mapa szlakow turystycznych (Polish Edition)

Convolution semigroups with linear Jacobi parameters

OpenPoland.net API Documentation

Stability of Tikhonov Regularization Class 07, March 2003 Alex Rakhlin

MS Visual Studio 2005 Team Suite - Performance Tool

Jak zasada Pareto może pomóc Ci w nauce języków obcych?

Odkrywanie współzależnych cech w danych silnie wielowymiarowy

LABORATORIUM 1: Program Evolutionary Algorithms

8. Drzewa decyzyjne, bagging, boosting i lasy losowe

Supervised Hierarchical Clustering with Exponential Linkage. Nishant Yadav

Patients price acceptance SELECTED FINDINGS

MoA-Net: Self-supervised Motion Segmentation. Pia Bideau, Rakesh R Menon, Erik Learned-Miller

Towards Stability Analysis of Data Transport Mechanisms: a Fluid Model and an Application

Egzamin maturalny z języka angielskiego na poziomie dwujęzycznym Rozmowa wstępna (wyłącznie dla egzaminującego)

European Crime Prevention Award (ECPA) Annex I - new version 2014

CEE 111/211 Agenda Feb 17

SubVersion. Piotr Mikulski. SubVersion. P. Mikulski. Co to jest subversion? Zalety SubVersion. Wady SubVersion. Inne różnice SubVersion i CVS

EGZAMIN MATURALNY Z JĘZYKA ANGIELSKIEGO POZIOM ROZSZERZONY MAJ 2010 CZĘŚĆ I. Czas pracy: 120 minut. Liczba punktów do uzyskania: 23 WPISUJE ZDAJĄCY

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Probability definition

Karpacz, plan miasta 1:10 000: Panorama Karkonoszy, mapa szlakow turystycznych (Polish Edition)

Miedzy legenda a historia: Szlakiem piastowskim z Poznania do Gniezna (Biblioteka Kroniki Wielkopolski) (Polish Edition)

Network Services for Spatial Data in European Geo-Portals and their Compliance with ISO and OGC Standards

On the Use of Stochastic Optimization in Chemical and Process Engineering

Rev Źródło:

Pielgrzymka do Ojczyzny: Przemowienia i homilie Ojca Swietego Jana Pawla II (Jan Pawel II-- pierwszy Polak na Stolicy Piotrowej) (Polish Edition)

Department of Electrical- and Information Technology. Dealing with stochastic processes

DM-ML, DM-FL. Auxiliary Equipment and Accessories. Damper Drives. Dimensions. Descritpion

Inverse problems - Introduction - Probabilistic approach

A Zadanie

Financial support for start-uppres. Where to get money? - Equity. - Credit. - Local Labor Office - Six times the national average wage (22000 zł)

Wojewodztwo Koszalinskie: Obiekty i walory krajoznawcze (Inwentaryzacja krajoznawcza Polski) (Polish Edition)

Few-fermion thermometry

Estimation and planing. Marek Majchrzak, Andrzej Bednarz Wroclaw,

New Roads to Cryptopia. Amit Sahai. An NSF Frontier Center

Cracow University of Economics Poland. Overview. Sources of Real GDP per Capita Growth: Polish Regional-Macroeconomic Dimensions

Selection of controller parameters Strojenie regulatorów

Ukryte funkcjonalności w oprogramowaniu i urządzeniach elektronicznych. mgr inż. Paweł Koszut

UMOWY WYPOŻYCZENIA KOMENTARZ


January 1st, Canvas Prints including Stretching. What We Use

Wybrzeze Baltyku, mapa turystyczna 1: (Polish Edition)

Drzewa decyzyjne i lasy losowe

Neural Networks (The Machine-Learning Kind) BCS 247 March 2019

Fig 5 Spectrograms of the original signal (top) extracted shaft-related GAD components (middle) and

Akademia Morska w Szczecinie. Wydział Mechaniczny

Transkrypt:

Dealing with continuous-valued attributes

An alternative measure: gain ratio

Handling incomplete training data

Handling attributes with different costs

Ensemble of Classifiers

Why Ensemble Works? Some unknown distribution Model 1 Model 2 Model 3 Model 4 Model 5 Model 6

Ensemble of Classifiers Data model 1 model 2 Ensemble model Combine multiple models into one! model k Basic idea is to learn a set of classifiers (experts) and to allow them to vote. Advantage: improvement in predictive accuracy. Disadvantage: it is difficult to understand an ensemble of classifiers.

Generating Base Classifiers Sampling training examples Train k classifiers on k subsets drawn from the training set Using different learning models Use all the training examples, but apply different learning algorithms Sampling features Train k classifiers on k subsets of features drawn from the feature space Learning randomly Introduce randomness into learning procedures

Majority vote D Original Training data Step 1: Build Multiple Classifiers C 1 C 2 C t -1 C t Step 2: Combine Classifiers C *

Why Majority Voting works? Suppose there are 25 base classifiers Each classifier has error rate, = 0.35 Assume errors made by classifiers are uncorrelated Probability that the ensemble classifier makes a wrong prediction: P( X 13) 25 i 13 25 i (1 ) i 25 i 0.06

Bagging Generate a random sample from training set Repeat this sampling procedure, getting a sequence of K independent training sets A corresponding sequence of classifiers C1,C2,,Ck is constructed for each of these training sets, by using the same classification algorithm To classify an unknown sample X, let each classifier predict. The Bagged Classifier C* then combines the predictions of the individual classifiers to generate the final outcome. (sometimes combination is simple voting)

Bagging classifiers Classifier generation Let n be the size of the training set. For each of t iterations: Sample n instances with replacement from the training set. Apply the learning algorithm to the sample. Store the resulting classifier. classification For each of the t classifiers: Bootstrap samples and Predict class of instance using classifier. Return class that classifiers: was predicted most often.

Bagging classifiers X 2

Boosting The final prediction is a combination of the prediction of several predictors. Differences between Boosting and previous methods? Its iterative. Boosting: Successive classifiers depends upon its predecessors. Previous methods : Individual classifiers were independent. Training Examples may have unequal weights. Look at errors from previous classifier step to decide how to focus on next iteration over data Set weights to focus more on hard examples. (the ones on which we committed mistakes in the previous iterations)

AdaBoost (algorithm) W(x) is the distribution of weights over the N training points W(x i )=1 Initially assign uniform weights W 0 (x) = 1/N for all x. At each iteration k : Find best weak classifier C k (x) using weights W k (x) Compute ε k the error rate as ε k = [ W(x i ) I(y i C k (x i )) ] / [ W(x i )] weight α k the classifier C k s weight in the final hypothesis Set α k = log ((1 ε k )/ε k ) For each x i, W k+1 (x i ) = W k (x i ) exp[α k I(y i C k (x i ))] C FINAL (x) =sign [ α i C i (x) ] L(y, f (x)) = exp(-y f (x)) - the exponential loss function

AdaBoost - example Original Training set : Equal Weights to all training samples

AdaBoost - example ROUND 1

AdaBoost - example ROUND 2

AdaBoost - example ROUND 3

AdaBoost - example

...... N examples Random Forest M features Take he majority vote

Random Forest Classifier generation Let n be the size of the training set. For each of t iterations: (1) Sample n instances with replacement from the training set. (2) Learn a decision tree s.t. the variable for any new node is the best variable among m randomly selected variables. (3) Store the resulting decision tree. Classification For each of the t decision trees: Predict class of instance. Return class that was predicted most often.

Rodzaje drzew decyzyjnych Podział drzew ze wzglęgu na rodzaj badań: drzewa klasyfikacyjne drzewa regresyjne (np. CART, REPTree) drzewa modelowe (np. M5, SMOTI) Odpowiedź na pytanie typu: Każdy liść zawiera model regresji liniowej (bądź nieliniowej). Czy Jaka otrzymam jest moja kredyt? zdolność kredytowa? Znajduje rozwiązanie zapewniające możliwie maksymalną dokładność parametrycznej reprezentacji funkcji docelowej. nie < 30 000 Umowa o pracę tak Roczny przychód < 100 000 >= 30 000 Zadłużenie < 80 Przykład decyzji w liściu Liście Każdy w liść drzewie drzewa klasyfikacyjnym regresyjnego zawierają wartość decyzję średnią (klasę) zmiennej zależnej (przewidywanej) wszystkich obiektów w nim się znajdujących >= 100 000 Wiek Przykładowa funkcja docelowa: >= 80 Zdolność kredytowa = 4*roczny przychód 1.5*zadłużenie 0.7*wiek

Regression trees Build a regression tree: Divide the predictor space into J distinct not overlapping regions R 1,R 2,R 3,,R J We make the same prediction for all observations in the same region; use the mean of responses for all training observations that are in the region

Regression trees

Regression trees

Regression trees

Recursive binary splitting

Regression tree - example

Overfitting

Regression Trees Like decision trees, but: Splitting criterion: minimize intra-subset variation Termination criterion: std. dev. becomes small Pruning criterion: based on numeric error measure Prediction: Leaf predicts average class value of instances Yields piecewise constant functions Easy to interpret More sophisticated version: model trees

Model trees Build a regression tree Each leaf linear regression function Smoothing: factor in ancestor s predictions Smoothing formula: Same effect can be achieved by incorporating ancestor models into the leaves Need linear regression function at each node At each node, use only a subset of attributes to build linear regression model Those occurring in subtree p' = np+ kq n+ k (+maybe those occurring in path to the root) Fast: tree usually uses only a small subset of the attributes

Building the tree Splitting: standard deviation reduction / squared error reduction Termination of splitting process: Standard deviation < 5% of its value on full training set Too few instances remain (e.g., < 4) Pruning: Heuristic estimate of n+ absolute v error of linear regression models: n- v average_absolute_error Greedily remove terms from LR models to minimize estimated error Proceed bottom up: compare error of LR model at internal node to error of subtree (this happens before smoothing is applied) Heavy pruning: single model may replace whole subtree

Metody wygładzania (smoothing) Wymaga wygenerowania modelu liniowego dla każdego węzła wewnętrznego w drzewie Osiąga dobre rezultaty gdy: modele na ścieżce przewidują różne wartości modele konstruowane są dla niewielkiej ilości obiektów uczących

Inne aspekty Umożliwienie poszukiwania rozwiązań gdy koszty niedoszacowania i przeszacowania są inne Różne funkcje kosztówkosztów np. LinLin, QuadQuad, LinEx Wartości brakujące Surrogate splits

Drzewa modelowe / regresja liniowa https://www.geogebra.org/m/fue3hfrf http://www.graphpad.com/quickcalcs/linear1/

Drzewa modelowe / regresja liniowa Zagrożenie gdy nowe dane są spoza zakresu!!!

Globalna vs lokalna indukcja Przykład sztucznego zbioru danych opisanego funkcją: Lokalnie Globalnie optymalne optymalne (zachłanne) rozwiązanie rozwiązanie podziały minimalizują odchylenie standardowe. Kolejne testy Pierwszy są już wynikiem podział nieoptymalnego węzła jest dla x 1 podziału > -1.2 w korzeniu

Algorytmy ewolucyjne i drzewa decyzyjne Algorytmy ewolucyjne: zbiór metod optymalizacji inspirowany naturalnym procesem ewolucji wykorzystują oparte na populacji losowe różnicowanie i selekcję wzajemne przenikanie się różnych technik: algorytmy genetyczne, strategie ewolucyjne, programowanie genetyczne,... efektywne w unikaniu minimów lokalnych Algorytmy ewolucyjne jako narzędzie indukcji drzew: umożliwia równoczesne poszukiwanie struktury drzewa oraz wszystkich testów możliwość wykorzystania znajomości problemu

Gdzie dalej? Ewolucyjna indukcja drzew Drzewa rozmyte (fuzzy) Algorytmy równoległe i rozproszone - MPI/OpenMP/GPGPU, Hadoop, Hive

Soft Computing / Evolutionary Computation

Typical framework of EA algorihm

Selection Selection is a procedure of picking parent chromosome to produce off-spring. Types of selection: Random Selection Parents are selected randomly from the population. Proportional Selection probabilities for picking each chromosome is calculated as: P(x i ) = f(x i )/Σf(x j ) for all j Rank Based Selection This method uses ranks instead of absolute fitness values. P(x i ) = (1/β)(1 e r(x i ) )

Roulette Wheel Selection Let i = 1, where i denotes chromosome index; Calculate P(x i ) using proportional selection; sum = P(x i ); choose r ~ U(0,1); while sum < r do i = i + 1; i.e. next chromosome sum = sum + P(x i ); end return x i as one of the selected parent; repeat until all parents are selected

Reproduction Reproduction is a processes of creating new chromosomes out of chromosomes in the population. Parents are put back into population after reproduction. Cross-over and Mutation are two parts in reproduction of an off-spring. Cross-over : It is a process of creating one or more new individuals through the combination of genetic material randomly selected from two or parents.

Cross-over Uniform cross-over : where corresponding bit positions are randomly exchanged between two parents. One point : random bit is selected and entire substring after the bit is swapped. Two point : two bits are selected and the substring between the bits is swapped. Uniform Cross-over One point Cross-over Two point Cross-over Parent1 Parent2 00110110 11011011 00110110 11011011 00110110 11011011 Off-spring1 Off-spring2 01110111 10011010 00111011 11010110 01011010 10110111

Mutation Mutation procedures depend upon the representation schema of the chromosomes. This is to prevent falling all solutions in population into a local optimum. For a bit-vector representation: random mutation : randomly negates bits in-order mutation : performs random mutation between two randomly selected bit position. Random Mutation In-order Mutation Before mutation 1110010011 1110010011 After mutation 1100010111 1110011010

http://www.puremango.co.uk/genetic-hello-world.html http://boxcar2d.com/