Web Data Mining ΕΡΓΑΣΤΗΡΙΟ 2 & 3. Prepared by Costantinos Costa Edited by George Nikolaides. EPL 451 - Data Mining on the Web

Σχετικά έγγραφα
EPL451: Data Mining on the Web Lab 3

EPL660: Information Retrieval and Search Engines Lab 5

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial

(C) 2010 Pearson Education, Inc. All rights reserved.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

(Διαφάνειες Νίκου Βιδάκη)

Section 7.6 Double and Half Angle Formulas

Αρχές Τεχνολογίας Λογισμικού Εργαστήριο

2 Composition. Invertible Mappings

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

Instruction Execution Times

Homework 3 Solutions

derivation of the Laplacian from rectangular to spherical coordinates

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Section 8.3 Trigonometric Equations

Test Data Management in Practice

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Hancock. Ζωγραφάκης Ιωάννης Εξαρχάκος Νικόλαος. ΕΠΛ 428 Προγραμματισμός Συστημάτων

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

the total number of electrons passing through the lamp.

Partial Trace and Partial Transpose

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΣΔΥΝΟΛΟΓΗΚΟ ΔΚΠΑΗΓΔΤΣΗΚΟ ΗΓΡΤΜΑ ΗΟΝΗΧΝ ΝΖΧΝ «ΗΣΟΔΛΗΓΔ ΠΟΛΗΣΗΚΖ ΔΠΗΚΟΗΝΧΝΗΑ:ΜΔΛΔΣΖ ΚΑΣΑΚΔΤΖ ΔΡΓΑΛΔΗΟΤ ΑΞΗΟΛΟΓΖΖ» ΠΣΤΥΗΑΚΖ ΔΡΓΑΗΑ ΔΤΑΓΓΔΛΗΑ ΣΔΓΟΤ

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΑΚΑ ΗΜΙΑ ΕΜΠΟΡΙΚΟΥ ΝΑΥΤΙΚΟΥ ΜΑΚΕ ΟΝΙΑΣ ΣΧΟΛΗ ΜΗΧΑΝΙΚΩΝ ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Block Ciphers Modes. Ramki Thurimella

Goals of this Lecture. Generics(Γενικότητα) Generic Data Structures Example. Generic Data Structures Example

GREECE BULGARIA 6 th JOINT MONITORING

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Galatia SIL Keyboard Information

Context-aware και mhealth

Special edition of the Technical Chamber of Greece on Video Conference Services on the Internet, 2000 NUTWBCAM

Assalamu `alaikum wr. wb.

Srednicki Chapter 55

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

«Χρήσεις γης, αξίες γης και κυκλοφοριακές ρυθμίσεις στο Δήμο Χαλκιδέων. Η μεταξύ τους σχέση και εξέλιξη.»

CS 150 Assignment 2. Assignment 2 Overview Opening Files Arrays ( and a little bit of pointers ) Strings and Comparison Q/A

TMA4115 Matematikk 3

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

The Simply Typed Lambda Calculus

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Solution Series 9. i=1 x i and i=1 x i.

Elements of Information Theory

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

1. Αφετηρία από στάση χωρίς κριτή (self start όπου πινακίδα εκκίνησης) 5 λεπτά µετά την αφετηρία σας από το TC1B KALO LIVADI OUT

Concrete Mathematics Exercises from 30 September 2016

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

A ΜΕΡΟΣ. 1 program Puppy_Dog; 2 3 begin 4 end. 5 6 { Result of execution 7 8 (There is no output from this program ) 9 10 }

C.S. 430 Assignment 6, Sample Solutions

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

ΕΠΛ131 Αρχές Προγραμματισμού

Second Order Partial Differential Equations

Modbus basic setup notes for IO-Link AL1xxx Master Block

How to register an account with the Hellenic Community of Sheffield.

FSM Toolkit Exercises

Copernicus for Local and Regional Authorities

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Notes on the Open Economy

ΘΕΩΡΗΤΙΚΗ ΚΑΙ ΠΕΙΡΑΜΑΤΙΚΗ ΙΕΡΕΥΝΗΣΗ ΤΗΣ ΙΕΡΓΑΣΙΑΣ ΣΚΛΗΡΥΝΣΗΣ ΙΑ ΛΕΙΑΝΣΕΩΣ

VBA ΣΤΟ WORD. 1. Συχνά, όταν ήθελα να δώσω ένα φυλλάδιο εργασίας με ασκήσεις στους μαθητές έκανα το εξής: Version ΗΜΙΤΕΛΗΣ!!!!

ΜΑΘΗΜΑΤΙΚΗ ΠΡΟΣΟΜΟΙΩΣΗ ΤΗΣ ΔΥΝΑΜΙΚΗΣ ΤΟΥ ΕΔΑΦΙΚΟΥ ΝΕΡΟΥ ΣΤΗΝ ΠΕΡΙΠΤΩΣΗ ΑΡΔΕΥΣΗΣ ΜΕ ΥΠΟΓΕΙΟΥΣ ΣΤΑΛΑΚΤΗΦΟΡΟΥΣ ΣΩΛΗΝΕΣ ΣΕ ΔΙΑΣΤΡΩΜΕΝΑ ΕΔΑΦΗ

ΕΘΝΙΚΗ ΣΧΟΛΗ ΔΗΜΟΣΙΑΣ ΔΙΟΙΚΗΣΗΣ ΙΓ' ΕΚΠΑΙΔΕΥΤΙΚΗ ΣΕΙΡΑ

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Εργαστήριο 9. Styling with Javascript

Code Breaker. TEACHER s NOTES

Πεξηβάιινλ θαη Αλάπηπμε ΔΘΝΙΚΟ ΜΔΣΟΒΙΟ ΠΟΛΤΣΔΥΝΔΙΟ ΓΙΔΠΙΣΗΜΟΝΙΚΟ - ΓΙΑΣΜΗΜΑΣΙΚΟ ΠΡΟΓΡΑΜΜΑ ΜΔΣΑΠΣΤΥΙΑΚΧΝ ΠΟΤΓΧΝ (Γ.Π.Μ..) "ΠΔΡΙΒΑΛΛΟΝ ΚΑΙ ΑΝΑΠΣΤΞΗ"

Advanced Subsidiary Unit 1: Understanding and Written Response

10 MERCHIA. 10. Starting from standing position (where the SIGN START ) without marshal (self start) 5 minutes after TC4 KALO LIVADI OUT

Math221: HW# 1 solutions

ΠΑΡΟΥΣΙΑΣΗ ΙΔΕΠ ΣΥΜΒΟΥΛΕΣ ΓΙΑ ΣΩΣΤΗ ΔΙΑΧΕΙΡΙΣΗ ΕΡΓΩΝ ERASMUS+ STRATEGIC PARTNERSHIPS

7 Present PERFECT Simple. 8 Present PERFECT Continuous. 9 Past PERFECT Simple. 10 Past PERFECT Continuous. 11 Future PERFECT Simple

Ενότητα 2 Εργαλεία για την αναζήτηση εργασίας: Το Βιογραφικό Σημείωμα

Correction Table for an Alcoholometer Calibrated at 20 o C

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

ΕΠΛ221: Οργάνωση Υπολογιστών και Συμβολικός Προγραμματισμός. Εργαστήριο Αρ. 2

ΚΕΙΜΕΝΟΚΕΝΤΡΙΚΗ ΘΕΩΡΙΑ: ΘΕΩΡΗΤΙΚΟ ΠΛΑΙΣΙΟ ΚΑΙ ΠΕΙΡΑΜΑΤΙΚΗ ΕΦΑΡΜΟΓΗ ΣΕ ΣΠΠΕ ΜΕ ΣΤΟΧΟ ΤΟΝ ΠΕΡΙΒΑΛΛΟΝΤΙΚΟ ΓΡΑΜΜΑΤΙΣΜΟ ΤΩΝ ΜΑΘΗΤΩΝ

ΔΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ ΕΠΑΝΑΣΧΕΔΙΑΣΜΟΣ ΓΡΑΜΜΗΣ ΣΥΝΑΡΜΟΛΟΓΗΣΗΣ ΜΕ ΧΡΗΣΗ ΕΡΓΑΛΕΙΩΝ ΛΙΤΗΣ ΠΑΡΑΓΩΓΗΣ REDESIGNING AN ASSEMBLY LINE WITH LEAN PRODUCTION TOOLS

About these lecture notes. Simply Typed λ-calculus. Types

Reminders: linear functions

Matrices and Determinants

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΓΕΩΤΕΧΝΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΚΑΙ ΔΙΑΧΕΙΡΙΣΗΣ ΠΕΡΙΒΑΛΛΟΝΤΟΣ. Πτυχιακή εργασία

Προγραμματισμός Ι. Κλάσεις και Αντικείμενα. Δημήτρης Μιχαήλ. Τμήμα Πληροφορικής και Τηλεματικής Χαροκόπειο Πανεπιστήμιο

Ανάκτηση Πληροφορίας

S. Gaudenzi,. π υ, «aggregation problem»

Exercises to Statistics of Material Fatigue No. 5

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

Κατανεμημένα Συστήματα. Javascript LCR example

1) Abstract (To be organized as: background, aim, workpackages, expected results) (300 words max) Το όριο λέξεων θα είναι ελαστικό.

Volume of a Cuboid. Volume = length x breadth x height. V = l x b x h. The formula for the volume of a cuboid is

Transcript:

EPL 451 - Data Mining on the Web Web Data Mining ΕΡΓΑΣΤΗΡΙΟ 2 & 3 Prepared by Costantinos Costa Edited by George Nikolaides

Semester Project Microsoft Malware Classification Challenge (BIG 2015) More info: http://www.kaggle.com/c/malware-classification 2/13/2015 EPL 451 - Data Mining on the Web 2

Semester Project A successful submission of your project requires the following: Source code of your implementation along with instructions of how to compile and run your code. Any input data you used to solve this problem with the corresponding output files generated from your solution. A description of your project (6 pages, two columns), specifying in detail your goals, approach, milestones, evaluation methodology and experimental results. A document that describes how you did your experiments and what are your obtained results. Project presentation (15 min per team + 5 min Q/A) 2/13/2015 EPL 451 - Data Mining on the Web 3

Calculate time How to calculate the time long begin = System.currentTimeMillis(); job.waitforcompletion(true); long end = System.currentTimeMillis(); long second = (end - begin) / 1000; System.err.println(job.getJobName() + " takes " + second + " seconds"); 2/13/2015 EPL 451 - Data Mining on the Web 4

Task 1: Anagram Ένας αναγραμματισμός είναι μια λέξη που μπορεί να δημιουργηθεί με τις μετακινήσεις των γραμμάτων μιας άλλης λέξης Π.χ Refills fillers Relayed layered Rentals antlers Rebuild builder Πρέπει να βρείτε τον αναγραμματισμούς σε ένα τεράστιο αρχείο εισόδου. Πως θα το κάνατε? public static boolean isanagram(string first, String second) { // Checks that the two inputs are anagrams, by checking they have all the same characters. // Left as exercise for the user... } 2/13/2015 EPL 451 - Data Mining on the Web 5

Task 1: Anagram Hadoopifying (input) <k1, v1> map <k2, v2> combine <k2, v2> reduce <k3, v3> (output) Download http://www.puzzlers.org/pub/wordlists/unixdict.txt 2/13/2015 EPL 451 - Data Mining on the Web 6

What is Writable? void map( K1 key, V1 value, OutputCollector<K2, V2> output, Reporter reporter) K types implement WritableComparable V types implement Writable Hadoop defines its own box classes for strings (Text), integers (IntWritable), etc. All keys are instances of WritableComparable All values are instances of Writable 2/13/2015 EPL 451 - Data Mining on the Web 7

Getting Data To The Mapper Input file Input file InputSplit InputSplit InputSplit InputSplit InputFormat RecordReader RecordReader RecordReader RecordReader Mapper Mapper Mapper Mapper (intermediates) (intermediates) (intermediates) (intermediates) 2/13/2015 EPL 451 - Data Mining on the Web 8

WritableComparator Compares WritableComparable data Will call WritableComparable.compare() Can provide fast path for serialized data JobConf.setOutputValueGroupingComparator() 2/13/2015 EPL 451 - Data Mining on the Web 9

Partition And Shuffle Mapper Mapper Mapper Mapper (intermediates) (intermediates) (intermediates) (intermediates) Partitioner Partitioner Partitioner Partitioner shuffling (intermediates) (intermediates) (intermediates) Reducer Reducer Reducer 2/13/2015 EPL 451 - Data Mining on the Web 10

Reduction reduce( K2 key, Iterator<V2> values, OutputCollector<K3, V3> output, Reporter reporter) Keys & values sent to one partition all go to the same reduce task Calls are sorted by key earlier keys are reduced and output before later keys 2/13/2015 EPL 451 - Data Mining on the Web 11

Finally: Writing The Output Reducer Reducer Reducer OutputFormat RecordWriter RecordWriter RecordWriter output file output file output file 2/13/2015 EPL 451 - Data Mining on the Web 12

OutputFormat Analogous to InputFormat TextOutputFormat Writes key val\n strings to output file SequenceFileOutputFormat Uses a binary format to pack (k, v) pairs NullOutputFormat Discards output 2/13/2015 EPL 451 - Data Mining on the Web 13

Summary To Hadoop επιτρέπει στον προγραμματιστή να δημιουργήσει δικούς του τύπους κλειδιών/τιμών. Αυτό επιτρέπει τη χρήση άλλων τύπων πέραν των κλασσικών Text, IntWritable κτλ. Αυτοί οι τύποι πρέπει να υλοποιούν (implement) την διεπαφή του Hadoop Writable ή WritableComparable έτσι ώστε το Hadoop να μπορεί να διακινεί τα κλειδιά και τις τιμές στο HDFS. 2/13/2015 EPL 451 - Data Mining on the Web 14

Task 2: Inverted index Σας δίνεται ο κώδικας για το Inverted Index (αντίστροφο ευρετήριο). Ο κώδικας δημιουργεί ένα αρχείο που περιέχει τη κάθε λέξη και σε ποια αρχεία βρίσκεται. Μελετήστε τον κώδικα για να καταλάβετε πώς λειτουργεί. Αλλάξτε των κώδικα ούτος ώστε να δημιουργήσετε ένα δικό σας τύπο δεδομένων για να εξάγετε από τον mapper τα records [filename@offset] και να εισάγετε στον reducer με τη μορφή IndexMapRecordWritable (σας δίδεται η κλάση). 2/13/2015 EPL 451 - Data Mining on the Web 15

Task 3: Inverted index Αλλάξτε των κώδικα ούτος ώστε να δημιουργήσετε ένα δικό σας τύπο δεδομένων για να εξάγετε από τον reducer το τελικό αποτέλεσμα με τη μορφή IndexRecordWritable (σας δίδεται η κλάση) NOTE: You need to override the following functions: /** * Concat all the index map records */ @Override public String tostring() {} /** * Serialize the fields */ @Override public void write(dataoutput out) throws IOException {} /** * Deserialize the fields */ @Override public void readfields(datainput in) throws IOException {} 2/13/2015 EPL 451 - Data Mining on the Web 16