Skip to main content

Machine Learning

Implementing Vector Embeddings and Semantic Search in Pure Java

A complete implementation of a semantic search engine in pure Java — no external libraries. Covers TF-IDF vectorisation, cosine similarity, and document ranking by meaning. Explains the mathematics behind vector embeddings, how they power RAG and AI search systems, and provides a working query engine with annotated code and sample output. The same architecture used by Pinecone, Weaviate, and Elasticsearch — built from scratch.

Building a Neural Network from Scratch in Pure Java (No Libraries)

A complete, from-scratch implementation of a feedforward neural network in pure Java — no TensorFlow, no DL4J, no external libraries. Covers the Neuron model, forward propagation, sigmoid activation, backpropagation with gradient descent, and trains the network to learn the XOR function. Every line of code is annotated with the underlying mathematics so you understand exactly what the network is doing at each step.