Skip to content

Commit e4bbc29

Browse files
committed
model trainer added with best model going to artifact folder
1 parent b3507cc commit e4bbc29

File tree

22 files changed

+43278
-43166
lines changed

22 files changed

+43278
-43166
lines changed

Artifacts/data_ingestion/ingested/test.csv

Lines changed: 4306 additions & 4306 deletions
Large diffs are not rendered by default.

Artifacts/data_ingestion/ingested/train.csv

Lines changed: 17253 additions & 17253 deletions
Large diffs are not rendered by default.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,93 @@
11
Abnormal_URL:
2-
drift_status: true
3-
p_value: 0.023227723962994554
2+
drift_status: false
3+
p_value: 0.9076793411970326
44
DNSRecord:
55
drift_status: false
6-
p_value: 0.9960739355626307
6+
p_value: 0.6736652494431914
77
Domain_registeration_length:
88
drift_status: false
9-
p_value: 0.36906397715885964
9+
p_value: 0.9999988894018609
1010
Favicon:
1111
drift_status: false
12-
p_value: 0.5336163885855529
12+
p_value: 0.4804466389691172
1313
Google_Index:
1414
drift_status: false
15-
p_value: 0.9998939831095225
15+
p_value: 1.0
1616
HTTPS_token:
1717
drift_status: false
18-
p_value: 0.2033940148462008
18+
p_value: 0.9518099343765413
1919
Iframe:
2020
drift_status: false
21-
p_value: 1.0
21+
p_value: 0.9999992399051418
2222
Links_in_tags:
2323
drift_status: false
24-
p_value: 0.6396427052930043
24+
p_value: 1.0
2525
Links_pointing_to_page:
2626
drift_status: false
27-
p_value: 0.9076793411970308
27+
p_value: 0.9039295322201338
2828
Page_Rank:
2929
drift_status: false
30-
p_value: 0.9999999999999999
30+
p_value: 0.9985585060006266
3131
Prefix_Suffix:
3232
drift_status: false
33-
p_value: 0.9998388206083407
33+
p_value: 1.0
3434
Redirect:
3535
drift_status: false
36-
p_value: 0.9997115090643619
36+
p_value: 0.8440980157021072
3737
Request_URL:
3838
drift_status: false
39-
p_value: 0.9999462839353719
39+
p_value: 0.9783976116108062
4040
Result:
4141
drift_status: false
42-
p_value: 1.0
42+
p_value: 0.999653693736063
4343
RightClick:
4444
drift_status: false
45-
p_value: 0.9999148748234266
45+
p_value: 1.0
4646
SFH:
4747
drift_status: false
48-
p_value: 0.9997115090643619
48+
p_value: 0.9591630531107908
4949
SSLfinal_State:
5050
drift_status: false
51-
p_value: 1.0
51+
p_value: 0.9999999979763055
5252
Shortining_Service:
5353
drift_status: false
54-
p_value: 0.7353423319035767
54+
p_value: 0.9657727423695276
5555
Statistical_report:
5656
drift_status: false
57-
p_value: 0.5281942333058369
57+
p_value: 0.7518037259936519
5858
Submitting_to_email:
5959
drift_status: false
60-
p_value: 0.999999999988434
60+
p_value: 0.23418306629314511
6161
URL_Length:
6262
drift_status: false
63-
p_value: 0.9999999999981217
63+
p_value: 0.9999462839353719
6464
URL_of_Anchor:
6565
drift_status: false
66-
p_value: 0.9999888959498077
66+
p_value: 0.49613886022851716
6767
age_of_domain:
6868
drift_status: false
69-
p_value: 1.0
69+
p_value: 0.999999999999748
7070
double_slash_redirecting:
7171
drift_status: false
72-
p_value: 0.3428866327563004
72+
p_value: 0.9999148748234266
7373
having_At_Symbol:
7474
drift_status: false
75-
p_value: 0.72425954076736
75+
p_value: 0.9999999999981217
7676
having_IP_Address:
7777
drift_status: false
78-
p_value: 0.5500052107185986
78+
p_value: 0.40588562138358375
7979
having_Sub_Domain:
8080
drift_status: false
81-
p_value: 0.8345602176970413
81+
p_value: 0.4752694234619035
8282
on_mouseover:
8383
drift_status: false
84-
p_value: 1.0
84+
p_value: 0.6396427052930043
8585
popUpWidnow:
8686
drift_status: false
87-
p_value: 0.6057110479991309
87+
p_value: 0.309947843451049
8888
port:
8989
drift_status: false
90-
p_value: 0.9960739355626309
90+
p_value: 0.7186902796320964
9191
web_traffic:
9292
drift_status: false
93-
p_value: 0.9317405428221537
93+
p_value: 0.9999999962612656

Artifacts/data_validation/validated/test.csv

Lines changed: 4306 additions & 4306 deletions
Large diffs are not rendered by default.

Artifacts/data_validation/validated/train.csv

Lines changed: 17253 additions & 17253 deletions
Large diffs are not rendered by default.
36.7 MB
Binary file not shown.

main.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from networksecurity.components.data_ingestion import DataIngestion
22
from networksecurity.components.data_validation import DataValidation
33
from networksecurity.components.data_transformation import DataTransformation
4+
from networksecurity.components.model_trainer import ModelTrainer
45

5-
from networksecurity.entity.config_entity import DataIngestionConfig, DataValidationConfig, DataTransformationConfig
6+
from networksecurity.entity.config_entity import DataIngestionConfig, DataValidationConfig, DataTransformationConfig, ModelTrainerConfig
67
from networksecurity.entity.config_entity import TrainingPipelineConfig
78

9+
10+
811
from networksecurity.exception.exception import NetworkSecurityException
912
from networksecurity.logging.logger import logging
1013

@@ -41,5 +44,13 @@
4144
print(data_transformation_artifact)
4245

4346

47+
logging.info("Model training started")
48+
model_trainer_config = ModelTrainerConfig(trainingpipelineconfig)
49+
model_trainer = ModelTrainer(model_trainer_config = model_trainer_config,
50+
data_transformation_artifact = data_transformation_artifact)
51+
model_trainer_artifact = model_trainer.initiate_model_trainer()
52+
logging.info("Model training artifact created \n")
53+
54+
4455
except Exception as e:
4556
raise NetworkSecurityException(e,sys)

0 commit comments

Comments
 (0)