Python program LAB

User Generated

Nmvm1416

Programming

albaha university

Description

I am working on a python program and i need an explanation and answer to help me learn, you will find 2 attachments,please see them . I need to explane and opinion in every lab and output.

Unformatted Attachment Preview

INTRO TO CYBERSECURITY PHISHING DETECTION LAB 1: WRITING A CLASSIFIER FOR PHISHING DATASET Lab Description: This lab is to write the python script as well as use WEKA to implement a binary classifier to estimate whether a website is a phishing website. The dataset contains 102816 web hits and 30 features were recorded for each of the hit. Also, a class value has been given for each of the record. Example of phishing dataset: Features Description: Page | 1 This document is licensed with a Creative Commons Attribution 4.0 International License ©2017 Catalyzing Computing and Cybersecurity in Community Colleges (C5). You are required to implement it in three ways: Page | 2 This document is licensed with a Creative Commons Attribution 4.0 International License ©2017 Catalyzing Computing and Cybersecurity in Community Colleges (C5). • • • Using the machine learning software WEKA. (https://waikato.github.io/weka-wiki/downloading_weka/) Writing a python script with the use of the package sklearn Writing a python script with the use of the package tensorflow and deep learning techniques. Lab Environment: The student should have access to no matter a machine with Linux system or Windows system, but the environment for python is required as well as some packages such as numpy, tensorflow, pandas, matplotlib, and sklearn. How to setup Anaconda environment and install packages: 1. Install Anaconda: http://docs.anaconda.com/anaconda/install.html 2. Create myidsenv environment (conda create --name myidsenv) 3. Activate myidsenv environment (conda activate myidsenv) 4. Install SkLearn package (pip install sklearn) 5. Similarly install “pandas” Lab Files that are Needed: For this lab you will need two files (phishing_l.csv and phishing.csv) the last column is the class value, others are the features. LAB EXERCISE 1 • Import data into WEKA (explorer), the files of type should be specified (csv). Page | 3 This document is licensed with a Creative Commons Attribution 4.0 International License ©2017 Catalyzing Computing and Cybersecurity in Community Colleges (C5). • Choose a proper classifier, such as RandomForest • • Specify the test option and the column of class Try different classifiers (at least 5) of different types (e.g., trees, functions, bayes, etc.) and log their performance (time to build model, performance metrics, confusion matrix). LAB EXERCISE 2 • • In this exercise, you need to implement several classifiers with the use of sklearn. You are provided with the code which you need to modify and run (“phishing_sklearn.py”). Page | 4 This document is licensed with a Creative Commons Attribution 4.0 International License ©2017 Catalyzing Computing and Cybersecurity in Community Colleges (C5). • Change the ratio between train/test datasets and analyze how it influences the performance of the phishing detectors. LAB EXERCISE 3 • • • • • • • • Use the same data you use in the exercise 1 and 2. To install tensorflow – “pip install tensorflow --user" Similarly install “matplotlib” In this exercise, you will implement an artificial neural network classifier based on Tensorflow The code is provided “phishing_tf.py” Define the learning rate, number of epochs, and the batch size for the artificial neural network Please print the statistics metrics such as accuracy, recall, precision and f1 score. Try various NN training parameters such as number of epochs, learning rate, and batch size. Document your observations. WHAT TO SUBMIT You should submit a lab report file which include the steps you preprocessed data, the necessary code snippet of your classifier and architecture. Also, the screenshot for both your code snippet and the result are needed. Analyze your results: differences in performance and you thoughts on why they are different, which phishing detector is better and why (remember there may be many “correct” answers that is why it is important that you elaborate your thoughts). You can call your file "Lab1_phishing_yourname.pdf". Page | 5 This document is licensed with a Creative Commons Attribution 4.0 International License ©2017 Catalyzing Computing and Cybersecurity in Community Colleges (C5).
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer


Anonymous
Awesome! Made my life easier.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags