# LabeledPoint

> There's also a LabeledPoint data type that comes up, and that's just what it sounds like, a point that has some sort of label associated with it that conveys the meaning of this data in human readable terms.

A dense or sparse local vector having a label or a response value is called a labeled point. They are used in supervised learning more prominently in classification and regression-based algorithms. Labeled point values are stored in a double datatype.

![](/files/-LsbZeD9GCc4sZTt4-ZC)

From <https://medium.com/@rickynguyen/getting-started-with-spark-day-5-36b62a6d13bf>

> A labeled point is a local vector, either dense or sparse, associated with a label/response

![](/files/-LsbZeDBl4ugxzwYb5yR)

## Spark In Action

First you have to put each example in the dataset in a structure called a LabeledPoint , which is used in most of Spark’s machine-learning algorithms . It contains the target value and the vector with the features.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nag-9-s.gitbook.io/machine-learning/mlib/data-types/labeledpoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
