Module es.upm.fi.cig.multictbnc
Class ConceptDriftAdaptiveMethod
java.lang.Object
es.upm.fi.cig.multictbnc.conceptdriftdetection.ConceptDriftAdaptiveMethod
- Direct Known Subclasses:
ConceptDriftGloballyAdaptiveMethod
,ConceptDriftLocallyAdaptiveMethod
Abstract class representing a concept drift adaptive method. This class provides a framework for implementing
adaptive methods to handle concept drifts in Multi-CTBNCs.
-
Constructor Summary
ConstructorDescriptionConceptDriftAdaptiveMethod
(ConceptDriftScore conceptDriftScore, List<String> namesVariables, double detectionThreshold, boolean showCharts, String title) Initializes the concept drift adaptive method with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
adaptModel
(MultiCTBNC<CPTNode, CIMNode> model, Dataset batchDataStream) Abstract method for adapting the model based on the provided data batch.Retrieves the list of nodes that were last identified as having undergone concept drift.abstract String
Returns aString
describing the results of the last concept drift detection.long
Returns the time taken for the last update of the model.protected abstract void
setUpLineChart
(String title, double detectionThreshold) Sets up line charts for visualizing concept drift detection results if the charts are enabled.
-
Constructor Details
-
ConceptDriftAdaptiveMethod
public ConceptDriftAdaptiveMethod(ConceptDriftScore conceptDriftScore, List<String> namesVariables, double detectionThreshold, boolean showCharts, String title) Initializes the concept drift adaptive method with the specified parameters.- Parameters:
conceptDriftScore
- scoring mechanism to detect concept driftnamesVariables
- list of variable names used in the modeldetectionThreshold
- threshold for determining concept driftsshowCharts
- flag indicating whether to display drift detection chartstitle
- title for the drift detection charts
-
-
Method Details
-
setUpLineChart
Sets up line charts for visualizing concept drift detection results if the charts are enabled.- Parameters:
title
- title for the drift detection chartsdetectionThreshold
- threshold for determining concept drifts
-
adaptModel
public abstract boolean adaptModel(MultiCTBNC<CPTNode, CIMNode> model, Dataset batchDataStream) throws ErroneousValueExceptionAbstract method for adapting the model based on the provided data batch. Implementations should define how the model is updated in response to concept drifts.- Parameters:
model
- Multi-CTBNC model to adaptbatchDataStream
- new data batch- Returns:
true
if the model was adapted,false
otherwise- Throws:
ErroneousValueException
- if an error occurs during model adaptation
-
getResults
Returns aString
describing the results of the last concept drift detection.- Returns:
- String describing the concept drift detection results
-
getUpdatingTime
public long getUpdatingTime()Returns the time taken for the last update of the model.- Returns:
- time taken for updating the model
-
getLastChangedNodes
Retrieves the list of nodes that were last identified as having undergone concept drift.- Returns:
- list of nodes that experienced concept drift in the most recent adaptation
-