reset

abstract suspend fun reset()(source)

Resets the learning engine to a fresh, untrained state.

This operation completely clears all learned patterns, model weights, and training history, effectively returning the engine to its initial state as if it were newly created. This is useful for privacy compliance, debugging, or when users want to start learning from scratch.

Reset scope and implications:

  • Model parameters: All weights and biases reset to initial values

  • Learning history: Training progress and adaptation metrics cleared

  • Pattern cache: Any cached predictions or intermediate results removed

  • User patterns: All learned behavioral patterns permanently deleted

  • Performance metrics: Accuracy statistics and learning insights reset

Data privacy and compliance:

  • Ensures complete removal of learned user behavior patterns

  • Satisfies requirements for "right to be forgotten" privacy regulations

  • Provides clean slate for new users or changed usage patterns

  • Enables secure handover of devices between different users

Post-reset behavior:

  • Engine remains initialized and ready for new training data

  • Predictions will return to baseline/default behavior until new patterns are learned

  • All ongoing training jobs are cancelled and cleaned up

  • Background processes are restarted with fresh state

Throws

IllegalStateException

if engine is not properly initialized

ModelException

if reset operation cannot be completed successfully