# Distance analysis using Facebook AI Similarity Search (faiss)

**URL:** <https://forum.numer.ai/t/distance-analysis-using-facebook-ai-similarity-search-faiss/4205>\
**Category:** Data Science\
**Created:** [September 26, 2021, 11:26am UTC](https://forum.numer.ai/t/distance-analysis-using-facebook-ai-similarity-search-faiss/4205 "2021-09-26T11:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmnum](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@jmnum](https://forum.numer.ai/u/jmnum)\
**Post date:** [September 26, 2021, 11:26am UTC](https://forum.numer.ai/t/distance-analysis-using-facebook-ai-similarity-search-faiss/4205/1 "2021-09-26T11:26:43Z")

</div>

I was looking for close data points between training, validation and live data. It didn’t work ☹ but I’m a bit surprised that the validation data isn’t closer to the training data.

It may not be of any help, but here is a colab notebook: [Colab : Distance analysis](https://colab.research.google.com/drive/1kpkLKq463ZgnC5_oFGkUouSyqDBd14pZ?usp=sharing)

---

<div class="post-metadata">

**Author:** ![eleven\_sigma](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eleven\_sigma](https://forum.numer.ai/u/eleven_sigma)\
**Post date:** [September 27, 2021, 7:51pm UTC](https://forum.numer.ai/t/distance-analysis-using-facebook-ai-similarity-search-faiss/4205/2 "2021-09-27T19:51:14Z")

</div>

Should be interesting to do an intra-era analysis and see if there are eras with more similar points and others without them.  
Perhaps live era you selected belongs to a group of eras with high distance between points.

---

<div class="post-metadata">

**Author:** ![gbrecht](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/gbrecht/32/3509_2.png) [@gbrecht](https://forum.numer.ai/u/gbrecht)\
**Post date:** [September 28, 2021, 6:27am UTC](https://forum.numer.ai/t/distance-analysis-using-facebook-ai-similarity-search-faiss/4205/3 "2021-09-28T06:27:17Z")

</div>

If I read the notebook correctly, you compared the whole training data to the whole validation data.  
Would it not be more interesting to compare each era of the validation set to all eras of the training set (per era)?  
If by that way you could determine the training era that is closest to the validation (or later live) era, you could time which train-era-model to use on the live data
