GPy/backlog/features/2025-08-15_matlab-comparison-framework.md

2.8 KiB
Raw Blame History

id title status priority created last_updated owner github_issue dependencies tags
matlab-comparison-framework Create MATLAB comparison framework for LFM kernel validation In Progress High 2025-08-15 2025-08-15 Neil Lawrence lfm-kernel-code-review
lfm
kernel
validation
matlab
comparison

Create MATLAB comparison framework for LFM kernel validation

Description

Create a comprehensive comparison framework to validate our GPy LFM kernel implementation against the MATLAB reference implementation in GPmat.

Background

  • We have analyzed the complete MATLAB implementation (SIM, DISIM kernels)
  • Need to validate our GPy implementation against the reference
  • Comparison framework will ensure mathematical correctness and numerical accuracy
  • Will help catch implementation errors and validate parameter handling

Implementation Tasks

  • Create MATLAB comparison script (scripts/compare_with_matlab.py)
  • Test MATLAB script with existing GPmat installation
  • Create standard test cases for SIM and DISIM kernels
  • Implement GPy computation integration in comparison script
  • Add parameter validation and constraint testing
  • Create visualization tools for comparison results
  • Add cross-kernel computation validation
  • Document comparison methodology and tolerance standards

Test Cases to Implement

  • Basic SIM kernel with standard parameters
  • SIM kernel with fast decay and no delay
  • Basic DISIM kernel with hierarchical parameters
  • Edge cases (zero delay, extreme decay values)
  • Multi-output scenarios
  • Cross-kernel computations (SIM × RBF, DISIM × SIM)

Acceptance Criteria

  • MATLAB comparison script runs successfully
  • Standard test cases produce consistent results
  • Comparison framework can detect implementation errors
  • Tolerance standards defined and documented
  • Results visualization and reporting implemented
  • Framework integrated into development workflow

Implementation Notes

  • Use scipy.io for loading MATLAB .mat files
  • Support both MATLAB and Octave as reference implementations
  • Implement robust error handling for missing dependencies
  • Create standardized test data sets for reproducible comparisons
  • Consider numerical precision differences between platforms
  • Backlog: lfm-kernel-code-review
  • Backlog: implement-lfm-kernel-core
  • MATLAB Implementation: ~/lawrennd/GPmat/matlab/

Progress Updates

2025-08-15

Created initial MATLAB comparison framework:

  • Implemented MATLABComparison class with automatic MATLAB/Octave detection
  • Created test case generation for SIM and DISIM kernels
  • Added result comparison with tolerance checking
  • Framework ready for integration with GPy implementation
  • Script can generate MATLAB code dynamically for different test cases