An important issue that distinguishes text classification from the other classification tasks discussed in this book is the possibility of multiple classifications.
Up to now we have assumed that there is a set of mutually exclusive categories and that each object must inevitably fit into one and only one of these.
Text classification is rather different. In general we may have N categories
such as Medicine, Business, Finance, Historical, Biographical, Management and
Education and it is perfectly possible for a document to fit into several of these categories, possibly even all of them or possibly none.
Rather than broaden the definition of classification used up to now we prefer
to think of the text classification task as N separate binary classification tasks,
e.g. — Is the document about medicine? Yes/No I - Is the document about business? Yes/No — Is the document about finance? Yes/No and so on. The need to perform N separate classilication tasks adds considerably to the time involved for this form of classification, which even for a single classification is usually computationally expensive.
15.2 Representing Text Documents for Data
Mining
For standard' data mining tasks the data is presented to the data mining system in the standard form described in Chapter 1, or something similar. There are a fixed number of attributes (or features) which were chosen before the data was collected. For text mining the dataset usually comprises the documents
themselves and the features are extracted from. the documents automatically
based on their content before the classification algorithm is applied. There are
generally a very large number of features, most of them only occurring rarely, with a high proportion of noisy and irrelevant features.
There are several ways in which the conversion of documents from plain
text to instances with a fixed number of attributes in a training set can be carried out. For example we might count tlie number of times specified phrases occur, or perhaps any combination of t1v(j||||Esecutivc words, or we might count
the occurrence of two or three character combinations (knowm as bigrams and
trigrams respectively). For the purpose of This chapter we will assame that a simple word-based representation is used, known-as a bag-of-words
Representation. With this representation a document is considered to be simply a collection of the words which occur in it at least once. The order of the words,
the combinations in which they occur, paragraph structuring, punctuation and of course the nieanings of the words are all ignored. A document is just a collection of words placed in some arbitrary order, say alphabetical, together with
a count of how niany times each one occurs, or some other measure of the
importance of each word.
Assuming that we wish to store an 'importance value' for each word in a
document as one instance in a training set, how should we do it? If a given document has say 106 different words, we cannot just use a representation with 106 attributes (ignoring classifications). Other documents in the dataset may use other words, probably overlapping with the 106 in the current instance, but not necessarily so. The unseen documents that we wish to classify may have words
that are not used in any of the training 4@fflSl.(l]ll^s' ^n obvious—but extremely
bad—approach would be to allocate as ;i||g||j[||,ttribiites as are needed to allow
for all possible words that might be used %id|]fi^ possible iinseen document Unfortiinately if the langiiage of the documents is English, the number of possible words is approximately one million, which is a liopelessly impractical number of attribiites to iise.
A much better approach is to restrict the represciitation to the words that actiially occiir in the training clociimeiits. Tills can still be many thoiisands
(or more) and we will look at ways of r(^
Results (
Thai) 1:
[Copy]Copied!
ปัญหาที่สำคัญที่แตกต่างจากการจัดหมวดหมู่ข้อความในงานการจัดหมวดหมู่อื่น ๆ ที่กล่าวถึงในหนังสือเล่มนี้เป็นไปได้ของการจำแนกประเภทหลาย
ถึงตอนนี้เราได้มีการสันนิษฐานว่ามีเป็นชุดของหมวดหมู่พิเศษร่วมกันและที่แต่ละวัตถุย่อมต้องพอดีเป็นหนึ่งและมีเพียงหนึ่งในจำนวนนี้
การจัดหมวดหมู่ข้อความที่แตกต่างกันค่อนข้างโดยทั่วไปเราอาจจะมี n ประเภท
เช่นยา, ธุรกิจการเงินประวัติศาสตร์ชีวประวัติจัดการและ
การศึกษาและเป็นไปได้อย่างสมบูรณ์แบบสำหรับเอกสารให้พอดีกับเป็นหลายประเภทเหล่านี้อาจเป็นไปได้ทั้งหมดของพวกเขาหรืออาจจะไม่มี
แทนที่จะขยายความหมายของการจัดหมวดหมู่ใช้ถึงตอนนี้เราชอบ
จะคิดว่างานที่จัดหมวดหมู่ข้อความที่เป็น n แยกงานการจำแนกไบนารี
เช่น - เป็นเอกสารที่เกี่ยวกับการรักษาด้วยยาหรือไม่ ใช่ / ไม่ใช่ฉัน - เป็นเอกสารที่เกี่ยวกับธุรกิจหรือไม่ ใช่ / ไม่ใช่ - เป็นเอกสารที่เกี่ยวกับการเงินหรือไม่ ใช่ / ไม่ใช่และอื่น ๆ จำเป็นที่จะต้องดำเนินงาน n classilication แยกเพิ่มมากถึงเวลาที่เกี่ยวข้องกับรูปแบบของการจัดหมวดหมู่นี้ซึ่งแม้สำหรับการจัดหมวดหมู่เดียวมักจะมีราคาคอมพิวเตอร์
15.2 เอกสารข้อความที่เป็นตัวแทนของข้อมูลการทำเหมืองแร่
มาตรฐาน 'งานการทำเหมืองข้อมูลข้อมูลที่จะนำเสนอระบบการทำเหมืองข้อมูลในรูปแบบมาตรฐานที่อธิบายไว้ในบทที่ 1 หรือสิ่งที่คล้ายกันมีจำนวนคงที่ของคุณสมบัติ (หรือคุณลักษณะ) ซึ่งได้รับการแต่งตั้งก่อนที่จะถูกเก็บรวบรวมข้อมูล การทำเหมืองแร่ข้อความชุดมักจะประกอบด้วยเอกสาร
ตัวเองและคุณสมบัติที่สกัดจาก เอกสารโดยอัตโนมัติ
ขึ้นอยู่กับเนื้อหาของพวกเขาก่อนที่จะขั้นตอนวิธีการจัดหมวดหมู่ถูกนำไปใช้ โดยทั่วไปมีจำนวนมากของคุณสมบัติที่
ส่วนใหญ่ของพวกเขาที่เกิดขึ้นเพียง แต่ไม่ค่อยมีสัดส่วนที่สูงของคุณสมบัติที่มีเสียงดังและไม่เกี่ยวข้อง
มีหลายวิธีในการที่การแปลงเอกสารจากธรรมดา
ข้อความในกรณีที่มีจำนวนคงที่ของคุณลักษณะที่อยู่ในชุดฝึกอบรมสามารถดำเนินการออกเป็น ตัวอย่างเช่นเราอาจจะนับจำนวนครั้งที่ tlie วลีที่ระบุจะเกิดขึ้นหรืออาจจะรวมกันของ t1v (ญ | | | | คำ esecutivc,หรือเราอาจจะนับ
การเกิดขึ้นของสองหรือสามชุดตัวอักษร (knowm เป็น bigrams trigrams และ
ตามลำดับ) เพื่อวัตถุประสงค์ในบทนี้เราจะ assame ที่แสดงคำที่ใช้ง่ายที่จะใช้เป็นที่รู้จักกันเป็น
แทนถุงของคำด้วยการเป็นตัวแทนเอกสารนี้ถือว่าเป็นเพียงชุดของคำที่เกิดขึ้นในอย่างน้อยหนึ่งครั้ง คำสั่งของคำ,
ชุดที่พวกเขาเกิดขึ้นโครงสร้างวรรคเครื่องหมายวรรคตอนและแน่นอน nieanings ของคำจะถูกละเว้นทั้งหมด เอกสารเป็นเพียงชุดของคำวางในบางคำสั่งโดยพลการพูดตัวอักษรร่วมกับ
นับว่า niany ครั้งในแต่ละหนึ่งเกิดขึ้นหรือบางมาตรการอื่น ๆ ของ
ความสำคัญของแต่ละคำ
สมมติว่าเราต้องการที่จะเก็บค่า 'สำคัญ' สำหรับแต่ละคำในเอกสาร
เป็นหนึ่งเช่นในชุดการฝึกอบรมวิธีการที่เราควรจะทำมันได้หรือไม่ หากเอกสารที่ระบุได้ว่า 106 คำที่แตกต่างกันเราไม่สามารถใช้เพียงการแสดงที่มีคุณลักษณะ 106 (ละเว้นจำแนกประเภท) เอกสารอื่น ๆ ในชุดอาจจะใช้คำอื่น ๆ ที่อาจจะทับซ้อนกันด้วย 106 ในเช่นปัจจุบัน แต่ไม่จำเป็นต้องให้ เอกสารที่มองไม่เห็นว่าเราต้องการที่จะจัดอาจมีคำ
ที่ไม่ได้ใช้ในการใด ๆ ของการฝึกอบรม 4 @ fflsl. (l] ll จะ
s '
n ที่เห็นได้ชัดมาก แต่
ไม่ดีจะเป็นวิธีการในการจัดสรรเป็น; ฉัน | | กรัม | | เจ [| |, ttribiites ที่มีความจำเป็นเพื่อให้
คำที่เป็นไปได้ทั้งหมดที่อาจจะมีการใช้รหัส% |] สายที่เป็นไปได้
iinseen เอกสาร unfortiinately ถ้า langiiage ของ เอกสารที่เป็นภาษาอังกฤษจำนวนคำที่เป็นไปได้จะอยู่ที่ประมาณหนึ่งล้านซึ่งเป็นตัวเลขที่ทำไม่ได้ liopelessly ของ attribiites จะ IISE
วิธีการที่ดีมากคือการ จำกัด represciitation คำว่า actiially occiir ใน clociimeiits การฝึกอบรม เทศกาลยังสามารถเป็นจำนวนมาก thoiisands
(หรือมากกว่า) และเราจะดูที่วิธีการของ r (
tliis uiimber ในส่วนที่ 15.3 และ 15.4 ด้านล่าง. เราวางคำทั้งหมด iiscd อัล, LC
แหละ oiic-r ป่วย "พจนานุกรม * และ
จัดสรรตำแหน่งแอตทริบิวต์ในแต่ละแถวของการฝึกอบรมของเราที่ตั้งไว้สำหรับแต่ละคน เพื่อที่เราจะทำนี้โดยพลการเพื่อให้เราสามารถคิดว่ามันเป็นตัวอักษร
แทนถุงของคำเป็นอย่างโดยเนื้อแท้หนึ่งซ้ำซ้อนสูง
มันอาจเป็นไปได้ว่าสำหรับ iiiost เอกสารใด ๆ โดยเฉพาะอย่างยิ่งของ. เขาแอตทริบิวต์ / คุณสมบัติ (เช่นคำ) จะไม่ปรากฏ ตัวอย่างเช่นพจนานุกรมที่ใช้อาจจะมี 10,000 คำ
แต่เอกสารที่ระบุอาจมีเพียง 200 คำที่แตกต่างกัน ถ้าเป็นเช่นนั้นการแสดงที่เป็นตัวอย่างในการฝึกอบรมชุดจะมี 9,800 จาก 10,000 attribiites ที่มีค่าศูนย์แสดงไม่เกิดขึ้น
เช่นที่ไม่ได้ใช้
ถ้ามีหลายประเภทมีสองเป็นไปได้ในการสร้างพจนานุกรมของคำในการเก็บรวบรวมของ dociiments การฝึกอบรมแล้วแต่อย่างใดอย่างหนึ่งจะใช้พจนานุกรมมีแนวโน้มที่จะมีขนาดใหญ่
แรกเป็นวิธีการพจนานุกรมท้องถิ่น เราในรูปแบบที่แตกต่างกันพจนานุกรม
สำหรับแต่ละประเภทโดยใช้คำเหล่านั้นเท่านั้นที่ปรากฏใน dociiments จัดว่าอยู่ในประเภทที่ นี้จะช่วยให้แต่ละพจนานุกรมจะมีขนาดค่อนข้างเล็กที่ค่าใช้จ่ายของที่จำเป็นต้องสร้าง n ของพวกเขาที่มีหมวดหมู่ ar
วิธีที่สองคือการสร้างพจนานุกรมทั่วโลกซึ่ง
incliides ทุกคำที่ occiir oiice อย่างน้อยในใด ๆ ของ dociiments นี้จะถูกนำมาใช้สำหรับการจำแนก
ในแต่ละหมวดหมู่ n constrik'tin
- glol) อัลพจนานุกรมอย่างชัดเจนจะมากได้เร็วกว่าการสร้าง ar ท้องถิ่น tioiiaries-DIC biit ที่
Being translated, please wait..
