- 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!
推薦閱讀
- Python程序設計教程(第2版)
- Mastering ServiceStack
- PHP程序設計(慕課版)
- Spring Boot+Spring Cloud+Vue+Element項目實戰:手把手教你開發權限管理系統
- C語言程序設計
- Instant QlikView 11 Application Development
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- Learning Unreal Engine Android Game Development
- 新印象:解構UI界面設計
- C編程技巧:117個問題解決方案示例
- Visual C++開發寶典
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- JavaScript語法簡明手冊
- Implementing Splunk(Second Edition)
- Visual Basic 開發從入門到精通