Seddryck / NBi

NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile your test suite. Just create an Xml file and let the framework interpret it and play your tests. The framework is designed as an add-on of NUnit but with the possibility to port it easily to other testing frameworks.
http://www.nbi.io
Apache License 2.0
106 stars 37 forks source link

One-hot encoding as a new alteration #676

Open Seddryck opened 2 years ago

Seddryck commented 2 years ago

This alteration is taking the values from a column and is creating a new column for each distinct value found in this column. The value of the newly created columns are set to 0 except for the column matching with the initial column (which is removed). The name of the newly created column is based on the initial name of the column followed by an underscore and the name of the value.

Name Country
John Doe US
Jean Dupont France
Jacques Martin France
Bill Smith US
Mario Rossi Italy
Ashok Kumar India

is transfromed into

Name Country_US Country_France Country_Italy Country_India
John Doe 1 0 0 0
Jean Dupont 0 1 0 0
Jacques Martin 0 1 0 0
Bill Smith 1 0 0 0
Mario Rossi 0 0 1 0
Ashok Kumar 0 0 0 1