O'Reilly logo

Hands-On Machine Learning with C# by Matt R. Cole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Should I take the job?

You have just been offered a new job, and you need to decide whether or not you are going to take it. There are a few things that are important for you to consider, so we will use those as input variables, or features, for our decision tree. Here is what is important to you: pay, benefits, company culture, and of course, Can I work from home?

Rather than load data from disk storage, we are going to create an in-memory database and add our features this way. We will create DataTable and create Columns as features as shown here:

DataTable data = new DataTable("Should I Go To Work For Company  X");data.Columns.Add("Scenario");data.Columns.Add("Pay");data.Columns.Add("Benefits");data.Columns.Add("Culture");data.Columns.Add("WorkFromHome"); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required