-Need to update this file each time when there is any modifications in the following components.
-
-main.py:
-* Initiates xapp api and runs the entry() using xapp.run()
-* If hdbscan is not present in the current path, run train() to train the model for the prediction.
-* Call predict function to perform the following activities for every 1 second.
- a) Read the input csv file( 1000 UEID samples)
- b) Predict the anomaly records for the randomly selected UEID
- c) send the UEID and timestamp for the anomalous entries to the Traffic Steering (rmr with the message type as 30003)
- d) Get the acknowledgement message from the traffic steering.
-
-Note: Need to handle the logic if we do not get the acknowledgment from the TS.
- How xapp api handle this logic
-
-ad_train.py - train hdbscan model using the input csv files and save the model.
-
-dbscan: Model has been trained using the train dataset(train sampling for prediction)
-
-ue_test.csv: Input csv file has 1000 samples and for each UEID has one or more than one entries for poor signal.
-
-processing.py:
-It performs the following activities:
-* Columns that are not useful for the prediction will be dropped(UEID, Category, & Timestamp)
-* Convert integer and float type into numeric data type.
-* verify and drop the highly correlated parameters.
-* returns UEID, timestamp and category for the anamolous entries.
-
-
-ad_model.py:
-* Extract all the unique UEID and filters only the randomly selected UEID(this step will be removed when we implement in sdl way of getting the UEID).
-* Call Predict method to get the final data for the randomly selected UEID.
-
-
-tb_format.py:
-* start the preprocessing, processing steps using the keycolumns
-* populate current timestamp value for MeasTimestampRF
-
+For AD xapp we require UEReport (UE related dataset)
+
+AD xApp expect UE data from influxDB database in following structure:
+ * There exists database with name "RIC-Test"
+ * Inside "RIC-Test" database we have measurments namely "UEReports"
+
+Note: *We need to update ad_config.ini with influxdb configuration.
+Update host as one of the following:
+ 1. influxdb service ruuning in RIC platform (host = <service name>.<namespace>)
+ OR IP of influxdb pod
+ 2. Update user and password for influxDB instance
+
+To polpulate influxdb with static data provided in .csv (ue.csv).
+ 1. Run "python3 insert.py"
+ 2. Wait for few minutes before deploying AD xApp
+ Note: This will be depreciated in next release when there will be data coming from KPIMON
+
+
+AD xApp performs following:
+
+* Initiates xapp api, make connection with influxDB and runs the entry() using xapp.run()
+* If Model is not present in the current path,
+ a) Read history data from InfluxDB
+ b) apply pre-processing steps
+ c) trigger Training of ML model.
+ d) after model validation, save transformation, model artifacts
+* Detect anomalous user in real-time.
+ a) Read live data from influxDB every 0.5 second
+ b) Detect anomalous records on given input
+ c) Investigate degradation type for anomalous users
+* Listens to RMR port for A1 policy (message type 20011) in a format given below. Which consists throughput threshold parameter (default: 70%) for an degradataion event to qualify for a handover
+ {'operation': 'CREATE', 'payload': '{\"thp_threshold\":74}', 'policy_instance_id': 'demo-1', 'policy_type_id': '9997'}"}
+* Send the ue-id, DU-ID, Degradation type and timestamp for the qualified anomalous records to the Traffic Steering (via rmr with the message type as 30003)
+* Get the acknowledgement message from the traffic steering
+* store xApp result in "AD" measurement of influxDB
+
+Note: Need to implement the logic if we do not get the acknowledgment from the TS. (How xapp api handle this?)