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

# Machine Learning

- [Clustering with Scikit Learn](https://aisviz.gitbook.io/documentation/machine-learning/clustering-with-scikit-learn.md): Find shipping lanes, anchorages, and vessel behavior groups in one day of NOAA AIS data by running DBSCAN and KMeans over AISdb tracks.
- [Kalman Filters with FilterPy](https://aisviz.gitbook.io/documentation/machine-learning/kalman-filters-with-filterpy.md): Turn a jittery AIS track into a smooth path and a running velocity estimate with a constant-velocity Kalman filter in FilterPy, then flag GPS outliers with the filter's innovation.
- [seq2seq in PyTorch](https://aisviz.gitbook.io/documentation/machine-learning/seq2seq-in-pytorch.md): Build an attention-based encoder-decoder LSTM in PyTorch that forecasts a vessel's next positions from its recent AIS track, using AISdb to query, clean, and reshape the trajectories for training.
- [AutoEncoders in Keras](https://aisviz.gitbook.io/documentation/machine-learning/autoencoders-in-keras.md): A GRU autoencoder in Keras that compresses four hours of vessel track and decodes an eight-hour forecast, trained with probabilistic teacher forcing.
- [Embedding with traj2vec](https://aisviz.gitbook.io/documentation/machine-learning/embedding-with-traj2vec.md): Discretize AIS trajectories onto an H3 grid and train a t2vec-style encoder-decoder in PyTorch that embeds vessel tracks as fixed-length vectors.
- [Using Newtonian PINNs](https://aisviz.gitbook.io/documentation/machine-learning/using-newtonian-pinns.md): A physics-informed Seq2Seq model that penalizes unrealistic velocity and acceleration in predicted vessel tracks, so forecasts stay kinematically plausible even when AIS data is sparse or noisy.
- [TGNs with TorchGeometric](https://aisviz.gitbook.io/documentation/machine-learning/tgns-with-torchgeometric.md): Turn one day of NOAA AIS data into a temporal transit graph with AISdb and train a Temporal Graph Network on it with PyTorch Geometric.
- [Building a RAG Chatbot](https://aisviz.gitbook.io/documentation/machine-learning/building-a-rag-chatbot.md): Build a documentation chatbot with Retrieval-Augmented Generation. Scrape the AISViz docs, index them in ChromaDB, and ground Gemini answers in real pages that every response cites.
- [A No-Code Interface](https://aisviz.gitbook.io/documentation/machine-learning/a-no-code-interface.md): Preprocess, discretize, and enrich AIS tracks through a point-and-click Gradio app, with built-in plotting and a Gemini assistant, no Python script required.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://aisviz.gitbook.io/documentation/machine-learning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
