This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
zlibsvm is an object-oriented Java wrapper for the LIBSVM machine learning library. It provides a clean API/implementation separation across two Maven modules:
- zlibsvm-api — Interfaces and domain model (no external dependencies)
- zlibsvm-core — Implementation backed by native LIBSVM Java bindings
# Build and test
mvn clean package
# Run all tests
mvn test
# Run a single test class
mvn -pl zlibsvm-core -Dtest=SvmTrainingTestCase test
# Release build (includes source, javadoc, GPG signing)
mvn clean package -Prelease
# Check for dependency updates
mvn clean compile -Pversion-checkRequirements: Maven 3.8.0+, Java 21
The project follows a strict API/implementation separation:
API layer (de.hhn.mi.* in zlibsvm-api):
domain—SvmDocument,SvmFeature,SvmClassLabel,SvmModel,SvmMetaInformationconfiguration—SvmConfiguration,SvmType,KernelType,SvmConfigurationBuilderprocess—SvmTrainer,SvmClassifierexception—ClassificationCoreException
Implementation layer (de.hhn.mi.* in zlibsvm-core):
SvmConfigurationImpluses Builder pattern for constructing LIBSVM parameter setsSvmTrainerImpl/SvmClassifierImplextend abstract base classes that handle conversion between domain objects and native LIBSVM structures (svm_problem,svm_model)NativeSvmModelWrapperbridges the domain model to LIBSVM's native model representation
Key dependencies: libsvm 3.35, slf4j-api, JUnit 5 (Jupiter)
Tests are in zlibsvm-core and use the mushroom dataset in src/test/resources/. Four test suites:
SvmTrainingTestCase, SvmClassifierTestCase, SvmConfigurationTestCase, SvmPerformanceTestCase. Tests run with max
heap 512MB.
GitHub Actions runs mvn clean package on JDK 21 (Temurin) for pushes to master and PRs.