Class: AiRootShield::Enterprise::AIDetectionEngine
- Inherits:
-
Object
- Object
- AiRootShield::Enterprise::AIDetectionEngine
- Defined in:
- lib/ai_root_shield/enterprise/hybrid_detection_engine.rb
Overview
AI detection engine for machine learning analysis
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #analyze(data, real_time_result, options = {}) ⇒ Object
-
#initialize(config) ⇒ AIDetectionEngine
constructor
A new instance of AIDetectionEngine.
- #learn_from_data(data, feedback) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(config) ⇒ AIDetectionEngine
Returns a new instance of AIDetectionEngine.
577 578 579 580 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 577 def initialize(config) @config = config @status = { active: false, predictions_made: 0 } end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
575 576 577 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 575 def status @status end |
Instance Method Details
#analyze(data, real_time_result, options = {}) ⇒ Object
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 592 def analyze(data, real_time_result, = {}) return {} unless @status[:active] risk_score = ml_risk_prediction(data, real_time_result) factors = ml_factor_detection(data, real_time_result) @status[:predictions_made] += 1 { risk_score: risk_score, factors: factors, confidence: 0.92, model_version: '1.0', analysis_type: :ai_ml } end |
#learn_from_data(data, feedback) ⇒ Object
609 610 611 612 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 609 def learn_from_data(data, feedback) # Machine learning model updates would go here true end |
#start ⇒ Object
582 583 584 585 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 582 def start @status[:active] = true @status[:started_at] = Time.now.utc.iso8601 end |
#stop ⇒ Object
587 588 589 590 |
# File 'lib/ai_root_shield/enterprise/hybrid_detection_engine.rb', line 587 def stop @status[:active] = false @status[:stopped_at] = Time.now.utc.iso8601 end |