1 / 21

Rocchio klasifikator

Rocchio klasifikator. Milan Tribuson 26.03.2003. Version 1.0. Text Categorisation prof. Bojana Dalbelo - Bašić ZEMRIS, FER. Uvod (kategorizacija teksta). Procedura odlučivanja pripadnosti dokumenata vrijednostima u matrici odluke {0,1}

Download Presentation

Rocchio klasifikator

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. Rocchio klasifikator Milan Tribuson 26.03.2003. Version 1.0 Text Categorisation prof. Bojana Dalbelo - Bašić ZEMRIS, FER

  2. Uvod (kategorizacija teksta) • Procedura odlučivanja pripadnosti dokumenata vrijednostima u matrici odluke {0,1} • C = {c1, …, cm} kategorije; D = {d1, …, dn} dokumenti

  3. Uvod (kategorizacija teksta) • Kategorizacija na dva načina: 1. Kategorije = simboličke labele (metapodaci; nema dodatnog znanja) 2. Dokument se dodaje kategoriji na osnovu njegova sadržaja (subjektivno) • Kategorizacija: 1. {≤ 1 | 1 | ≥ 1 | . . . }elemenata iz C se pridružuje D (nonoverlaping (1:1) – overlaping categories) 2. svaki element iz C se pridružuje {≤ 1 | 1 | ≥ 1 | . . . }elementu iz D

  4. Uvod (CPC – DPC) • CPC (Category Pivoted Categorisation) - popunjavanje matrice po redovima (traženje kategorija za di) - pogodniji ako se dodaju nove kategorije nakon početka kategorizacije teksta - češće se koristi od DPC-a

  5. Uvod (CPC – DPC) • DPC (Document Pivoted Categorisation) - popunjavanje matrice po stupcima (traženje dokumenata za ci) - pogodniji u slučaju postupne dostupnosti dokumenata (on-line classification, e-mail filtering)

  6. Uvod (preciznost i odaziv) • Preciznost (Pri) - točnost dxpod ci • Odaziv (Rej) - vjerojatnost dxpod ci

  7. Uvod (preciznost i odaziv) • Procjena rezultata: 1. Microaveraging – preciznost i odaziv određuju se sumiranjem svih pojedinačnih odluka 2. Macroaveraging – preciznost i odaziv se prvo ocjenjuju pojedinačno za svaku kategoriju (“lokalno”), a zatim se računa srednja vrijednost svih rezultata za različite kategorije (“globalno”)

  8. Rocchio klasifikator • linearni klasifikator • Rocchio, 1960 - ih • Hull, 1994. god. • “razumljivi” klasifikatori

  9. Formula • - β + γ = 1, β ≥ 0, γ ≤ 0 • wyjje težina izraza tyu dokumentu dj • β i γ su kontrolni parametri koji pomažu pri određivanju relativne • važnosti pozitivnih i negativnih primjera

  10. Pretprocesiranje • uklanjanje stop riječi • prefiks, sufiks • ponovno uklanjanje stop riječi

  11. Pseudokod (train) term0,0 weight0,0 … terma1,0 weighta1,0 0 1 term0,1 weight0,1 … terma2,1 weighta2,1 2 term0,2 weight0,2 … terma3,2 weighta3,2 … … … … … n term0,n weight0,0 … terman,n weightan,n train set vektori kategorija (skalirani) term0,0 df0,0 term0,1 df0,1 term0,2 df0,2 idf = log (train.size / df) … … term0,n df0,0 df (u cijelom train set - u)

  12. Pseudokod (train) term0,0 weight0,0 … terma1,0 weighta1,0 0 1 term0,1 weight0,1 … terma2,1 weighta2,1 2 term0,2 weight0,2 … terma3,2 weighta3,2 … … … … … n term0,n weight0,0 … terman,n weightan,n train set vektori kategorija (skalirani) term0,0 idf0,0 term0,1 idf0,1 term0,2 idf0,2 tfidf = weight × idf … … term0,n idf0,0 idf

  13. Pseudokod (train) term0,0 tfidf0,0 … terma1,0 tfidfa1,0 0 1 term0,1 tfidf0,1 … terma2,1 tfidfa2,1 2 term0,2 tfidf0,2 … terma3,2 tfidfa3,2 … … … … … n term0,n tfidf0,0 … terman,n tfidfan,n train set tfidf term0,0 idf0,0 term0,1 idf0,1 term0,2 idf0,2 … … term0,n idf0,0 idf

  14. Pseudokod (test) term0,0 df0,0 term0,1 df0,1 term0,2 df0,2 … … term0,n df0,0 test set df df × idf term0,0 idf0,0 term0,1 idf0,1 term0,2 idf0,2 … … term0,n idf0,0 train set idf

  15. Pseudokod (test) term0,0 idf0,0 term0,1 idf0,1 term0,2 idf0,2 … … cos (idf, meanVectors) term0,n idf0,0 test set idf term0,0 tfidf0,0 … terma1,0 tfidfa1,0 0 1 term0,1 tfidf0,1 … terma2,1 tfidfa2,1 2 term0,2 tfidf0,2 … terma3,2 tfidfa3,2 … … … … … n term0,n tfidf0,0 … terman,n tfidfan,n train set

  16. Prednosti • stvara “razumljive” klasifikatore (za razliku od neuronskih mreža) • “dobar upit” • jednostavna implementacija • efikasan je

  17. Nedostaci • dijeli prostor dokumenata u dva podprostora

  18. Rezultati • Reuters Newswire • 90 kategorija; 9603 dokumenata u train set - u; 3299 dokumenata u test set - u • WebKB Collection • 4 kategorije; 4183 dokumenata u train set - u; 226 dokumenata u test set - u • Ohsumed MeSH • 20 kategorija; 10000 dokumenata u train set - u; 10000 dokumenata u test set - u

  19. Rezultati

  20. Usporedba

  21. Literatura [1] Sebastiani, F., “A Tutorial on Automated Text Categorisation”, Proceedings of ASAI-99, 1st Argentinian Symposium on Artificial Intelligence, Buenos Aires, AR, pp. 7-35, 1999. [2] Sebastiani, F., ”Machine Learning in Automated Text Categorization”, ACM Computing Surveys, Vol. 34, No. 1, pp. 1-47, March 2002. [3] Joachims, T., “Text Classification: KNN and Rocchio”, PowerPoint Presentation(??) [4] Moschitti, A., “A study on optimal parameter tuning for Rocchio Text Classifier”, ECIR, pp. 420-435, 2003. [5] Joachims, T., “A probabilistic analysis of the Rocchio algorithm with TFIDF for text categorization”, Proceedings of 101 ICML-97, pp 143-151, 1997. [6] Schapire, R. E., Singer, Y. And Singhal, A., “Boosting and Rocchio Applied to Text Filtering”, Proceedings of ACM SIGIR, pp.215-223, 1998.

More Related