- 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!
推薦閱讀
- 數據科學實戰手冊(R+Python)
- 案例式C語言程序設計
- Java入門很輕松(微課超值版)
- INSTANT CakePHP Starter
- Android玩家必備
- HTML5 APP開發從入門到精通(微課精編版)
- Python語言實用教程
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- ServiceNow:Building Powerful Workflows
- Penetration Testing with the Bash shell
- Learning Kotlin by building Android Applications
- Mastering Leap Motion
- SQL Server on Linux
- PostgreSQL 12 High Availability Cookbook
- Cinder:Begin Creative Coding