1 / 14

Korpuslinguistik für und mit Computerlinguistik

Korpuslinguistik für und mit Computerlinguistik. Seminar SS 2003 Sitzung 3: Statistik, Vektoren Gerold Schneider. Übersicht. Wahrscheinlichkeitsrechnung Maximum Likelihood Estimation (MLE) Informationstheorie Statistische Tests Sprachmodelle Vektoren (Igor). Bedingte Wahrscheinlichkeit.

connie
Télécharger la présentation

Korpuslinguistik für und mit Computerlinguistik

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Korpuslinguistik für und mit Computerlinguistik Seminar SS 2003 Sitzung 3: Statistik, Vektoren Gerold Schneider

  2. Übersicht • Wahrscheinlichkeitsrechnung • Maximum Likelihood Estimation (MLE) • Informationstheorie • Statistische Tests • Sprachmodelle • Vektoren (Igor) Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  3. Bedingte Wahrscheinlichkeit • Zusatzinfo verändert Wahrscheinlichkeit • Priori und posteriori Wahrscheinlichkeit • Definition: mehr B auch in A mehr B ausser-halb A Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  4. Bedingte Wahrscheinlichkeit: Bayes' Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  5. Bayes: Medizinische Tests als Beispiel • Eine seltene Krankheit befällt 0.2 % der Bevölkerung: P(I)=.002 • Die Erkennungsrate des Tests ist 98 %: P(⊕|I)=.98, P(⊕|I')=.02 • Mein Test sagt ⊕! Wie gross ist die Gefahr, dass ich krank bin? Bayes: krank (I), richtig erkannt (⊕|I) P(⊕) = ?. 2 Wege zu ⊕ gesund (I'), nur falsch gestestet (⊕|I') Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  6. Maximum Likelihood Estimation (MLE) • Eine einfache Methode, (bedingte) Wahrscheinlichkeiten aufgrund von empirischen Daten zu schätzen (estimate). • Wir kennen die „wirklichen“ Wahrscheinlichkeiten nicht, aber wir beobachten empirische Werte. Wir nehmen an, dass diese mit grösster Wahrscheinlichkeit (maximum likelihood) die „wirklichen“ Wahrscheinlichkeiten annähern. Statt freq oft auch f oder # (number of) oder C (count) Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  7. Informationstheorie • „Information Theory is interested in the situation before the reception of a symbol, rather than the symbol itself“ (Oakes) • Information und Informatik: Binarität. Entropie H=Anzahl der nötigen Binärentscheidungen. • log2 aufgrund der Binarität. Es gilt: Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  8. Informationstheorie: Entropie • Spezialfall: Equiprobabilität (alle p(x) gleich: p(x)=1/X)) p * Baumtiefe • B = log2 X = - log2 (1/X) drückt aus: 2B = X  B = # Binärentscheidungen=Pfadlänge=Baumtiefe E.g. log2 256= - log2 (1/256) = 8 • Bei Nicht-Equiprobabilität gewichtet mit p(x): „Tieferer Baum für seltenes, den tieferen Baum selten nehmen“  optimale Bitkürze • Perplexity(X) = 2H = Durchschnittliche Pfadlänge Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  9. Informationstheorie: Co-occurrence, Statistische Tests („goodness of fit“) • Mutual Information: • Relative Entropie (Kullback-Leibler): Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  10. Statistische Tests: 2 • Basiert nicht auf Informationstheorie, sondern eher auf Standardabweichung=s, Variance=s2: Abweichung vom Schnitt im Quadrat, pro Anzahl Werte • Chi-Quadrat= 2: Abweichung vom Modell E im Quadrat, im Verhältnis zum jeweiligen Wert e Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  11. Statistische Tests: G2 = Log-likelihood • Dem 2 Test eng verwandt • Besonders erfolgreich für Kollokationen: E = Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  12. Sprachmodelle: Abhängigkeiten und Unabhängigkeitsannahmen I In Bigramm-Tagger ist p(Tag) als abhängig modelliert nur vom • vorhergehenden Tag: • Wort: bzw. Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  13. Sprachmodelle: Abhängigkeiten und Unabhängigkeitsannahmen II Ein „vollständiges“ Sprachmodell berücksichtigte enorm viele weitere Abhängigkeiten: längere Distanz, Struktur,Prosodie,... • die ... sitzende Frau • [die [...PP] sitzende Frau NP] • DIE ... sitzende Frau • die auf der Bank sitzende Frau meine ich, nicht jene. • Männer. Die auf der Bank sitzende Frau, auf sie wartend, suchen. • Anno Domini 1712. Die auf der Bank sitzende Frau. Ora Cenae. Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

  14. Sprachmodelle: Abhängigkeiten, Komplexität, Auftretenshäufigkeit Mit zunehmender Feinheit des Sprachmodells verschlimmern sich zwei Probleme: • Grösse des Suchraumes: kann schon für ein Bigramm-Modell enorm sein  cutoff, dynamische Programmierung (Viterbi). Vgl. Zeitaufwand fürs Training des Brill-Taggers. • Seltenes Auftreten (sparse data): schon bei Bigrammen ein Problem für p(Wort|Tag) falls Wort unbekannt. Bei Trigrammen wird ein backoff zu Bigrammen verwendet. Quadrigramme sind so sparse, dass sie keine Taggingverbesserung mehr bringen. Gerold Schneider: Korpuslinguistik für Computerlinguistik, III

More Related