'I have problem for computing the entropy of parrent
Imagine we have a data set containing 3 attributes (a,b,c) and we have two label of class(0,1) . We want to make a decision tree using information gain. Imagine that we found infogain a>b>c so the a would be the root of the tree. At first for computing the entropy of parent , I know that we count the number of 0 and 1 in class label column but after we found that a is root and in the next term a should be parent, how should we compute the entropy of a as a parent?
Solution 1:[1]
try this,it was tested using VS and Postman. It doesn't need any custom converter
using Newtonsoft.Json.Linq;
....
public string GetTarget([FromBody] JObject settingsObj)
{
Settings settings;
if (settingsObj["settings"] != null) settings = settingsObj["settings"].ToObject<Settings>();
else settings = settingsObj.ToObject<Settings>();
......
}
public class Settings
{
public int Target { get; set; }
public int UserId { get; set; }
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
