Raxol. Adaptive. FeedbackLoop
(Raxol v2.6.0)
View Source
Tracks pilot accept/reject decisions on layout recommendations.
Maintains a feedback history and computes acceptance accuracy. When accuracy drops below threshold and enough training data exists, triggers async NxModel retrain and broadcasts new params to the LayoutRecommender.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type t() :: %Raxol.Adaptive.FeedbackLoop{ accuracy_window: pos_integer(), feedback_history: [feedback()], pending_recommendations: %{required(binary()) => map()}, recommender_server: GenServer.server() | nil, retrain_in_progress: boolean(), training_examples: [{term(), term()}] }
Functions
@spec accept(GenServer.server(), binary()) :: :ok | {:error, :not_found}
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec force_retrain(GenServer.server()) :: {:ok, :rule_based_mode} | {:ok, :trained, map()} | {:ok, :insufficient_data}
@spec get_accuracy(GenServer.server()) :: float()
@spec get_history(GenServer.server(), pos_integer()) :: [feedback()]
@spec reject(GenServer.server(), binary()) :: :ok | {:error, :not_found}
@spec start_link(keyword()) :: GenServer.on_start()
@spec submit_recommendation(GenServer.server(), map()) :: :ok