Raxol.Core.ErrorPatternLearner (Raxol v2.0.1)
View SourceError Pattern Learning System - Phase 4.3 Error Experience
Machine learning-inspired system that learns from error patterns to:
- Predict likely errors before they occur
- Improve fix suggestions based on success rates
- Identify emerging error patterns in Phase 3 optimizations
- Automatically update error templates with learned knowledge
Features
- Pattern recognition using frequency analysis
- Success rate tracking for fix suggestions
- Phase 3 optimization correlation analysis
- Predictive error detection
- Automatic template enhancement
Summary
Functions
Returns a specification to start this module under a supervisor.
Get enhanced suggestions based on learned patterns.
Export learned patterns for analysis or backup.
Get the most common error patterns.
Get learning statistics and insights.
Get patterns correlated with Phase 3 optimizations.
Import previously learned patterns.
Get predictions for potential errors based on current context.
Record a new error occurrence for learning.
Record the success or failure of a fix suggestion.
Types
@type error_pattern() :: %{ signature: String.t(), frequency: integer(), contexts: [map()], successful_fixes: [String.t()], failure_modes: [String.t()], phase3_correlation: float(), prediction_confidence: float(), first_seen: DateTime.t(), last_seen: DateTime.t() }
@type learning_state() :: %Raxol.Core.ErrorPatternLearner{ last_cleanup: DateTime.t(), learning_enabled: boolean(), patterns: %{required(String.t()) => error_pattern()}, phase3_correlations: %{required(atom()) => float()}, prediction_models: map(), suggestion_success_rates: %{required(String.t()) => float()} }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Get enhanced suggestions based on learned patterns.
Export learned patterns for analysis or backup.
Get the most common error patterns.
Get learning statistics and insights.
Get patterns correlated with Phase 3 optimizations.
Import previously learned patterns.
Get predictions for potential errors based on current context.
Record a new error occurrence for learning.
Record the success or failure of a fix suggestion.