- Hands-On Machine Learning with ML.NET
- Jarred Capellman
- 276字
- 2021-06-24 16:43:32
Exploring the project architecture
Building on the project architecture and code we created in Chapter 2, Setting Up the ML.NET Environment, the major change architecturally in this example is the mechanism for input. Chapter 2, Setting Up the ML.NET Environment, used a simple string to provide sentiment analysis via a command-line argument. In this application, there are several properties to pass into the model; therefore, for this application, we are now using a JSON file to contain our input data. With this addition, we are now including the popular Newtonsoft.Json NuGet package (version 12.0.2 is the latest at the time of this writing and what is used in the included sample). If you are building this project from scratch and do not remember how to add a NuGet reference, please refer back to Chapter 2, Setting Up the ML.NET Environment.
The following screenshot shows the Visual Studio Solution Explorer view of the project. The new addition to the solution is the ExtensionMethods class file, which we will review in the next section:
The sampledata.csv file contains 40 rows of random data; feel free to adjust the data to fit your own observations or to adjust the trained model. Here is a snippet of the data:
16,1,1,0,20,38,1,1,1
23,1,1,1,17,36,0,1,0
6,1,1,0,10,30,1,0,1
4,0,1,0,6,26,1,0,1
14,0,0,0,4,27,1,0,1
24,1,1,1,14,30,1,0,1
5,1,1,0,8,31,0,1,1
12,1,1,0,20,50,0,1,1
12,1,1,0,12,50,1,0,1
6,1,1,0,10,52,0,1,1
Each of these rows contains the value for the properties in the newly created EmploymentHistory class that we will review later on in this chapter.
- Boost.Asio C++ Network Programming(Second Edition)
- Go Web編程
- Advanced Machine Learning with Python
- Learning Cython Programming
- 企業(yè)級(jí)Java EE架構(gòu)設(shè)計(jì)精深實(shí)踐
- Android Studio Essentials
- Python從菜鳥到高手(第2版)
- BeagleBone Media Center
- AIRAndroid應(yīng)用開發(fā)實(shí)戰(zhàn)
- Visual Basic學(xué)習(xí)手冊(cè)
- Getting Started with LLVM Core Libraries
- RabbitMQ Essentials
- Spring+Spring MVC+MyBatis從零開始學(xué)
- C++編程兵書
- Node.js區(qū)塊鏈開發(fā)