No description
Find a file
jedarden ef75a823fc feat: implement presence prediction REST API endpoints
Implemented prediction API handler with comprehensive REST endpoints:

- GET /api/predictions - Get all predictions (optional filter by person/horizon)
- GET /api/predictions/stats - Get prediction statistics and data age
- POST /api/predictions/recompute - Force probability recomputation
- GET /api/predictions/accuracy - Get accuracy stats for all people
- GET /api/predictions/accuracy/overall - Get overall system accuracy
- GET /api/predictions/accuracy/{personID} - Get person-specific accuracy
- GET /api/predictions/pending - Get pending prediction count
- GET /api/predictions/patterns/zones - Get zone occupancy patterns
- GET /api/predictions/patterns/zones/{zoneID} - Get pattern for specific zone
- POST /api/predictions/patterns/compute - Compute zone occupancy patterns
- GET /api/predictions/horizon - Get Monte Carlo horizon predictions
- GET /api/predictions/horizon/{personID} - Get horizon prediction for person

The implementation includes:
- Proper error handling with appropriate HTTP status codes
- Query parameter support for filtering (person, horizon)
- JSON responses for all endpoints
- Helper function for logging prediction accuracy
- Table-driven tests for all endpoints

HA sensor exposure for predictions was already implemented in the MQTT
client via PublishPredictionSensors() and UpdatePredictionState() methods.

Accepts the 75% accuracy target at 15-minute horizon per specification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 09:59:42 -04:00
.beads feat: implement anomaly detection and security mode 2026-04-09 09:48:44 -04:00
.github/workflows feat: wire anomaly detection & security mode API endpoints 2026-04-07 15:09:34 -04:00
.marathon ci: set VERSION to 0.1.0 for image build 2026-04-06 08:53:25 -04:00
dashboard feat: implement anomaly detection and security mode 2026-04-09 09:48:44 -04:00
docs init: spaxel project — docs, plan, and marathon infrastructure 2026-03-26 06:43:25 -04:00
firmware feat: implement firmware LED blink handler for identify command 2026-04-09 07:01:42 -04:00
mothership feat: implement presence prediction REST API endpoints 2026-04-09 09:59:42 -04:00
tests/e2e feat: complete anomaly detection & security mode dashboard UI 2026-04-07 15:50:25 -04:00
.dockerignore feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
.gitignore feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
.needle-predispatch-sha feat: implement anomaly detection and security mode 2026-04-09 09:48:44 -04:00
.needle.yaml feat: trigger CI build and verify deployment 2026-04-06 09:54:08 -04:00
docker-compose.yml feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
Dockerfile feat: implement comprehensive /healthz endpoint 2026-04-07 11:09:36 -04:00
PROGRESS.md feat(mothership): signal processing package with phase/baseline/motion detection 2026-03-26 08:08:46 -04:00
VERSION ci: auto-bump version to 0.1.98 2026-04-09 13:49:01 +00:00