cs2032 data warehousing and data mining

Click here to load reader

Upload: kris

Post on 06-Jan-2016

86 views

Category:

Documents


2 download

DESCRIPTION

CS2032 DATA WAREHOUSING AND DATA MINING. UNIT III - DATA MINING. Contents. Introduction Data Types of Data Data Mining Functionalities Interestingness of Patterns Classification of Data Mining Systems Data Mining Task Primitives - PowerPoint PPT Presentation

TRANSCRIPT

CS2032 DATA WAREHOUSING AND DATA MINING

UNIT III - DATA MINING1CS2032 DATA WAREHOUSING AND DATA MININGContents2IntroductionDataTypes of DataData Mining FunctionalitiesInterestingness of Patterns Classification of Data Mining SystemsData Mining Task PrimitivesIntegration of a Data Mining System with a Data WarehouseIssuesData Preprocessing.What is Data Mining?3Process of discovering interesting patterns and knowledge from large amount of data. Applications41. Fraud detection: credit cards, phone cards2. Marketing: customer targeting3. Data Warehousing: Walmart4. Astronomy5. Molecular biology

Knowledge Discovery (KDD) Process5Data miningcore of knowledge discovery processData CleaningData IntegrationDatabasesData WarehouseKnowledgeTask-relevant DataSelectionData MiningPattern Evaluation5Why Data Mining? 6Lots of data is being collected and warehoused Web data, e-commercepurchases at department/grocery storesBank/Credit Card transactionsComputers have become cheaper and more powerfulCompetitive Pressure is Strong Provide better, customized services for an edge (e.g. in Customer Relationship Management)

Type of Data7Database dataData WarehouseTransactional DataOther kinds of dataTime-related or sequence dataData StreamsSpatial DataEngineering Design dataHypertext and Multimedia DataWeb data

Data Mining Functionalities8Class/ Concepts DescriptionMining Frequent Patterns, Associations, and CorrelationsClassification and Regression for Predictive AnalysisCluster AnalysisOutlier AnalysisInterestingness of Patterns 9Easily understoodValidUsefulNovelData Mining Task Primitives10Task-relevant dataType of knowledge to be minedBackground knowledgePattern interestingness measurementsVisualization/presentation of discovered patterns

Issues11Mining MethodologyUser InteractionEfficiency and ScalabilityDiversity of Database TypesData Mining and Society

Data Preprocessing12An OverviewData CleaningData IntegrationData ReductionData Transformation and Data DiscretizationData Preprocessing: An Overview13Data Quality: Why preprocessing the Data?Major Tasks in Data PreprocessingForms of Data Preprocessing 14

Major Tasks in Data Preprocessing15Data cleaningFill in missing values, smooth noisy data, identify or remove outliers, and resolve inconsistenciesData integrationIntegration of multiple databases, data cubes, or filesData transformationNormalization and aggregationData reductionObtains reduced representation in volume but produces the same or similar analytical resultsData discretizationPart of data reduction but with particular importance, especially for numerical data

Data Cleaning16ImportanceData cleaning is one of the three biggest problems in data warehousingData cleaning is the number one problem in data warehousingData cleaning tasksFill in missing valuesIdentify outliers and smooth out noisy data Correct inconsistent dataResolve redundancy caused by data integrationMissing Data17Data is not always availableE.g., many tuples have no recorded value for several attributes, such as customer income in sales dataMissing data may be due to equipment malfunctioninconsistent with other recorded data and thus deleteddata not entered due to misunderstandingcertain data may not be considered important at the time of entrynot register history or changes of the dataMissing data may need to be inferred.

How to Handle Missing Data?18Ignore the tuple: usually done when class label is missing (assuming the tasks in classificationnot effective when the percentage of missing values per attribute varies considerably.Fill in the missing value manually: tedious + infeasible?Fill in it automatically witha global constant : e.g., unknown, a new class?! the attribute meanthe attribute mean for all samples belonging to the same class: smarterthe most probable value: inference-based such as Bayesian formula or decision tree

Noisy Data19Noise: random error or variance in a measured variableIncorrect attribute values may due tofaulty data collection instrumentsdata entry problemsdata transmission problemstechnology limitationinconsistency in naming convention Other data problems which requires data cleaningduplicate recordsincomplete datainconsistent data

How to Handle Noisy Data?20Binningfirst sort data and partition into (equal-frequency) binsthen one can smooth by bin means, smooth by bin median, smooth by bin boundaries, etc.Regressionsmooth by fitting the data into regression functionsClusteringdetect and remove outliersCombined computer and human inspectiondetect suspicious values and check by human (e.g., deal with possible outliers)

Simple Discretization Methods: Binning21Equal-width (distance) partitioningDivides the range into N intervals of equal size: uniform gridif A and B are the lowest and highest values of the attribute, the width of intervals will be: W = (B A)/N.The most straightforward, but outliers may dominate presentationSkewed data is not handled wellEqual-depth (frequency) partitioningDivides the range into N intervals, each containing approximately same number of samplesGood data scalingManaging categorical attributes can be trickyBinning Methods for Data Smoothing22Sorted data for price (in dollars): 4, 8, 9, 15, 21, 21, 24, 25, 26, 28, 29, 34* Partition into equal-frequency (equi-depth) bins: - Bin 1: 4, 8, 9, 15 - Bin 2: 21, 21, 24, 25 - Bin 3: 26, 28, 29, 34* Smoothing by bin means: - Bin 1: 9, 9, 9, 9 - Bin 2: 23, 23, 23, 23 - Bin 3: 29, 29, 29, 29* Smoothing by bin boundaries: - Bin 1: 4, 4, 4, 15 - Bin 2: 21, 21, 25, 25 - Bin 3: 26, 26, 26, 34Regression23xyy = x + 1X1Y1Y1Cluster Analysis24Data Integration25Data integration: Combines data from multiple sources into a coherent storeSchema integration: e.g., A.cust-id B.cust-#Integrate metadata from different sourcesEntity identification problem: Identify real world entities from multiple data sources, e.g., Bill Clinton = William ClintonDetecting and resolving data value conflictsFor the same real world entity, attribute values from different sources are differentPossible reasons: different representations, different scales, e.g., metric vs. British unitsHandling Redundancy in Data Integration26Redundant data occur often when integration of multiple databasesObject identification: The same attribute or object may have different names in different databasesDerivable data: One attribute may be a derived attribute in another table, e.g., annual revenueRedundant attributes may be able to be detected by correlation analysisCareful integration of the data from multiple sources may help reduce/avoid redundancies and inconsistencies and improve mining speed and qualityData Transformation27Smoothing: remove noise from dataAggregation: summarization, data cube constructionGeneralization: concept hierarchy climbingNormalization: scaled to fall within a small, specified rangemin-max normalizationz-score normalizationnormalization by decimal scalingAttribute/feature constructionNew attributes constructed from the given onesData Transformation: NormalizationMin-max normalization: to [new_minA, new_maxA]

Ex. Let income range $12,000 to $98,000 normalized to [0.0, 1.0]. Then $73,000 is mapped to Z-score normalization (: mean, : standard deviation):

Ex. Let = 54,000, = 16,000. ThenNormalization by decimal scaling

28

Where j is the smallest integer such that Max(||) < 1Data Reduction Strategies29Why data reduction?A database/data warehouse may store terabytes of dataComplex data analysis/mining may take a very long time to run on the complete data setData reduction Obtain a reduced representation of the data set that is much smaller in volume but yet produce the same (or almost the same) analytical resultsData reduction strategiesData cube aggregation:Dimensionality reduction e.g., remove unimportant attributesData CompressionNumerosity reduction e.g., fit data into modelsDiscretization and concept hierarchy generationData Cube Aggregation30The lowest level of a data cube (base cuboid)The aggregated data for an individual entity of interestE.g., a customer in a phone calling data warehouseMultiple levels of aggregation in data cubesFurther reduce the size of data to deal withReference appropriate levelsUse the smallest representation which is enough to solve the taskQueries regarding aggregated information should be answered using data cube, when possibleAttribute Subset Selection31Feature selection (i.e., attribute subset selection):Select a minimum set of features such that the probability distribution of different classes given the values for those features is as close as possible to the original distribution given the values of all featuresreduce # of patterns in the patterns, easier to understandHeuristic methods (due to exponential # of choices):Step-wise forward selectionStep-wise backward eliminationCombining forward selection and backward eliminationDecision-tree inductionExample of Decision Tree InductionInitial attribute set:{A1, A2, A3, A4, A5, A6}A4 ?A1?A6?Class 1Class 2Class 1Class 2>Reduced attribute set: {A1, A4, A6}32Heuristic Feature Selection Methods33There are 2d possible sub-features of d featuresSeveral heuristic feature selection methods:Best single features under the feature independence assumption: choose by significance testsBest step-wise feature selection: The best single-feature is picked firstThen next best feature condition to the first, ...Step-wise feature elimination:Repeatedly eliminate the worst featureBest combined feature selection and eliminationOptimal branch and bound:Use feature elimination and backtrackingDimensionality Reduction: Principal Component Analysis (PCA)34Given N data vectors from n-dimensions, find k n orthogonal vectors (principal components) that can be best used to represent data StepsNormalize input dataCompute k orthonormal (unit) vectorsEach input data (vector) is a linear combination of the k principal component vectorsThe principal components are sorted in order of decreasing significance or strengthSince the components are sorted, the size of the data can be reduced by eliminating the weak components, i.e., those with low variance. Works for numeric data onlyUsed when the number of dimensions is largeX1X2Y1Y2Principal Component Analysis3536END