-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: NOVA architecture for predictive coding #4
Conversation
Add detailed module-level docstring explaining: - Historical context from Helmholtz to modern predictive coding - Core theoretical principles being demonstrated - Experimental setup using sine wave with noise - Key references to foundational papers - Basic usage example This documentation helps users understand both the theoretical background and practical implementation of the predictive coding network.
Implements a three-layer predictive coding architecture (NOVA) for social human-AI interaction: - ReactiveLayer for fast emotional responses (50-300ms) - ResponsiveLayer for context-aware responses (300-1000ms) - ReflectiveLayer for pattern learning and adaptation (>1000ms) Features: - Predictive coding with dynamic learning rates - Context window for pattern recognition - Adaptive response selection based on prediction errors - Long-term pattern analysis and behavior adaptation - Interactive demo with simulated social signals
Adds comprehensive module-level documentation explaining: - Three-layer NOVA architecture implementation - Integration with Friston's Free Energy Principle - Theoretical foundations from predictive coding research - Key academic references and timescale-based processing - Detailed docstrings for core classes and methods References work by Friston (2010), Clark (2013), and Hohwy (2013)
Reviewer's Guide by SourceryThis PR implements a comprehensive predictive coding architecture for social human-AI interaction based on the NOVA framework. The implementation consists of three main components: a three-layer reactive-responsive-reflective architecture, a predictive coding network, and detailed module documentation. The changes focus on establishing the theoretical foundations and practical implementation of predictive coding principles in human-AI interaction. Class diagram for NOVA Architecture ImplementationclassDiagram
class SocialSignal {
- type: str
- value: float
- confidence: float
- timestamp: float
}
class ReactiveLayer {
- emotional_state: float
- attention_level: float
- prediction_error: float
+ process_signal(signal: SocialSignal) Dict
}
class ResponsiveLayer {
- context_window: List[SocialSignal]
- pattern_predictions: Dict
+ process_context(signal: SocialSignal, reactive_output: Dict) Dict
+ _select_response(prediction: float, error: float) str
}
class ReflectiveLayer {
- interaction_patterns: Dict
- learning_history: List
+ analyze_patterns(signal: SocialSignal, reactive_output: Dict, responsive_output: Dict) Dict
+ _adapt_behavior(error_trend: float, volatility: float, stability: str) str
}
class VirtualHuman {
- reactive: ReactiveLayer
- responsive: ResponsiveLayer
- reflective: ReflectiveLayer
+ process_interaction(signal_type: str, value: float) Dict
}
SocialSignal --> ReactiveLayer
ReactiveLayer --> ResponsiveLayer
ResponsiveLayer --> ReflectiveLayer
ReflectiveLayer --> VirtualHuman
Class diagram for Predictive Coding NetworkclassDiagram
class PredictiveCodingNode {
- prediction: float
- learning_rate: float
- prediction_history: List
- error_history: List
+ update(actual_value: float) Tuple
}
class PredictiveCodingNetwork {
- nodes: List[PredictiveCodingNode]
+ process_input(input_value: float) List
+ plot_predictions()
}
PredictiveCodingNode --> PredictiveCodingNetwork
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @leonvanbokhorst - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please restore the development dependencies (pytest, black, etc.) in requirements.txt while keeping your new implementation. These are needed for testing and code quality.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…figuring Volatility Threshold Fixes #5 The main changes include: Added configurable min_samples and volatility_threshold parameters to the constructor Added validation to ensure min_samples is at least 5 Updated documentation to explain the new parameters and their significance Modified calculate_statistics() to use the configurable minimum samples Updated is_stable() to use the configurable volatility threshold These changes will improve statistical reliability by: Ensuring a minimum of 5 samples for calculations Making the volatility threshold configurable for different use cases Adding proper validation and documentation The code maintains backward compatibility while adding the new configuration options. Users can still use default values or customize them based on their needs.
Leonvanbokhorst/issue5
Adds comprehensive module-level documentation explaining:
References work by Friston (2010), Clark (2013), and Hohwy (2013)
Summary by Sourcery
Implement a three-layer NOVA architecture for predictive coding in social human-AI interaction, integrating theoretical frameworks from Friston and Clark. Add comprehensive documentation explaining the architecture and its applications in health literacy use cases.
New Features:
Documentation: