6099b0241fb29799f31357aa2902769c499fd537
[ric-app/ad.git] / README.txt
1 # ==================================================================================
2 #  Copyright (c) 2020 HCL Technologies Limited.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 # ==================================================================================
16
17 Usage of all the programs and files have been mentioned below for the reference.
18 Need to update this file each time when there is any modifications in the following components. 
19
20 main.py: 
21 * Initiates xapp api and runs the entry() using xapp.run()
22 * If hdbscan is not present in the current path, run train() to train the model for the prediction.
23 * Call predict function to perform the following activities for every 1 second. 
24    a) Read the input csv file( 1000 UEID samples)
25    b) Predict the anomaly records for the randomly selected UEID
26    c) send the UEID and timestamp for the anomalous entries to the Traffic Steering (rmr with the message type as 30003)
27    d) Get the acknowledgement message from the traffic steering.
28
29 Note: Need to handle the logic if we do not get the acknowledgment from the TS.
30       How xapp api handle this logic
31
32 ad_train.py - train hdbscan model using the input csv files and save the model. 
33
34 dbscan: Model has been trained using the train dataset(train sampling for prediction)
35
36 ue_test.csv: Input csv file has 1000 samples and for each UEID has one or more than one entries for poor signal.
37
38 processing.py:
39 It performs the following activities:
40 * Columns that are not useful for the prediction will be dropped(UEID, Category, & Timestamp)
41 * Convert integer and float type into numeric data type.
42 * verify and drop the highly correlated parameters.
43 * returns UEID, timestamp and category for the anamolous entries.
44
45
46 ad_model.py: 
47 * 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).
48 * Call Predict method to get the final data for the randomly selected UEID.
49
50
51 tb_format.py:
52 * start the preprocessing, processing steps using the keycolumns
53 * populate current timestamp value for MeasTimestampRF
54