Machine Perception of Music & Audio. Topic 9: Measuring Distance

Similar documents
Machine Learning. Measuring Distance. several slides from Bryan Pardo

Machine Learning. Topic 4: Measuring Distance

Machine Learning. Measuring Distance. several slides from Bryan Pardo

Instance-Based Learning (a.k.a. memory-based learning) Part I: Nearest Neighbor Classification

p 1 c 2 + p 2 c 2 + p 3 c p m c 2

Spatial Statistics and Analysis Methods (for GEOG 104 class).

), it produces a response (output function g (x)

Chapter 7 Clustering Analysis (1)

Generative classification models

Spectral Clustering. Shannon Quinn

CSE4210 Architecture and Hardware for DSP

TECHNICAL WORKING PARTY ON AUTOMATION AND COMPUTER PROGRAMS. Twenty-Sixth Session Jeju, Republic of Korea, September 2 to 5, 2008

Week 9 Chapter 10 Section 1-5

Error Bars in both X and Y

VQ widely used in coding speech, image, and video

EGR 544 Communication Theory

The Gaussian classifier. Nuno Vasconcelos ECE Department, UCSD

Norms, Condition Numbers, Eigenvalues and Eigenvectors

Learning Theory: Lecture Notes

GMM Method (Single-equation) Pongsa Pornchaiwiseskul Faculty of Economics Chulalongkorn University

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

MIMA Group. Chapter 2 Bayesian Decision Theory. School of Computer Science and Technology, Shandong University. Xin-Shun SDU

Chapter Twelve. Integration. We now turn our attention to the idea of an integral in dimensions higher than one. Consider a real-valued function f : D

Support Vector Machines

Modeling curves. Graphs: y = ax+b, y = sin(x) Implicit ax + by + c = 0, x 2 +y 2 =r 2 Parametric:

Bayesian epistemology II: Arguments for Probabilism

9. Complex Numbers. 1. Numbers revisited. 2. Imaginary number i: General form of complex numbers. 3. Manipulation of complex numbers

Pulse Coded Modulation

Linear Classification, SVMs and Nearest Neighbors

Singular Value Decomposition: Theory and Applications

Statistical Mechanics and Combinatorics : Lecture III

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

Classification learning II

Maximal Margin Classifier

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Clustering gene expression data & the EM algorithm

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

A be a probability space. A random vector

EXPANSIVE MAPPINGS. by W. R. Utz

OPTIMISATION. Introduction Single Variable Unconstrained Optimisation Multivariable Unconstrained Optimisation Linear Programming

Lecture 3: Shannon s Theorem

Lecture 4: November 17, Part 1 Single Buffer Management

Turing Machines (intro)

Which Separator? Spring 1

Spectral Graph Theory and its Applications September 16, Lecture 5

NP-Completeness : Proofs

Physics 2A Chapter 3 HW Solutions

Grid Generation around a Cylinder by Complex Potential Functions

MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS

FRACTALS IN PATTERN RECOGNITION

Evaluation for sets of classes

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

Associative Memories

P R. Lecture 4. Theory and Applications of Pattern Recognition. Dept. of Electrical and Computer Engineering /

Probability and Random Variable Primer

More metrics on cartesian products

Why Monte Carlo Integration? Introduction to Monte Carlo Method. Continuous Probability. Continuous Probability

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11)

CHALMERS, GÖTEBORGS UNIVERSITET. SOLUTIONS to RE-EXAM for ARTIFICIAL NEURAL NETWORKS. COURSE CODES: FFR 135, FIM 720 GU, PhD

GEMINI GEneric Multimedia INdexIng

Richard Socher, Henning Peters Elements of Statistical Learning I E[X] = arg min. E[(X b) 2 ]

28. SIMPLE LINEAR REGRESSION III

Compression in the Real World :Algorithms in the Real World. Compression in the Real World. Compression Outline

European Journal of Combinatorics

CS 3710: Visual Recognition Classification and Detection. Adriana Kovashka Department of Computer Science January 13, 2015

Line Drawing and Clipping Week 1, Lecture 2

Resource Allocation and Decision Analysis (ECON 8010) Spring 2014 Foundations of Regression Analysis

Multinomial logit regression

CSE 252C: Computer Vision III

Inductance Calculation for Conductors of Arbitrary Shape

The path of ants Dragos Crisan, Andrei Petridean, 11 th grade. Colegiul National "Emil Racovita", Cluj-Napoca

Report on Image warping

18.1 Introduction and Recap

SIMPLE LINEAR REGRESSION

DEMO #8 - GAUSSIAN ELIMINATION USING MATHEMATICA. 1. Matrices in Mathematica

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.265/15.070J Fall 2013 Lecture 12 10/21/2013. Martingale Concentration Inequalities and Applications

U.C. Berkeley CS294: Beyond Worst-Case Analysis Luca Trevisan September 5, 2017

Lecture 20: Hypothesis testing

Image classification. Given the bag-of-features representations of images from different classes, how do we learn a model for distinguishing i them?

Solutions to Homework 7, Mathematics 1. 1 x. (arccos x) (arccos x) 1

Introduction to Analysis of Variance (ANOVA) Part 1

PHY2049 Exam 2 solutions Fall 2016 Solution:

The Concept of Beamforming

Chapter 3 Describing Data Using Numerical Measures

A random variable is a function which associates a real number to each element of the sample space

Introduction to Algorithms

One Dimension Again. Chapter Fourteen

Introduction to Random Variables

10.34 Fall 2015 Metropolis Monte Carlo Algorithm

Reduced slides. Introduction to Analysis of Variance (ANOVA) Part 1. Single factor

ARTICLE IN PRESS. Available online at Mathematics and Computers in Simulation xxx (2009) xxx xxx

6.842 Randomness and Computation February 18, Lecture 4

Chapter 3. r r. Position, Velocity, and Acceleration Revisited

The Second Eigenvalue of Planar Graphs

Bit Juggling. Representing Information. representations. - Some other bits. - Representing information using bits - Number. Chapter

Lossy Compression. Compromise accuracy of reconstruction for increased compression.

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

A Network Intrusion Detection Method Based on Improved K-means Algorithm

Transcription:

Machne Percepton of Musc & Audo Topc 9: Measurng Dstance Bran Pardo EECS 352 Wnter 2010 1

Wh measure dstance? Clusterng requres dstance measures. Local methods requre a measure of localt Search engnes requre a measure of smlart Bran Pardo EECS 352 Wnter 2010

Dmenson 2 Eucldean Dstance What people ntutvel thnk of as dstance d 2 2 1 1 2 2 Dmenson 1 Bran Pardo EECS 352 Wnter 2010

Generalzed Eucldean Dstance n = the number of dmensons d where n 1 1 1 2 2...... 2 n n 1/ 2 } and Bran Pardo EECS 352 Wnter 2010

L p norms L p norms are all specal cases of ths: d n 1 p 1/ p p changes the norm 1 L 1 norm Manhattan Dstance: p 1 2 L 2 norm Eucldean Dstance: p 2 Hammng Dstance: p 1and 01 Bran Pardo EECS 352 Wnter 2010

Weghtng Dmensons Put pont n the cluster wth the closest center of gravt Whch cluster should the red pont go n? How do I measure dstance n a wa that gves the rght answer for both stuatons? Bran Pardo EECS 352 Wnter 2010

Weghted Norms You can compensate b weghtng our dmensons. d n 1/ w p 1 p Ths lets ou turn our crcle of equal-dstance nto an elpse wth aes parallel to the dmensons of the vectors. Bran Pardo EECS 352 Wnter 2010

What s a metrc? A metrc has these four qualtes. otherwse call t a measure nequalt trangle smmetr non - negatve 0 reflev t ff 0 z d z d d d d d d Bran Pardo EECS 352 Wnter 2010

Metrc or not? Drvng dstance wth 1-wa streets Categorcal Stuff : Is dstance Jazz to Blues to Rock no less than dstance Jazz to Rock? Bran Pardo EECS 352 Wnter 2010

Categorcal Varables Consder feature vectors for genre & vocals: Genre: {Blues Jazz Rock Zdeco} Vocals: {vocalsno vocals} s1 = {rock vocals} s2 = {azz no vocals} s3 = { rock no vocals} Whch two songs are more smlar? Bran Pardo EECS 352 Wnter 2010

One Soluton:Hammng dstance Blues Jazz Rock Zdeco 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 Vocals s1 = {rock vocals} s2 = {azz no_vocals} s3 = { rock no_vocals} Hammng Dstance = number of bts dfferent between bnar vectors Bran Pardo EECS 352 Wnter 2010

Hammng Dstance Bran Pardo EECS 352 Wnter 2010 {01} and }...... where 2 1 2 1 1 n n n d

Defnng our own dstance an eample How often does artst quote artst? Quote Frequenc Beethoven Beatles Lz Phar Beethoven 7 0 0 Beatles 4 5 0 Lz Phar? 1 2 Let s buld a dstance measure! Bran Pardo EECS 352 Wnter 2010

Defnng our own dstance an eample Beethoven Beatles Lz Phar Beethoven 7 0 0 Beatles 4 5 0 Lz Phar? 1 2 Quotefrequenc Q Dstance d 1 f value n table Q f Q zartsts f z Bran Pardo EECS 352 Wnter 2010

Mssng data What f for some categor on some eamples there s no value gven? Approaches: Dscard all eamples mssng the categor Fll n the blanks wth the mean value Onl use a categor n the dstance measure f both eamples gve a value Bran Pardo EECS 352 Wnter 2010

Dealng wth mssng data n n w n n d w 1 1 else 1 are defned and both f 0 Bran Pardo EECS 352 Wnter 2010

Edt Dstance Quer = strng from fnte alphabet Target = strng from fnte alphabet Cost of Edts = Dstance Target: C A G E D - - Quer: C E A E D

Tpcal Melodc Search Sstem Quer Database Themes Targets Sgt. Pepper s Smlart Ranker Yesterda Ranked Lst

Wh Monophonc Themes? Audo Document Theme 1 Theme 3 Theme 2 PROBLEM Smlart rankers tpcall requre monophonc nput

Smlart Rankng b Edt Dstance Quer = strng Target = strng Cost of Edts = Dstance Target: C A G E D - - Quer: C E A E D

Local Strng Algnment 0 ma 1 1 1 1 q s M s M q M M M -1-1 M -1 M -1 M Insert Delete Match Restart

Local Strng Algnment S Q ma M SIMILARITY THEME QUERY G A B B 0-1 -2-3 -4 G -1 2 1 0-1 D -2 1 0-1 -2 A -3 0 3 2-1 C -4-1 2 1 0 B -5-2 1 4 3

Md Ptch Melod Transcrpton Sung quer 58 56 10 5 54 52 50 Segmented quer 48 46 44 1 2 3 4 5 6 7 8 9 Short Gltch Notes Seconds Ptch Quantzaton Errors musc.

Melod Encodng Transcrpton 10 5 58 56 54 52 50 48 46 44 1 2 3 4 5 6 7 8 9 Encodng up 2 half-steps { +20.5 0 1 01...} 2 nd s ½ length of 1 st note Ptch nterval and rhthm rato Tempo and transposton nvarant Smplfes error modelng musc.cs.northwestern.edu

Response Ptch Interval Modelng Snger Varaton 12 9 6 3 0-3 -6-9 se I nterval Respon Ascendng Maor 6 th 50 stmulus-response pars -12 1 2 9 6 3 0-3 -6-9 -12 Stmulus Ptch Interval In ½ steps 12 to an octave Stmulus 1 Response 1 Stmulus 2 Response 2

Ma sngle-part smlart S Q ma P Q Song Smlart = MAXPart Smlart QUERY PS SCORE

Oops! QUERY Cheap Knock-off To God on Hgh Glor Be

Oops! QUERY Cheap Knock-off To God on Hgh Glor Be

Oops! QUERY Cheap Knock-off To God on Hgh Glor Be

Homophonc Smlart SCORE QUERY M -1-1 M -1 M -1 M

Homophonc Algnment 0 ma 1 1 1 1 q s M s M q M M Insert Delete Match Restart ma n C n C H REPLACES

Skppng Between Parts Quer Score To God On Hgh All Glor Be

Polphonc Algnment Part k+1 L -1-1k+1 Part k L -1-1k L L -1lk+1-1k Part k-1 L -1-1k-1 L -1k L k L -1k-1

Polphonc Algnment 0 ma 1 1 1 1 1 1 1 k l k l p q L k l k l p L p q L p L q L L k l k l k k k k k k Insert Delete Match Restart Shft Shft CHANGE-PART COST

Makng monophonc parts Part 1 notebt Part 2 note

Makng monophonc parts Part 1a Part 1b Part 2a Part 2b Part 2c

TARGET DATABASE Eperment 300 Bach 4-part vocal chorale harmonzatons QUERIES 5 to 25 notes n length Skp between parts wth a probablt of:.25.5.75 1 150 Queres per condton COMPARE Mamal sngle-part smlart Polphonc smlart

Mean rank of correct target Results 25 20 Mamum sngle-part smlart Polphonc algnment 18.9 23.7 15 10 8.7 4.5 5 1.7 2.5 1.6 1.4 1.3 1.3 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Per-note probablt of changng parts n quer

Number of queres Number of queres Ppart change = 0.5 100 Polphonc algnment 50 0 0 10 20 30 40 50 60 70 80 90 100 100 Mamum sngle-part smlart 50 0 0 10 20 30 40 50 60 70 80 90 100 Rank of correct target rght rank

Conclusons Standard sequence algnment fals when queres skp from part to part We etend strng-matchng to handle ths case Ths mproves search performance