Top Banner
1 DATA MINING DATA MINING Source : Source : Margaret H. Dunham Margaret H. Dunham Department of Computer Science and Engineering Department of Computer Science and Engineering Southern Methodist University Southern Methodist University Companion slides for the text by Dr. M.H.Dunham, Companion slides for the text by Dr. M.H.Dunham, Data Mining, Data Mining, Introductory and Advanced Topics Introductory and Advanced Topics , Prentice Hall, 2002. , Prentice Hall, 2002.
76

DATA MINING

Mar 20, 2016

Download

Documents

young young

DATA MINING. Source : Margaret H. Dunham Department of Computer Science and Engineering Southern Methodist University Companion slides for the text by Dr. M.H.Dunham, Data Mining, Introductory and Advanced Topics , Prentice Hall, 2002. Introduction Outline. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DATA MINING

11

DATA MININGDATA MINING

Source :Source :Margaret H. DunhamMargaret H. Dunham

Department of Computer Science and EngineeringDepartment of Computer Science and EngineeringSouthern Methodist UniversitySouthern Methodist University

Companion slides for the text by Dr. M.H.Dunham, Companion slides for the text by Dr. M.H.Dunham, Data Mining, Data Mining, Introductory and Advanced TopicsIntroductory and Advanced Topics, Prentice Hall, 2002., Prentice Hall, 2002.

Page 2: DATA MINING

22

Introduction OutlineIntroduction Outline

• Define data miningDefine data mining• Data mining vs. databasesData mining vs. databases• Basic data mining tasksBasic data mining tasks• Data mining developmentData mining development• Data mining issuesData mining issues

Goal:Goal: Provide an overview of data mining. Provide an overview of data mining.

Page 3: DATA MINING

33

IntroductionIntroduction• Data is growing at a phenomenal Data is growing at a phenomenal

raterate• Users expect more sophisticated Users expect more sophisticated

informationinformation• How?How?

UNCOVER HIDDEN INFORMATIONUNCOVER HIDDEN INFORMATIONDATA MININGDATA MINING

Page 4: DATA MINING

44

Data Mining DefinitionData Mining Definition

• Finding hidden information in Finding hidden information in a databasea database

• Fit data to a modelFit data to a model• Similar termsSimilar terms

– Exploratory data analysisExploratory data analysis– Data driven discoveryData driven discovery– Deductive learningDeductive learning

Page 5: DATA MINING

55

Database Processing vs. Database Processing vs. Data Mining ProcessingData Mining Processing• QueryQuery

– Well definedWell defined– SQLSQL

• QueryQuery– Poorly definedPoorly defined– No precise query languageNo precise query language

DataData– Operational dataOperational data

OutputOutput– PrecisePrecise– Subset of databaseSubset of database

DataData– Not operational dataNot operational data

OutputOutput– FuzzyFuzzy– Not a subset of databaseNot a subset of database

Page 6: DATA MINING

66

Query ExamplesQuery Examples• DatabaseDatabase

• Data MiningData Mining

– Find all customers who have purchased milkFind all customers who have purchased milk

– Find all items which are frequently purchased Find all items which are frequently purchased with milk. (association rules)with milk. (association rules)

– Find all credit applicants with last name of Smith.Find all credit applicants with last name of Smith.– Identify customers who have purchased more Identify customers who have purchased more than $10,000 in the last month.than $10,000 in the last month.

– Find all credit applicants who are poor credit Find all credit applicants who are poor credit risks. (classification)risks. (classification)– Identify customers with similar buying habits. Identify customers with similar buying habits. (Clustering)(Clustering)

Page 7: DATA MINING

77

Data Mining Models and Data Mining Models and TasksTasks

Page 8: DATA MINING

88

Basic Data Mining TasksBasic Data Mining Tasks• Classification Classification maps data into predefined maps data into predefined

groups or classesgroups or classes– Supervised learningSupervised learning– Pattern recognitionPattern recognition– PredictionPrediction

• RegressionRegression is used to map a data item to a is used to map a data item to a real valued prediction variable.real valued prediction variable.

• Clustering Clustering groups similar data together into groups similar data together into clusters.clusters.– Unsupervised learningUnsupervised learning– SegmentationSegmentation– PartitioningPartitioning

Page 9: DATA MINING

99

Basic Data Mining Tasks Basic Data Mining Tasks (cont’d)(cont’d)• Summarization Summarization maps data into subsets maps data into subsets

with associated simple descriptions.with associated simple descriptions.– CharacterizationCharacterization– GeneralizationGeneralization

• Link AnalysisLink Analysis uncovers relationships uncovers relationships among data.among data.– Affinity AnalysisAffinity Analysis– Association RulesAssociation Rules– Sequential Analysis determines sequential Sequential Analysis determines sequential

patterns.patterns.

Page 10: DATA MINING

1010

Ex: Time Series AnalysisEx: Time Series Analysis• Example: Stock MarketExample: Stock Market• Predict future valuesPredict future values• Determine similar patterns over timeDetermine similar patterns over time• Classify behaviorClassify behavior

Page 11: DATA MINING

1111

Data Mining vs. KDDData Mining vs. KDD

• Knowledge Discovery in Knowledge Discovery in Databases (KDD):Databases (KDD): process of process of finding useful information and finding useful information and patterns in data.patterns in data.

• Data Mining:Data Mining: Use of algorithms to Use of algorithms to extract the information and patterns extract the information and patterns derived by the KDD process. derived by the KDD process.

Page 12: DATA MINING

1212

KDD ProcessKDD Process

• Selection:Selection: Obtain data from various Obtain data from various sources.sources.

• Preprocessing:Preprocessing: Cleanse data. Cleanse data.• Transformation:Transformation: Convert to common Convert to common

format. Transform to new format.format. Transform to new format.• Data Mining:Data Mining: Obtain desired results. Obtain desired results.• Interpretation/Evaluation:Interpretation/Evaluation: Present Present

results to user in meaningful manner.results to user in meaningful manner.

Modified from [FPSS96C]

Page 13: DATA MINING

1313

KDD Process Ex: Web LogKDD Process Ex: Web Log• Selection:Selection:

– Select log data (dates and locations) to useSelect log data (dates and locations) to use• Preprocessing:Preprocessing:

– Remove identifying URLsRemove identifying URLs– Remove error logsRemove error logs

• Transformation:Transformation: – Sessionize (sort and group)Sessionize (sort and group)

• Data Mining:Data Mining: – Identify and count patternsIdentify and count patterns– Construct data structureConstruct data structure

• Interpretation/Evaluation:Interpretation/Evaluation:– Identify and display frequently accessed sequences.Identify and display frequently accessed sequences.

• Potential User Applications:Potential User Applications:– Cache predictionCache prediction– PersonalizationPersonalization

Page 14: DATA MINING

1414

Data Mining DevelopmentData Mining Development•Similarity Measures•Hierarchical Clustering•IR Systems•Imprecise Queries•Textual Data•Web Search Engines

•Bayes Theorem•Regression Analysis•EM Algorithm•K-Means Clustering•Time Series Analysis

•Neural Networks•Decision Tree Algorithms

•Algorithm Design Techniques•Algorithm Analysis•Data Structures

•Relational Data Model•SQL•Association Rule Algorithms•Data Warehousing•Scalability Techniques

Page 15: DATA MINING

1515

KDD IssuesKDD Issues• Human InteractionHuman Interaction• OverfittingOverfitting • OutliersOutliers • InterpretationInterpretation• Visualization Visualization • Large DatasetsLarge Datasets• High DimensionalityHigh Dimensionality

Page 16: DATA MINING

1616

KDD Issues (cont’d)KDD Issues (cont’d)• Multimedia DataMultimedia Data• Missing DataMissing Data• Irrelevant DataIrrelevant Data• Noisy DataNoisy Data• Changing DataChanging Data• IntegrationIntegration• ApplicationApplication

Page 17: DATA MINING

1717

Social Implications of DMSocial Implications of DM• Privacy Privacy • ProfilingProfiling• Unauthorized useUnauthorized use

Page 18: DATA MINING

1818

Data Mining MetricsData Mining Metrics• UsefulnessUsefulness• Return on Investment (ROI)Return on Investment (ROI)• AccuracyAccuracy• Space/TimeSpace/Time

Page 19: DATA MINING

1919

Database Perspective on Database Perspective on Data MiningData Mining• ScalabilityScalability• Real World DataReal World Data• UpdatesUpdates• Ease of UseEase of Use

Page 20: DATA MINING

2020

Visualization TechniquesVisualization Techniques• GraphicalGraphical• GeometricGeometric• Icon-basedIcon-based• Pixel-basedPixel-based• HierarchicalHierarchical• HybridHybrid

Page 21: DATA MINING

2121

Related Concepts OutlineRelated Concepts Outline

• Database/OLTP SystemsDatabase/OLTP Systems• Fuzzy Sets and LogicFuzzy Sets and Logic• Information Retrieval(Web Search Engines)Information Retrieval(Web Search Engines)• Dimensional ModelingDimensional Modeling• Data WarehousingData Warehousing• OLAP/DSSOLAP/DSS• StatisticsStatistics• Machine LearningMachine Learning• Pattern MatchingPattern Matching

Goal:Goal: Examine some areas which are related to Examine some areas which are related to data mining.data mining.

Page 22: DATA MINING

2222

DB & OLTP SystemsDB & OLTP Systems• SchemaSchema

– (ID,Name,Address,Salary,JobNo)(ID,Name,Address,Salary,JobNo)• Data ModelData Model

– ERER– RelationalRelational

• TransactionTransaction• Query:Query:

SELECT NameSELECT NameFROM TFROM TWHERE Salary > 100000WHERE Salary > 100000

DM: Only imprecise queriesDM: Only imprecise queries

Page 23: DATA MINING

2323

Fuzzy Sets and LogicFuzzy Sets and Logic• Fuzzy Set:Fuzzy Set: Set membership function is a real Set membership function is a real

valued function with output in the range [0,1].valued function with output in the range [0,1].• f(x): Probability x is in F.f(x): Probability x is in F.• 1-f(x): Probability x is not in F.1-f(x): Probability x is not in F.• EX:EX:

– T = {x | x is a person and x is tall}T = {x | x is a person and x is tall}– Let f(x) be the probability that x is tallLet f(x) be the probability that x is tall– Here f is the membership functionHere f is the membership function

DM: DM: Prediction and classification are Prediction and classification are fuzzy.fuzzy.

Page 24: DATA MINING

2424

Fuzzy SetsFuzzy Sets

Page 25: DATA MINING

2525

Classification/Prediction is Classification/Prediction is FuzzyFuzzy

Loan

Amnt

Simple Fuzzy

Accept Accept

RejectReject

Page 26: DATA MINING

2626

Information Retrieval Information Retrieval • Information Retrieval (IR):Information Retrieval (IR): retrieving desired retrieving desired

information from textual data.information from textual data.• Library ScienceLibrary Science• Digital LibrariesDigital Libraries• Web Search EnginesWeb Search Engines• Traditionally keyword basedTraditionally keyword based• Sample query:Sample query:

Find all documents about “data mining”.Find all documents about “data mining”.

DM: Similarity measures; DM: Similarity measures; Mine text/Web data.Mine text/Web data.

Page 27: DATA MINING

2727

IR Query Result Measures IR Query Result Measures and Classificationand Classification

IR Classification

Page 28: DATA MINING

2828

Dimensional ModelingDimensional Modeling• View data in a hierarchical manner more as View data in a hierarchical manner more as

business executives mightbusiness executives might• Useful in decision support systems and Useful in decision support systems and

miningmining• Dimension:Dimension: collection of logically related collection of logically related

attributes; axis for modeling data.attributes; axis for modeling data.• Facts:Facts: data stored data stored• Ex: Dimensions – products, locations, dateEx: Dimensions – products, locations, date

Facts – quantity, unit priceFacts – quantity, unit price

DM: May view data as dimensional.DM: May view data as dimensional.

Page 29: DATA MINING

2929

Relational View of DataRelational View of Data

ProdID LocID Date Quantity UnitPrice 123 Dallas 022900 5 25 123 Houston 020100 10 20 150 Dallas 031500 1 100 150 Dallas 031500 5 95 150 Fort

Worth 021000 5 80

150 Chicago 012000 20 75 200 Seattle 030100 5 50 300 Rochester 021500 200 5 500 Bradenton 022000 15 20 500 Chicago 012000 10 25 1

Page 30: DATA MINING

3030

Dimensional Modeling Dimensional Modeling QueriesQueries•Roll Up:Roll Up: more general dimension more general dimension•Drill Down:Drill Down: more specific dimension more specific dimension• Dimension (Aggregation) HierarchyDimension (Aggregation) Hierarchy• SQL uses aggregationSQL uses aggregation•Decision Support Systems (DSS):Decision Support Systems (DSS):

Computer systems and tools to assist Computer systems and tools to assist managers in making decisions and managers in making decisions and solving problems.solving problems.

Page 31: DATA MINING

3131

Cube view of DataCube view of Data

Page 32: DATA MINING

3232

Aggregation Aggregation HierarchiesHierarchies

Page 33: DATA MINING

3333

Data WarehousingData Warehousing• ““Subject-oriented, integrated, time-variant, Subject-oriented, integrated, time-variant,

nonvolatile” William Inmonnonvolatile” William Inmon• Operational Data:Operational Data: Data used in day to day needs Data used in day to day needs

of company.of company.• Informational Data:Informational Data: Supports other functions such Supports other functions such

as planning and forecasting.as planning and forecasting.• Data mining tools often access data warehouses Data mining tools often access data warehouses

rather than operational data.rather than operational data.

DM: May access data in warehouse.DM: May access data in warehouse.

Page 34: DATA MINING

3434

Operational vs. Operational vs. InformationalInformational

  Operational Data Data Warehouse

Application OLTP OLAPUse Precise Queries Ad HocTemporal Snapshot HistoricalModification Dynamic StaticOrientation Application BusinessData Operational Values IntegratedSize Gigabits TerabitsLevel Detailed SummarizedAccess Often Less OftenResponse Few Seconds MinutesData Schema Relational Star/Snowflake

Page 35: DATA MINING

3535

OLAPOLAP• Online Analytic Processing (OLAP):Online Analytic Processing (OLAP): provides provides

more complex queries than OLTP.more complex queries than OLTP.• OnLine Transaction Processing (OLTP):OnLine Transaction Processing (OLTP):

traditional database/transaction processing.traditional database/transaction processing.• Dimensional data; cube view Dimensional data; cube view • Visualization of operations:Visualization of operations:

– Slice:Slice: examine sub-cube. examine sub-cube.– Dice:Dice: rotate cube to look at another dimension. rotate cube to look at another dimension.– Roll Up/Drill DownRoll Up/Drill Down

DM: May use OLAP queries.DM: May use OLAP queries.

Page 36: DATA MINING

3636

OLAP OperationsOLAP Operations

Single Cell Multiple Cells Slice Dice

Roll Up

Drill Down

Page 37: DATA MINING

3737

StatisticsStatistics• Simple descriptive modelsSimple descriptive models• Statistical inference:Statistical inference: generalizing a generalizing a

model created from a sample of the data model created from a sample of the data to the entire dataset.to the entire dataset.

• Exploratory Data Analysis:Exploratory Data Analysis: – Data can actually drive the creation of Data can actually drive the creation of

the modelthe model– Opposite of traditional statistical view.Opposite of traditional statistical view.

• Data mining targeted to business userData mining targeted to business user

DM: Many data mining methods DM: Many data mining methods come from statistical come from statistical techniques. techniques.

Page 38: DATA MINING

3838

Machine LearningMachine Learning• Machine Learning:Machine Learning: area of AI that examines how to area of AI that examines how to

write programs that can learn.write programs that can learn.• Often used in classification and prediction Often used in classification and prediction • Supervised Learning:Supervised Learning: learns by example. learns by example.• Unsupervised Learning: Unsupervised Learning: learns without knowledge learns without knowledge

of correct answers.of correct answers.• Machine learning often deals with small static datasets. Machine learning often deals with small static datasets.

DM: Uses many machine learning DM: Uses many machine learning techniques.techniques.

Page 39: DATA MINING

3939

Pattern Matching Pattern Matching (Recognition)(Recognition)•Pattern Matching:Pattern Matching: finds occurrences of finds occurrences of

a predefined pattern in the data.a predefined pattern in the data.• Applications include speech recognition, Applications include speech recognition,

information retrieval, time series information retrieval, time series analysis.analysis.

DM: Type of classification.DM: Type of classification.

Page 40: DATA MINING

4040

DM vs. Related TopicsDM vs. Related TopicsArea Query Data Result

s Output

DB/OLTP

Precise

Database Precise

DB Objects or Aggregation

IR Precise

Documents Vague Documents

OLAP Analysis

Multidimensional

Precise

DB Objects or Aggregation

DM Vague Preprocessed Vague KDD Objects

Page 41: DATA MINING

4141

Data Mining Techniques Data Mining Techniques OutlineOutline

• StatisticalStatistical– Point EstimationPoint Estimation– Models Based on SummarizationModels Based on Summarization– Bayes TheoremBayes Theorem– Hypothesis TestingHypothesis Testing– Regression and CorrelationRegression and Correlation

• Similarity MeasuresSimilarity Measures• Decision TreesDecision Trees• Neural NetworksNeural Networks

– Activation FunctionsActivation Functions• Genetic AlgorithmsGenetic Algorithms

Goal:Goal: Provide an overview of basic data Provide an overview of basic data mining techniquesmining techniques

Page 42: DATA MINING

4242

Point EstimationPoint Estimation• Point Estimate:Point Estimate: estimate a population estimate a population

parameter.parameter.• May be made by calculating the May be made by calculating the

parameter for a sample.parameter for a sample.• May be used to predict value for missing May be used to predict value for missing

data.data.• Ex: Ex:

– R contains 100 employeesR contains 100 employees– 99 have salary information99 have salary information– Mean salary of these is $50,000Mean salary of these is $50,000– Use $50,000 as value of remaining Use $50,000 as value of remaining

employee’s salary. employee’s salary. Is this a good idea?Is this a good idea?

Page 43: DATA MINING

4343

Estimation ErrorEstimation Error• Bias: Bias: Difference between expected value and actual Difference between expected value and actual

value.value.

• Mean Squared Error (MSE):Mean Squared Error (MSE): expected value of the expected value of the squared difference between the estimate and the squared difference between the estimate and the actual value:actual value:

• Why square?Why square?• Root Mean Square Error (RMSE)Root Mean Square Error (RMSE)

Page 44: DATA MINING

4444

Expectation-Maximization Expectation-Maximization (EM)(EM)

• Solves estimation with incomplete data.Solves estimation with incomplete data.• Obtain initial estimates for parameters.Obtain initial estimates for parameters.• Iteratively use estimates for missing Iteratively use estimates for missing

data and continue until convergence.data and continue until convergence.

Page 45: DATA MINING

4545

EM ExampleEM Example

Page 46: DATA MINING

4646

EM AlgorithmEM Algorithm

Page 47: DATA MINING

4747

Bayes TheoremBayes Theorem• Posterior Probability:Posterior Probability: P(hP(h11|x|xii))• Prior Probability:Prior Probability: P(h P(h11))• Bayes Theorem:Bayes Theorem:

• Assign probabilities of hypotheses given a data value.Assign probabilities of hypotheses given a data value.

Page 48: DATA MINING

4848

Bayes Theorem ExampleBayes Theorem Example• Credit authorizations (hypotheses): Credit authorizations (hypotheses):

hh11=authorize purchase, h=authorize purchase, h2 2 = authorize after = authorize after further identification, hfurther identification, h33=do not authorize, =do not authorize, h h44= do not authorize but contact police= do not authorize but contact police

• Assign twelve data values for all Assign twelve data values for all combinations of credit and income:combinations of credit and income:

• From training data: P(hFrom training data: P(h11) = 60%; ) = 60%; P(hP(h22)=20%; P(h)=20%; P(h33)=10%; P(h)=10%; P(h44)=10%.)=10%.

1 2 3 4 Excellent x1 x2 x3 x4 Good x5 x6 x7 x8 Bad x9 x10 x11 x12

Page 49: DATA MINING

4949

Bayes Example(cont’d)Bayes Example(cont’d)• Training Data:Training Data:

ID Income Credit Class xi 1 4 Excellent h1 x4 2 3 Good h1 x7 3 2 Excellent h1 x2 4 3 Good h1 x7 5 4 Good h1 x8 6 2 Excellent h1 x2 7 3 Bad h2 x11 8 2 Bad h2 x10 9 3 Bad h3 x11 10 1 Bad h4 x9

Page 50: DATA MINING

5050

Bayes Bayes Example(cont’d)Example(cont’d)

• Calculate P(xCalculate P(xii|h|hjj) and P(x) and P(xii))• Ex: P(xEx: P(x77|h|h11)=2/6; P(x)=2/6; P(x44|h|h11)=1/6; P(x)=1/6; P(x22|h|h11)=2/6; )=2/6;

P(xP(x88|h|h11)=1/6; P(x)=1/6; P(xii|h|h11)=0 for all other x)=0 for all other xii..• Predict the class for xPredict the class for x44::

– Calculate P(hCalculate P(hjj|x|x44) for all h) for all hjj. . – Place xPlace x4 4 in class with largest value.in class with largest value.– Ex: Ex:

•P(hP(h11|x|x44)=(P(x)=(P(x44|h|h11)(P(h)(P(h11))/P(x))/P(x44)) =(1/6)(0.6)/0.1=1. =(1/6)(0.6)/0.1=1.

•xx4 4 in class hin class h11..

Page 51: DATA MINING

5151

RegressionRegression• Predict future values based on past Predict future values based on past

valuesvalues• Linear RegressionLinear Regression assumes linear assumes linear

relationship exists.relationship exists.y = cy = c00 + c + c11 x x11 + … + c + … + cnn x xnn

• Find values to best fit the dataFind values to best fit the data

Page 52: DATA MINING

5252

Linear RegressionLinear Regression

Page 53: DATA MINING

5353

CorrelationCorrelation• Examine the degree to which the Examine the degree to which the

values for two variables behave values for two variables behave similarly.similarly.

• Correlation coefficient r:Correlation coefficient r:• 1 = perfect correlation1 = perfect correlation• -1 = perfect but opposite correlation-1 = perfect but opposite correlation• 0 = no correlation0 = no correlation

Page 54: DATA MINING

5454

Similarity MeasuresSimilarity Measures• Determine similarity between two Determine similarity between two

objects.objects.• Similarity characteristics:Similarity characteristics:

• Alternatively, distance measure measure Alternatively, distance measure measure how unlike or dissimilar objects are.how unlike or dissimilar objects are.

Page 55: DATA MINING

5555

Similarity MeasuresSimilarity Measures

Page 56: DATA MINING

5656

Distance MeasuresDistance Measures• Measure dissimilarity between objectsMeasure dissimilarity between objects

Page 57: DATA MINING

5757

Decision TreesDecision Trees• Decision Tree (DT):Decision Tree (DT):

– Tree where the root and each internal Tree where the root and each internal node is labeled with a question. node is labeled with a question.

– The arcs represent each possible answer The arcs represent each possible answer to the associated question. to the associated question.

– Each leaf node represents a prediction of Each leaf node represents a prediction of a solution to the problem.a solution to the problem.

• Popular technique for classification; Popular technique for classification; Leaf node indicates class to which the Leaf node indicates class to which the corresponding tuple belongs.corresponding tuple belongs.

Page 58: DATA MINING

5858

Decision Tree ExampleDecision Tree Example

Page 59: DATA MINING

5959

Decision TreesDecision Trees• AA Decision Tree Model Decision Tree Model is a computational is a computational

model consisting of three parts:model consisting of three parts:– Decision TreeDecision Tree– Algorithm to create the treeAlgorithm to create the tree– Algorithm that applies the tree to data Algorithm that applies the tree to data

• Creation of the tree is the most difficult Creation of the tree is the most difficult part.part.

• Processing is basically a search similar to Processing is basically a search similar to that in a binary search tree (although DT that in a binary search tree (although DT may not be binary).may not be binary).

Page 60: DATA MINING

6060

Decision Tree AlgorithmDecision Tree Algorithm

Page 61: DATA MINING

6161

DT DT Advantages/DisadvantagesAdvantages/Disadvantages

• Advantages:Advantages:– Easy to understand. Easy to understand. – Easy to generate rulesEasy to generate rules

• Disadvantages:Disadvantages:– May suffer from overfitting.May suffer from overfitting.– Classifies by rectangular partitioning.Classifies by rectangular partitioning.– Does not easily handle nonnumeric data.Does not easily handle nonnumeric data.– Can be quite large – pruning is Can be quite large – pruning is

necessary.necessary.

Page 62: DATA MINING

6262

Neural Networks Neural Networks • Based on observed functioning of human Based on observed functioning of human

brain. brain. • (Artificial Neural Networks (ANN)(Artificial Neural Networks (ANN)• Our view of neural networks is very Our view of neural networks is very

simplistic. simplistic. • We view a neural network (NN) from a We view a neural network (NN) from a

graphical viewpoint.graphical viewpoint.• Alternatively, a NN may be viewed from the Alternatively, a NN may be viewed from the

perspective of matrices.perspective of matrices.• Used in pattern recognition, speech Used in pattern recognition, speech

recognition, computer vision, and recognition, computer vision, and classification.classification.

Page 63: DATA MINING

6363

Neural NetworksNeural Networks• Neural Network (NN)Neural Network (NN) is a directed graph is a directed graph

F=<V,A> with vertices V={1,2,…,n} and F=<V,A> with vertices V={1,2,…,n} and arcs A={<i,j>|1<=i,j<=n}, with the arcs A={<i,j>|1<=i,j<=n}, with the following restrictions:following restrictions:– V is partitioned into a set of input nodes, VV is partitioned into a set of input nodes, V II, ,

hidden nodes, Vhidden nodes, VHH, and output nodes, V, and output nodes, VOO..– The vertices are also partitioned into layers The vertices are also partitioned into layers – Any arc <i,j> must have node i in layer h-1 Any arc <i,j> must have node i in layer h-1

and node j in layer h.and node j in layer h.– Arc <i,j> is labeled with a numeric value Arc <i,j> is labeled with a numeric value

wwijij..– Node i is labeled with a function fNode i is labeled with a function fii..

Page 64: DATA MINING

6464

Neural Network Neural Network ExampleExample

Page 65: DATA MINING

6565

NN NodeNN Node

Page 66: DATA MINING

6666

NN Activation NN Activation FunctionsFunctions• Functions associated with nodes Functions associated with nodes

in graph.in graph.• Output may be in range [-1,1] or Output may be in range [-1,1] or

[0,1][0,1]

Page 67: DATA MINING

6767

NN Activation NN Activation FunctionsFunctions

Page 68: DATA MINING

6868

NN LearningNN Learning

• Propagate input values through Propagate input values through graph.graph.

• Compare output to desired output.Compare output to desired output.• Adjust weights in graph accordingly.Adjust weights in graph accordingly.

Page 69: DATA MINING

6969

Neural NetworksNeural Networks• A A Neural Network ModelNeural Network Model is a is a

computational model consisting of three computational model consisting of three parts:parts:– Neural Network graph Neural Network graph – Learning algorithm that indicates how Learning algorithm that indicates how

learning takes place.learning takes place.– Recall techniques that determine how Recall techniques that determine how

information is obtained from the information is obtained from the network. network.

Page 70: DATA MINING

7070

NN AdvantagesNN Advantages• LearningLearning• Can continue learning even after Can continue learning even after

training set has been applied.training set has been applied.• Easy parallelizationEasy parallelization• Solves many problemsSolves many problems

Page 71: DATA MINING

7171

NN DisadvantagesNN Disadvantages

• Difficult to understandDifficult to understand• May suffer from overfittingMay suffer from overfitting• Structure of graph must be Structure of graph must be

determined a priori.determined a priori.• Input values must be numeric.Input values must be numeric.• Verification difficult.Verification difficult.

Page 72: DATA MINING

7272

Genetic AlgorithmsGenetic Algorithms• Optimization search type algorithms. Optimization search type algorithms. • Creates an initial feasible solution and Creates an initial feasible solution and

iteratively creates new “better” solutions.iteratively creates new “better” solutions.• Based on human evolution and survival of Based on human evolution and survival of

the fitness.the fitness.• Must represent a solution as an individual.Must represent a solution as an individual.• Individual:Individual: string I=I string I=I11,I,I22,…,I,…,Inn where I where Ijj is in is in

given alphabet A. given alphabet A. • Each character IEach character Ij j is called a is called a genegene.. • Population:Population: set of individuals. set of individuals.

Page 73: DATA MINING

7373

Genetic AlgorithmsGenetic Algorithms• A A Genetic Algorithm (GA)Genetic Algorithm (GA) is a is a

computational model consisting of five parts:computational model consisting of five parts:– A starting set of individuals, P.A starting set of individuals, P.– CrossoverCrossover:: technique to combine two technique to combine two

parents to create offspring.parents to create offspring.– Mutation: Mutation: randomly change an individual.randomly change an individual.– Fitness: Fitness: determine the best individuals.determine the best individuals.– Algorithm which applies the crossover and Algorithm which applies the crossover and

mutation techniques to P iteratively using mutation techniques to P iteratively using the fitness function to determine the best the fitness function to determine the best individuals in P to keep. individuals in P to keep.

Page 74: DATA MINING

7474

Crossover ExamplesCrossover Examples

111 111

000 000

Parents Children

111 000

000 111

a) Single Crossover

111 111

Parents Children

111 000

000

a) Single Crossover

111 111

000 000

Parents

a) Multiple Crossover

111 111

000

Parents Children

111 000

000 111

Children

111 000

000 11100

11

00

11

Page 75: DATA MINING

7575

Genetic AlgorithmGenetic Algorithm

Page 76: DATA MINING

7676

GA GA Advantages/DisadvantagesAdvantages/Disadvantages• AdvantagesAdvantages

– Easily parallelizedEasily parallelized• DisadvantagesDisadvantages

– Difficult to understand and explain to Difficult to understand and explain to end users.end users.

– Abstraction of the problem and method Abstraction of the problem and method to represent individuals is quite difficult.to represent individuals is quite difficult.

– Determining fitness function is difficult.Determining fitness function is difficult.– Determining how to perform crossover Determining how to perform crossover

and mutation is difficult.and mutation is difficult.