> For the complete documentation index, see [llms.txt](https://otd.gitbook.io/book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://otd.gitbook.io/book/module-7/classification.md).

# Classification

An introduction to classification.

## Introduction <a href="#introduction" id="introduction"></a>

‌How do you decide when to turn on the lights in your room?

You take in the world around you — can you see your bed? Your desk? Are you able to read? All of this information is **data**, and you are making a **decision** based off of this data. The more data you have, the better you are at making decisions.‌

In the same way, you can teach computers how to use data to make decisions. Given enough information, a computer might be able to tell you when to turn on the lights, or even how to drive a car!‌

One way a computer can use information to make decisions is through **classification**. In classification, you are trying to sort objects into groups based on characteristics they have. For example, given a bunch of fruits, how do you tell which ones are which? You might differentiate oranges based on the color of their skin, or the rough texture. Apples have smooth, shiny skin, and are very firm. On the other hand, peaches are soft and fuzzy. Using this, you are able to **classify** any new fruits you receive by figuring out what fruit it is.‌

In the same way, you can teach a computer to make decisions like this. If you provide a computer with a table containing characteristics of fruits, it might look like this:

| fruit\_type | skin\_texture | skin\_color | shape  |
| ----------- | ------------- | ----------- | ------ |
| peach       | fuzzy         | pink        | round  |
| apple       | smooth        | red         | oblong |
| orange      | rough         | orange      | round  |
| apple       | smooth        | yellow      | round‌ |

Now, given a mystery fruit, where you have all the information but its fruit type, can you tell which category it belongs in?

We call a computer program that can determine what category something belongs in a **classifier**.[<br>](https://app.gitbook.com/@otd/s/book/~/drafts/-MB76GR-oThERHMiRtCi/module-6/data-visualization/introduction-to-data-visualizations/@merged)
