isweb - information systems & semantic web marcin grzegorzek [email protected] 6...

45
<is web> ISWeb - Information Systems & Semantic Web Marcin Grzegorzek [email protected] 1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen auf Punkten - Minkowski-Distanzfunktion L m - Gewichtete Minkowski- Distanzfunktion L m w - Quadratische Distanzfunktion d q - Quadratische Pseudo- Distanzfunktion - Dynamical-Partial- Semi-Pseudo- Distanzfunktion - Chi-Quadrat-Semi- Pseudo- Distanzfunktion

Upload: christoph-kanzler

Post on 05-Apr-2015

105 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 1

6 Distanzfunktionen

6.1 Eigenschaften und Klassifikation

6.2 Distanzfunktionen auf Punkten

- Minkowski-Distanzfunktion Lm

- Gewichtete Minkowski-Distanzfunktion L

mw

- Quadratische Distanzfunktion d

q

- Quadratische Pseudo-Distanzfunktion

- Dynamical-Partial-Semi-Pseudo-Distanzfunktion

- Chi-Quadrat-Semi-Pseudo-Distanzfunktion

Page 2: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 2

6.1 Eigenschaften und Klassifikationen

Abbildung Feature-Werte zweier Medien-Objekte auf nichtnegative, reelle Zahl

Distanzwert 0 bedeutet maximale Ähnlichkeit

Invarianz einer Distanzfunktion→ also Unabhängigkeit bzgl. Operation

Translation Skalierung Rotation

Page 3: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 3

Formale Eigenschaften einer Distanzfunktion

binäre Funktion mitund

Selbstidentität (Si):

Positivität (Pos):

Symmetrie (Sym):

Dreiecksungleichung (Dreieck):

Page 4: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 4

Klassifikation anhand Erfüllung der Eigenschaften

Page 5: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 5

Beispiele von Distanzfunktionen

absoluter Betrag der Differenz zweier reeller Zahlen

euklidsche Distanzfunktion auf Punkten der Menge

Page 6: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 6

Beispiel einer Pseudo-Distanzfunktion

indiskrete Pseudo-Distanzfunktion, die jedem Elementepaar aus den Wert 0 zuweist:

(Funktion ist praktisch sinnlos)

Page 7: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 7

Beispiel einer Semi-Distanzfunktion

Semi-Distanzfunktion auf der Menge{a, b, c}:

Die Dreiecksungleichung ist nicht garantiert:

Page 8: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 8

Weitere Eigenschaften von Distanzfunktionen

folgende Eigenschaften werden an konkreten Funktionen getestet:

Invarianz bzgl. Translation anhand Translationsobjekt T:

Skalierung anhand Skalar S:

Rotation anhand Rotationsobjekt R:

d(S*o1,S*o2)

Fehler im Buch

Page 9: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 9

Darstellung des Einheitskreises:alle Punkte , für die gilt( ist Zentrum)

Weitere Eigenschaften von Distanzfunktionen (2)

Nicht jeder Einheitskreis besitzt Kreisform!

Page 10: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 10

Distanzeigenschaften im Einheitskreis

verschiedene Eigenschaften sind graphisch aus Einheitskreis erkennbar:

Selbstidentität: Zentrum liegt auf Kreis mit Radius 0.

Positivität: Alle Punkte ungleich Zentrum liegen außerhalb des Kreises mit dem Radius 0

Page 11: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 11

Distanzeigenschaften im Einheitskreis (2)

Translationsinvarianz: Einheitskreis ändert Form nicht, wenn Zentrum verschoben wird

Symmetrie: bei Translationsinvarianz und Symmetrie teilt Zentrum jede Diagonale zwischen zwei Randpunkten in genau zwei gleich lange Teile

Rotationsinvarianz: Einheitskreis ist bzgl. Zentrum rotationssymmetrisch

Page 12: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 12

6.2 Distanzfunktion auf Punkten

Datentyp: array [1..n] (real)Minkowski-Distanzfunktion L

m

Gewichtete Minkowski-Distanzfunktion Lm

w

Quadratische Distanzfunktion dq

Quadratische Pseudo-Distanzfunktion

Dynamical-Partial-Semi-Pseudo-Distanzfunktion

Chi-Quadrat-Semi-Pseudo-Distanzfunktion

Page 13: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 13

Minkowski-Distanzfunktion

am häufigsten eingesetzte Distanzfunktion auf Punkten mit :

Sonderfall bei :

Page 14: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 14

Translationsinvarianz

T sein ein -dimensionaler Vektor, der durch die Differenzberechnung aus der Formel verschwindet:

aber keine Skalierungs- oder Rotationsinvarianz

Page 15: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 15

Einheitskreise

Page 16: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 16

Holdersche Ungleichung

es gilt immer:

also: Einheitskreis mit niedrigem -Wert liegt innerhalb Einheitskreises mit höherem -Wert

Page 17: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 17

Sonderfall euklidsche Distanzfunktion (m=2)

entspricht Länge der Geraden durch beide Punkte

Einheitskreis ist kreisförmig

Rotationsinvarianz ist erfüllt, da Orthonormalmatrix

Matrizenschreibweise:

Page 18: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 18

Berechnung von Reihenfolgen anhand Minkowski-Dist.-fkt.

Achtung: unterschiedliche -Werte erzeugen unterschiedliche Reihenfolgen!

Beispiel:

Abstände dieser Punkte vom Koordinaten-ursprung :

Page 19: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 19

Gewichtete Minkowski-Distanzfunktion

achsenparallele Stauchung und Streckung durch Gewichte :

Forderung:

Page 20: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 20

Einheitskreis

w1=0,5, w2=1Translationsinvarianz

keine Skalierungsinvarianz

keine Rotationsinvarianz

Page 21: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 21

Quadratische Distanzfunktion

Matrizenschreibweise:

A im -dimensionalen Raum ist symmetrische, positiv definite Matrix

Page 22: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 22

Matrix A

Einheitsmatrix : identisch mit

Diagonalmatrix: entspricht(Gewichte korrespondieren zu Diagonalelementen)

ansonsten: nichtuniforme Skalierung, Rotation, Spiegelung der Punkte

Page 23: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 23

Symmetrische positiv definierte Matrix A

es gilt immer: (Eigenwertzerlegung):

ist orthonormale Matrix (Rotation anhand Eigenvektoren)

ist Diagonalmatrix (Skalierung anhand Eigenwerten)

Page 24: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 24

Berechnung der Distanz mittels auf transformierten Punkten oft relativ schnell realisierbar

Symmetrische positiv definierte Matrix A (2)

Page 25: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 25

Invarianzen

Translationsinvarianz

keine Skalierungsinvarianz

keine Rotationsinvarianz

Page 26: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 26

Beispielmatrix

Page 27: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 27

Einheitskreis des Beispiels

Page 28: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 29

Quadratische Pseudo-Distanzfunktion

Aufgabe der Forderung nach Positiv-Definitheit für A

Ziel: unsymmetrische Translationsinvarianz bzgl. Vektoren des Vektorraums :

Konstruktion der Matrix A aus geeigneter Orthogonalbasis und Diagonalmatrix

Page 29: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 30

den -Vektoren entsprechende Diagonalwerte von L auf Null setzen

seien mit die durch auf Null gesetzten -Spaltenvektoren, dann gilt für Linearkombinationen hiervon:

Quadratische Pseudo-Distanzfunktion (2)

Page 30: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 31

Nachweis der Translationsinvarianz

Der entscheidende Schritt: laut Def

ist dieser Term 0

Page 31: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 32

Beispiel Quadratische Pseudo-Distanzfunktion

Konstruktion Translationsinvarianz im Winkel von 40 Grad:

Page 32: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 33

Beispiel Quadratische Pseudo-Distanzfunktion (2)

Die Kombination dieser Matrizen ergibt die gewünschte Matrix A:

Page 33: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 34

Einheitskreis des Beispiels

Page 34: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 35

Dynamical-Partial-Semi-Pseudo-Distanzfunktion

folgende Beobachtungen Chang/Wu03 bzgl. Unähnlichkeit im hochdimensionalen Raum: ähnliche Objekte liegen meist nur in wenigen Dimensionen

nebeneinander Ähnlichkeit kann häufig nicht an bestimmten Dimensionen

festgemacht werden

Page 35: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 36

Dynamical-Partial-Semi-Pseudo-Distanzfunktion

Problem mit Minkowski-Distanzfunktion: alle Dimensionen werden berücksichtigt

Berücksichtigung einer dynamischen Untermenge der Dimensionen

Page 36: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 37

Dynamic-Partial-Semi-Pseudo-Distanzfunktion (2)

und seien zwei Punkte im -dimensionalen Raum und der Abstand in Dimension

nur die kleinsten Abstände werden berücksichtigt:

Page 37: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 38

Eigenschaften

Selbstidentität und Symmetrie sind erfüllt

Verletzung der Positivität und Dreiecksungleichung

Page 38: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 39

Einheitskreis

zweidimensionaler Raum und

Page 39: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 40

Chi-Quadrat-Semi-Pseudo-Distanzfunktion

Abstand zwischen Histogrammen mit absoluten Häufigkeiten

ursprünglich in Statistik entwickeltUntersuchung von Abhängigkeit zwischen Zufallsvariablen

basiert auf Nullhypothese: Häufigkeitsverteilungen sind gleichalso Differenz zwischen erwarteten und tatsächlichen Häufigkeiten beträgt 0

Page 40: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 41

Chi-Quadrat-Semi-Pseudo-Distanzfunktion (2)

erwartete Häufigkeiten:

Page 41: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 42

Beispiel

Test, ob Grippedoppelimpfung Grippe verhindern kann

Befragung verschiedener Personen über Auftreten von Grippe und Impfungen

erwartete Werte sind in Klammern notiert

Page 42: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 43

Berechnung der erwarteten Häufigkeiten

wenn kein Zusammenhang zwischen Impfung und Gruppe, dann Wert jeder Zelle abschätzbar

Page 43: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 44

Berechnung der erwarteten Häufigkeiten / Wahrscheinlichkeiten

Beispiel Grippe(=j=1)/keine Impfung (=i=1); vgl. keine Impfung p1 mit Doppelimpfung p2

Häufigkeit für Grippe ist 24+13 = 37 =p1[j]+p2[j]

Wahrsch. für keine Impfung ist 313 = pi[1]+pi[2] = n

a=1pi[a]

Multiplizierte Häufigkeit für Grippe/keine Impfung ist37*313 ~ Zähler

Nenner: 24+289+13+565 =313+565=878

erwartete Häufigkeit:37*313 / 878 = 13,19

Erwartete Wahrscheinlichkeit: pi[j] = 13,19 / 878

^

Bemerkung: die Rechnung im Buch berücksichtigt die drei (!) Zufallsvariablen:

1. Keine Impfung

2. Eine Impfung

3. Doppelimpfung

Page 44: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 45

Eigenschaften

Selbstidentität und Symmetrie sind erfüllt

Rotationsinvarianz

keine Positivität

keine Dreiecksungleichung

Page 45: ISWeb - Information Systems & Semantic Web Marcin Grzegorzek marcin@uni-koblenz.de1 6 Distanzfunktionen 6.1 Eigenschaften und Klassifikation 6.2 Distanzfunktionen

<is web>

ISWeb - Information Systems & Semantic Web

Marcin [email protected] 46

Einheitskreis

Abstand 0,1 um (1; 0,5)