官术网_书友最值得收藏!

Exploring the project architecture

Building on the project architecture and code we created in the previous example, the major change architecturally in this example is feature extraction. With this example, we will add in the FeatureExtractor class in addition to creating new input and prediction classes. The reason for this is going back to the idea of keeping things separate and well defined as discussed in Chapter 2Setting Up the ML.NET Environment. For this example application and future applications you may write, they, more than likely, will have input files to convert into rows of data. By having a separate class handle this part of the pipeline, you can encapsulate this functionality cleanly.

The following screenshot shows the Visual Studio Solution Explorer view of the project. The new addition to the solution is the FeatureExtractor class file that we will review in the next section:

The sampledata.csv file contains eight rows of random data. Feel free to adjust the data to fit your own observations or adjust the trained model. Here is the included sample data:

False !This program cannot be run in DOS mode.L$ SUVWH\$ UVWAVAWH\$ VWAVHWATAUAVAWHA_AA]A\_l$ VWAVHt
False !This program cannot be run in DOS mode.L$ SUVWH\$ VWAVHUVWAVAWHUVWATAUAVAWHA_AA]A\_]UVWAVAWHU
False !This program cannot be run in DOS mode.$7ckw7ckw7ckw>jv$ckw7cjwiv6ckwRich7ckw9A98u6A9xx ATAVA
False !This program cannot be run in DOS mode.EventSetInformationmshelp URL calledLaunchFwLink"mshelp
True !This program cannot be run in DOS mode.Fm;Ld &~_New_ptrt(M4_Alloc_max"uJIif94H3"j?TjV*?invalid
True <</Length 17268/Type/EmbeddedFile/Filter/FlateDecode/Params<</ModDate(D:20191003012641+00'00'/Size
True !This program cannot be run in DOS mode._New_ptr7(_MaskQAlloc_maxtEqx?$xjinvalid argumC:\Program F
True __gmon_startN_easy_cKcxa_amxBZNSt8ios_bEe4IeD1Evxxe6naDtqv_Z<4endlIcgLSaQ6appw3d_ResumeCXXABI_1.3%d

Each of these rows contains two columns worth of data. The first is the classification, with true being malicious and false being benign. These properties are mapped in the newly created FileInput class that we will review later on in this chapter.

主站蜘蛛池模板: 开远市| 长宁区| 诏安县| 广河县| 宁河县| 阿巴嘎旗| 乌恰县| 中超| 迁安市| 大悟县| 库车县| 西昌市| 淮滨县| 四川省| 乃东县| 吴旗县| 玛纳斯县| 凤阳县| 即墨市| 宁城县| 昭平县| 沈阳市| 社会| 涪陵区| 灌南县| 图木舒克市| 堆龙德庆县| 沁阳市| 聊城市| 乳源| 和龙市| 启东市| 奉贤区| 黄龙县| 青冈县| 耿马| 淮安市| 水富县| 佳木斯市| 富锦市| 思茅市|