0% found this document useful (0 votes)
67 views13 pages

10.the Basics of Data Classification

Uploaded by

poonnapha.w
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views13 pages

10.the Basics of Data Classification

Uploaded by

poonnapha.w
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

The Basics of Data

Classification
Data Classification
Choropleth Maps
This map uses a 5-class equal interval classification
แมน scheme (1-10, 11-20, …).
• Most choropleth maps (and graduated
symbol maps) employ some method of data
classification.
• The point of classification is to take a large
number of observations and group them into
การ ดก มอ ล คน าน
data ranges or classes. ทใ เ ด ค ถาม

• Despite this influence, data classification is


often taken for granted by map readers since
we rarely notice or question the classes that
are used in maps, and thus, it is one of the
easiest ways to “lie with maps”—whether า
intentionally or accidentally. ↳ อ ล เ ดการ ความ ดพลาด เรา
นอ ล
• Nonetheless, classification is a useful and ด ดพลาด
basic part of making thematic maps.
สี
ข้
ที่
จั
ค้
ที่ผิ
ตี
ข้
ผิ
ชั้
กิ


กิ
มู
ข้
มู
ห้
จั
อ่
มู
ลุ่
The Goal of Data Classification
แง แ งเ าๆ อ ล อาจ หายไป
น เ น ง น

• Generally speaking, a basic goal of a องการ อง


แบก ห น
• โดยทั่วไปแล้ว เป้าหมายพืน้ ฐานของรูปแบบการจาแนกประเภทคือการ
classification scheme is to group together อ ล มท
จัดกลุม่ การสังเกตที่คล้ายกันและแยกการสังเกตที่แตกต่างกันอย่าง
มาก

similar observations and split apart เห อน นอ วย น


observations that are substantially different. • เป้าหมายคือการหาจำนวนคลำสทีเ่ หมำะสมทีส่ ุด และตาแหน่งที่จะ
• In more technical terms, the goal is to find the ง น เ า แยกกบุท้ เหล่านัน้ เพื่อลดความแปรปรวนภายในกลุม่ ให้เหลือน้อยที่สดุ
เหมาะสม
- optimal number of classes—and where to put หมาย อ และเพิ่มความแตกต่างระหว่างกลุม่ ให้ได้มากที่สดุ
the breaks between those classes—so as to ไ
• 1.3 1.6 .... 3.5 3.9
องหา
ด minimize within-group variance and maximize

น วางbase between-group differences. ความ แปรปรวน


ลด อ ล ใก น
ของ

• For example, if I had a data set with 4 ยก วอ าง า วเลข1.3,1.6,3.5,3.9 แ ง งไง


observations of 1.3, 1.6, 3.5 and 3.9 many ง คนน วนให จะ แ ง 1.6 บ 3.5ออกจาก
folks would be inclined to split those
observations into 2 groups with 1.3 and 1.6 in น
the first group and 3.5 and 3.9 in the second
because that pairing makes sense given the
large numerical gap in the middle of the data
range.
• Such an approach is common and is called
“maximum breaks. -> มาก

breaks
ที่ดี
ข้
กั
ต้
รูข้
ด้
ดั
จุ
ต้
สุ
คื
ที่
ข้
ที่มั
ที่
กั
มีตั
ถ้
ดั
ยั
ส่
สุ
กั
กั
ป้
ป็
ท่
ลุ่
ต่
สิ่
มื่
บ่
ยู่
ด้
บ่
บ่
ชั้
มู
มู
มู
มื
ตั
ล้
นั้
กั
นั้
ย่
กั
ญ่
The Goal of Data Classification
• However, there are often other • อย่างไรก็ตาม มักจะมีขอ้ ควรพิจารณาอื่น ๆ เมื่อจัดประเภท
considerations when classifying our data ข้อมูลของเรา และเพียงแค่เพิ่มความแตกต่างระหว่างกลุ่มให้
and simply maximizing between group สูงสุดอาจไม่ใช่เป้าหมายหลัก:
differences may not be the primary goal: • ในตัวอย่างข้างต้น อาจเป็ นไปได้วา่ 1.5 เป็ นค่าวิกฤต สิ่งสาคัญ
• 1.3, 1.6, 3.5 and 3.9 คือต้องแยกความแตกต่างข้อมูลน้อยกว่า 1.5 และมากกว่า 1.5
• In the example above, it might be possible หรือจุดวิกฤต
that 1.5 is a critical value and all that • (เช่น หากสถานที่แห่งหนึ่งมีคา่ อ่านต่ากว่า 1.5 พวกเขาอาจมีสิทธิ์
matters is to distinguish between locations ได้รบั เงินทุนฉุกเฉิน)
above and below that critical break point
• (e.g., if a location has a reading below 1.5 • ในกรณีนี ้ ข้อจากัดภายนอกเข้ามาแทนที่คาตอบทาง
they might be eligible for emergency คณิตศาสตร์ และแม้วา่ จะอยู่ใกล้กนั พอสมควร 1.3 และ 1.6 จะ
funding). ถูกจัดให้อยู่ในคลาสที่แตกต่างกัน เนื่องจากพวกมันคร่อมเบรก
• In this case, external constraints over-ride พอยต์นนั้
our mathematical solutions and despite
being fairly close together 1.3 and 1.6
would now be placed in different classes
since they straddle that breakpoint.
The Goal of Data Classification
• If you are going to classify your • หากคุณจะจัดประเภทข้อมูล คุณต้องตัดสินใจทัง้
data you must decide both the จานวนชัน้ และวิธีการแบ่งข้อมูลออกเป็ นช่วง
number of classes and the • มีหลายวิธีในการจาแนกข้อมูลอย่างเป็ นระบบ
method for breaking your data
into ranges. แ ง ไน เห อน น เ น ไ ดเจน
แ จะ

• The are many ways


to systematically classify data.
ชั
ต่
ม่
ห็
ด้
บ่
ชั้
มื
กั
Number of Data Classes
แ งเ น 3 นอ นกา ลาง ง
แยก
น 3- 7 น วนให จะ
,

• If you want to be safe, make a map • The key question is how much เ น าย

with 3–7 data classes. Of course, your generalization do you want? A map
goals and data should also play into with 3 classes/colors (e.g., low,
this decision: เ น า ยาก
จะ แ ว เ ละเ ยด

medium, high) will be easy to see and
• For example, political maps in the United remember, but may gloss over some อ ระ ง แ

States often have only 2 classes (the well- very important aspects of the data 3 น อย น
อาจ

known red state / blue state maps) or a and create artificial geographic อ ลไ ก ม แโด ก ม อ 2 เด ไป

map that wants to simply highlight places patterns by lumping together many 3 ท ใ การ ดก ม อง

บางกร ใ จ นวน • The more classes you use, the less data
above and below a national average.
places that are in fact quite different. 5 น
• แต่อาจปั ดส่วนที่สาคัญมากของข้อมูลและสร้างรูปแบบทาง
น มากก า ง โ
generalization (which is good), but this
comes at the expense of legibility and the ภูมศิ าสตร์เทียมโดยการรวมสถานที่หลายแห่งที่จริง
วง วาแ ง
น เผยร associated risk of map reading errors ค่อนข้างมากเข้าด้วยกัน แตกต่าง.
since more colors are harder to see and • There is no ideal number of classes for
ไป ห อใ เยอะ print reliably (which is bad). a map, so experiment.
เ าไห
อเ ย
ง ด
ไ ไอเ ย าแ ง ไ
ใน

ส่
ต่
คื
ดี
สู
ช่
ง่
ดู
ว่
ก็
ข้
มีข้
น้
มั
มี
ต้
ด้
มี
ข้
สี
ว่
ที่
ช็
ต่
ยู่
ด้
ท่
ห็
มี
ชั้
บ่
ลุ่


ลุ่
ต่
ห็
ด้
ห่
ล้
ชั้
ม่
ชั้
สิ่
สุ
วั
ริ่
มู
รื
ดี
ช้
ขึ้
อี
ช้
บ่
จั

ชั้
ชั้
ชั้
ชิ้
มี
ดี
ห้
สี
ลุ่
ร่
ว่
ณี
ป็
ญ่
Number of Data Classes
า เรา ไ แ ใจ าควรแ ง น

• Not sure how many classes to use?


Have a look at the distribution ofก บไป
your data in a histogram (see ควร histogram
examples right): ห งจาก แ ว
• Are there obvious clusters within
your data? เกาะ น ด เจน
ก ม อ าง ย

• Are there large gaps in your data


range that suggest nice compact
data classes? อง างขนาดให น า ใควรใ ไ ระ • มีกลุม่ ที่ชดั เจนในข้อมูลของคุณหรือไม่
ห าง น

• If so, pick that number of classes • มีช่องว่างขนาดใหญ่ในช่วงข้อมูลของคุณที่แนะนาคลาส


and place those class breaks ข้อมูลที่มีขนาดกะทัดรัดหรือไม่
around those clusters. • ถ้าใช่ ให้เลือกจานวนชัน้ นัน้ และวางตัวแบ่งชัน้ เรียนไว้
รอบคลัสเตอร์เหล่านัน้
ต้
ว่
ที่
ดู
ดู
มี
กั
ที่
ยื
มีช่
ถ้
มั้
ช้
ล้
ย่
ส่
ลุ่
นั้
ชั้
บ่
ว่
ว้
ม่
ลั
ลั
มั้
ดี
ว่
น่
ญ่
การ • เช่นเดียวกับที่ไม่มีจานวนคลาสที่ถกู ต้อง ไม่มีวิธีเดียวที่ดีท่ีสุดในการจาแนกข้อมูลของ
คุณออกเป็ นช่วง

Classification Method •

ให้ดฮู ิสโตแกรม (หรือแผนภาพกระจาย) เพื่อกาหนด 'รูปแบบ' ของการสังเกตของคุณ
เหนือสิ่งอื่นใด เป้าหมายของการจัดประเภทข้อมูลคือการวางสถานที่ท่ีมีอตั ราค่าบริการ

ตลาด
ใกล้เคียงกันในชัน้ เดียวกัน และแยกสถานที่ท่ีมีอตั ราต่างกันมากออกเป็ นชัน้ ต่างๆ
ไ าน ไหน ดไ แง

• Just as there is no single correct


number of classes, there is no
single best way to classify you data
into ranges.
• Look at a histogram (or scatterplot)
to determine the ‘form’ of your
observations.
• Above all else the goal of data
classification is to put places with
similar rates in the same class, and
separate places with very different
rates into different classes.
วิ
ว่
ดีที่
ว่
ชิ้
รั่
ธี
บ่
ม่
ม่
สุ
รู้
• แบ่งข้อมูลออกเป็ นคลาสขนาดเท่าๆ กัน (เช่น 0-10, 10-20, 20-30 เป็ นต้น) และทางานได้ดีที่สดุ กับ
ข้อมูลที่กระจายทั่วช่วงทัง้ หมด
• ข้อควรระวัง: หลีกเลีย่ งวิธีนี ้ หากข้อมูลของคุณเอียงไปด้านใดด้านหนึง่ หรือหากคุณมีคา่ ผิดปกติ
Classification Method •
มากหนึง่ หรือสองค่า
Outliers ในกรณีนนั้ มักจะสร้างคลาสที่วา่ งเปล่า โดยเสียคลาสที่ดีโดยสมบูรณ์โดยที่ไม่มีการ
สังเกตเลย
• เนื่องจากข้อมูลโรงแรมด้านบนไม่มีคา่ ที่ผิดปกติมากนัก ข้อมูลนีจ้ ึงเป็ นการกระจายข้อมูลที่ทางาน
ไป เ ได้ดีในช่วงเวลาที่เท่ากัน

EQUAL INTERVAL แง น 8- 10,


10- 20, 20-
30
·พๆ

• divides the data into equal size classes (e.g.,


0-10, 10-20, 20-30, etc.) and works best on
data that is generally spread across the entire
อ ระ ง เ ยง อ ลเ ยง ามใ interval
range. ลา า

• CAUTION: Avoid equal interval if your data


are skewed to one end or if you have one or

/
two really large outlier values.
• Outliers in that case will likely produce empty
classes, wasting perfectly good classes with

no observations in them. เ าๆ น

• Since the hotel data above doesn’t have really


large outliers, this is a data distribution that
works well with equal interval. ( ↓
ข้
ที
ข้
ถ้
ห้
กั
ที่
ท่
จี
ชั้
ลี่
บ่
วั
มู
ช้
• ในแต่ละชัน้ จะมีขอ้ มูลเท่าๆ กัน เช่น หากคุณมี 30 มลรัฐและ 6 คลาสข้อมูล คุณจะมี 5
มลรัฐในแต่ละคลาส

Classification Method •


ปัญหาเกี่ยวกับควอนไทล์คือคุณสามารถลงเอยด้วยคลาสที่มีชว่ งตัวเลขต่างกันมาก (เช่น
1-4, 4-9, 9-250…คลาสสุดท้ายนัน้ ใหญ่มาก)
ควอนไทล์ยงั สามารถแยกตาแหน่งที่มีอตั ราใกล้เคียงกัน และจัดกลุม่ สถานที่ท่ีมีอตั รา
ต่างกันมากเข้าด้วยกัน ซึ่งเป็ นสิ่งที่ไม่พงึ ปรารถนาอย่างยิ่ง ดังนัน้ ให้ใช้ฮิสโตแกรมเพื่อดู

น 5 ประเภท
ว่าสิ่งนีเ้ กิดขึน้ หรือไม่เหนือสิ่งอื่นใด เป้าหมายของการจัดประเภทข้อมูลคือการวาง
แ ละ สถานที่ท่ีมีอตั ราค่าบริการใกล้เคียงกันในชัน้ เดียวกัน และแยกสถานที่ท่ีมีอตั ราต่างกัน
QUANTILES มากออกเป็ นชัน้ ต่างๆ
• will create attractive maps that place an equal • รวมส่วนหนึ่งของคลัสเตอร์ท่ีสามกลับเข้าไปในคลาส 2 แม้วา่ จะใกล้เคียงมาก (เชิง
number of observations in each class: If you have ตัวเลข)
30 counties and 6 data classes, you’ll have 5
counties in each class.
• The problem with quantiles is that you can end up
with classes that have very different numerical ใ
ก ด
อกม 2

ranges (e.g., 1-4, 4-9, 9-250…the last class is huge).


• Quantiles can also separate locations with very ↓
similar rates and group together places that have
very different rates, which is very undesirable, so
use the histogram to see if this is happening.
• CAUTION: In the hotel room example above, the
quantile produced a questionable class break by
lumping a portion of the third cluster back into
class 2, despite it being much closer (numerically)
to the other observations in class
จั
ถู
มี
ที่
ห้
ลุ่
ชั้
ยู่
ต่
• เป็ นรูปแบบการจาแนกประเภทที่ "เหมาะสมที่สดุ " ซึ่งค้นหาการแบ่งคลาสที่ (สาหรับ
จานวนคลาสที่กาหนด) จะลดความแปรปรวนภายในคลาสให้นอ้ ยที่สดุ และเพิ่มความ

Classification Method •
แตกต่างระหว่างคลาสให้ได้มากที่สดุ
ข้อเสียประการหนึ่งของวิธีนีค้ ือชุดข้อมูลแต่ละชุดสร้างโซลูชนั การจาแนกประเภทเฉพาะ
และหากคุณต้องการเปรียบเทียบระหว่างแผนที่ตา่ งๆ เช่น ในแผนที่หรือชุดข้อมูล (เช่น
แต่ละแผนที่สาหรับปี 1980, 1990, 2000)
อ ล
ดง ด และ แ ง

NATURAL BREAKS
• is a kind of “optimal” classification
scheme that finds class breaks that (for a
given number of classes) will minimize
within-class variance and maximize
between-class differences.
• One drawback of this approach is each
dataset generates a unique classification
solution, and if you need to make
comparison across maps, such as in an
atlas or a series (e.g., one map each for
1980, 1990, 2000)
• you might want to use a single scheme
that can be applied across all of the นอ บการกระจาย

maps. ไป น
แ ละ
ไ สนใจ จะ แ ง
เ า น ย และ

ดูจุ
ข้
ว่
จั
ปี
ท่
ขึ้
บ่
ชั้
ต่
บ่
มั้
ม่
สู
มู
ยู่
กั
กั
สุ
• เช่นเดียวกับที่ไม่มีจานวนคลาสที่ถกู ต้อง ไม่มีวิธีเดียวที่ดีท่ีสุดในการจาแนกข้อมูลของ
คุณออกเป็ นช่วง

Classification Method •

ให้ดฮู ิสโตแกรม (หรือแผนภาพกระจาย) เพื่อกาหนด 'รูปแบบ' ของการสังเกตของคุณ
เหนือสิ่งอื่นใด เป้าหมายของการจัดประเภทข้อมูลคือการวางสถานที่ท่ีมีอตั ราค่าบริการ
ใกล้เคียงกันในชัน้ เดียวกัน และแยกสถานที่ท่ีมีอตั ราต่างกันมากออกเป็ นชัน้ ต่างๆ

MANUAL
• There are many times we need to manually set
one or all of the class breaks.
• For example; Are there important break points
that need to be “hardwired” into your class
breaks?
• Does one of the class breaks need to be the mean?
• Is this map part of a series that needs the same
classes across all of the maps (so that the colors
always refer to the same numbers on any map)?
• Do any of the other methods get you close to a
good solution that could be improved with a few
slight adjustments those classes?
• If so, do not hesitate to set these class breaks
yourself.
How to Generate Classification Schemes
• GIS software such as QGIS and เ น ยอด ยด ด

ArcGIS include the capability to
classify your data using a variety
of methods (or manually) and to
see your data distribution as a
histogram to assist in
classification.
ตื้
ผิ
จุ
ห็
มั้

You might also like