I have some vectors of data as:

```
681,305,305,304,667,92.87,254.51,100.24  has "A" as key

```

and 

```
460,682,702,683,443,89.17,273.83,102.19 has"B" as key

```

and

```
593,395,413,418,564,71.13,17.67,83.79 has "C" as key

```

Then, from my device, I obtained a sample of data and needed to translate it into key. sample of data as below:

```
593,395,413,418,564,71.13,17.67,83.79

```

I want to calculate the similarity of the obtained data with the three samples of the above data, see which one is most similar to the obtained data, then I choose key of sample to return. I'm using C#.

Is there any algorithm for calculating it? Please help me, thanks!