public void ExtendTest2()
{
int[][] data =
{
new int[] { 0, 2, 4 },
new int[] { 1, 1, 2 },
};
int labelColumn = 0;
int positiveColumn = 1;
int negativeColumn = 2;
int[][] expected =
{
// For label 0
new int[] { 0, 1 }, // Two positive cases
new int[] { 0, 1 },
new int[] { 0, 0 }, // Four negative cases
new int[] { 0, 0 },
new int[] { 0, 0 },
new int[] { 0, 0 },
// For label 1
new int[] { 1, 1 }, // One positive case
new int[] { 1, 0 }, // Three negative cases
new int[] { 1, 0 },
};
int[][] actual = Accord.Statistics.Tools.Expand(data, labelColumn, positiveColumn, negativeColumn);
Assert.IsTrue(expected.IsEqual(actual));
}