- Hands-On Machine Learning with ML.NET
- Jarred Capellman
- 207字
- 2021-06-24 16:43:35
Running the application
With the addition of feature extraction in our pipeline, we first need to perform feature extraction on the files:
- Assuming the folder of files called temp_data exists, execute the following command:
PS chapter03-logistic-regression\bin\Debug\netcoreapp3.0> .\chapter03-logistic-regression.exe extract temp_data
Extracted 8 to sampledata.csv
The output shows the count of extracted files and the output sample file.
- To train the model using either the included sampledata.csv or one you trained yourself, execute the following command:
PS chapter03-logistic-regression\bin\Debug\netcoreapp3.0> .\chapter03-logistic-regression.exe train ..\..\..\Data\sampledata.csv
The chapter3.mdl model file should exist in the folder executed in once complete.
- To run the newly trained model against an existing file such as the compiled chapter3 executable, run the following command:
PS chapter03-logistic-regression\bin\Debug\netcoreapp3.0> .\chapter03-logistic-regression.exe predict .\chapter03-logistic-regression.exe
Based on the file (.\chapter03-logistic-regression.exe) the file is classified as benign at a confidence level of 8%
If you are looking for sample files, the c:\Windows and c:\Windows\System32 folders contain numerous Windows Executables and DLLs. In addition, if you are looking to create malicious-looking files that are actually clean, you can create files on the fly on http://cwg.io in various file formats. This is a helpful tool in the cyber-security space where testing new functionality on a development machine is much safer than detonating real zero-day threats on!
推薦閱讀
- Instant Node Package Manager
- DevOps with Kubernetes
- 編寫整潔的Python代碼(第2版)
- Production Ready OpenStack:Recipes for Successful Environments
- Mastering Xamarin.Forms(Second Edition)
- 動手學數據結構與算法
- Lift Application Development Cookbook
- Webpack實戰:入門、進階與調優(第2版)
- IoT Projects with Bluetooth Low Energy
- Vue.js光速入門及企業項目開發實戰
- Java程序設計教程
- C++17 By Example
- Building a Media Center with Raspberry Pi
- Raspberry Pi Robotic Projects
- 數據庫技術及應用教程上機指導與習題(第2版)