Here are the examples of the csharp api NUnit.Framework.Assert.Zero(double) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
19
Source : ZeroOneLossTest.cs
with MIT License
from PacktPublishing
with MIT License
from PacktPublishing
[Test]
public void TestThatZeroOneLossEncodesDoubleMatrices()
{
double[][] expected =
{
new [] {1d, 0d, 1d, 0d},
new [] {0d, 1d, 0d, 1d}
};
int[] actual = {0, 1, 0, 1};
double loss = new ZeroOneLoss(expected).Loss(actual);
replacedert.Zero(loss);
}
19
Source : ZeroOneLossTest.cs
with MIT License
from PacktPublishing
with MIT License
from PacktPublishing
[Test]
public void TestThatLossIsZeroForCorrectClreplacedification()
{
int[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
double loss = new ZeroOneLoss(expected).Loss(expected);
replacedert.Zero(loss);
}
19
Source : ZeroOneLossTest.cs
with MIT License
from PacktPublishing
with MIT License
from PacktPublishing
[Test]
public void TestThatZeroOneLossEncodesDoubles()
{
double[] expected = {0, 1.01, 0.99, 0};
int[] actual = {0, 1, 1, 0};
double loss = new ZeroOneLoss(expected).Loss(actual);
replacedert.Zero(loss);
}
19
Source : ZeroOneLossTest.cs
with MIT License
from PacktPublishing
with MIT License
from PacktPublishing
[Test]
public void TestThatZeroOneLossNormalizesInputForBinaryClreplacedification()
{
int[] expected = {-1, -1, 1, -1};
int[] actual = {0, 0, 1, 0};
double loss = new ZeroOneLoss(expected).Loss(actual);
replacedert.Zero(loss);
}