blob: 2e5535079b2da8bb1d88211c1b9368b84acdafac [file] [log] [blame]
deepanshuk297dbd62020-11-03 13:09:19 +05301# ==================================================================================
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
17Usage of all the programs and files have been mentioned below for the reference.
18Need to update this file each time when there is any modifications in the following components.
19
20main.py:
21* Initiates xapp api and runs the entry() using xapp.run()
22* If RF model is not present in the path, run train() to train the model for the prediction.
23 Call predict function for every 1 second(for now as we are using simulated data).
24* Read the input csv file that has both normal and anomalous data.
25* Simulate diff UEIDs that participate in the anomaly by randomly selecting records from this scoring data set
26* Send the UEID and timestamp for the anomalous entries to the Traffic Steering (rmr with the message type as 30003)
27* Get the acknowledgement message from the traffic steering.
28
29ad_train.py - Read all the csv files in the current path and create trained model(RF)
30
31processing.py:
32It performs the following activities:
33* Columns that are not useful for the prediction will be dropped(UEID, Category, & Timestamp)
34* Convert integer and float type into numeric data type.
35* verify and drop the highly correlated parameters.
36* returns UEID, timestamp and category for the anamolous entries.
37
38ad_model.py:
39* 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).
40* Call Predict method to get the final data for the randomly selected UEID.
41
42tb_format.py:
43* start the preprocessing, processing steps using the keycolumns
44* populate current timestamp value for MeasTimestampRF
45