> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/machine-learning/stanford-ml-course/classification-and-representation.md).

# Classification And Representation

## Classification Problem

This problem is just like the linear regression problem except that the predicted values can only take on a small number of discrete values (e.g. 0 or 1).

### Why can't we use linear regression to solve Classification Problem?

![](https://868646840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LztfBhQUrZzyA7O_ZkJ%2Fuploads%2Fgit-blob-9ea3f84a7f77aee2b48655131aa8646e8feb15e7%2Flinear_class.png?alt=media)

As you can see here, if we have a datapoint that is kind of an outlier, the line of best fit gets skewed to the point the threshold becomes inaccurate to the dataset.
