- Machine Learning for Cybersecurity Cookbook
- Emmanuel Tsukerman
- 173字
- 2021-06-24 12:29:06
How it works...
Leveraging the dataset we built up in the Scraping GitHub for files of a specific type recipe, we place files in different directories, based on their file type, and then specify the paths in preparation for building our classifier (step 1). The code for this recipe assumes that the "JavascriptSamples" directory and others contain the samples, and have no subdirectories. We read in all files into a corpus, and record their labels (step 2). We train-test split the data and prepare a pipeline that will perform basic NLP on the files, followed by a random forest classifier (step 3). The choice of classifier here is meant for illustrative purposes, rather than to imply a best choice of classifier for this type of data. Finally, we perform the basic, but important, steps in the process of creating a machine learning classifier, consisting of fitting the pipeline to the training data and then assessing its performance on the testing set by measuring its accuracy and confusion matrix (step 4).
- 面向STEM的mBlock智能機器人創(chuàng)新課程
- Seven NoSQL Databases in a Week
- 軟件架構(gòu)設(shè)計
- Effective DevOps with AWS
- MicroPython Projects
- 精通Excel VBA
- 基于32位ColdFire構(gòu)建嵌入式系統(tǒng)
- 大數(shù)據(jù)驅(qū)動的設(shè)備健康預(yù)測及維護決策優(yōu)化
- 氣動系統(tǒng)裝調(diào)與PLC控制
- 電腦日常使用與維護322問
- 從零開始學(xué)Java Web開發(fā)
- Mastering Predictive Analytics with scikit:learn and TensorFlow
- Linux Shell Scripting Cookbook(Third Edition)
- 大數(shù)據(jù)素質(zhì)讀本
- 大型機系統(tǒng)應(yīng)用基礎(chǔ)