ArtificialInteligenceLibrary 1.0.0

A library containing a perceptron implementation and support for working with files

Install-Package ArtificialInteligenceLibrary -Version 1.0.0
dotnet add package ArtificialInteligenceLibrary --version 1.0.0
<PackageReference Include="ArtificialInteligenceLibrary" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArtificialInteligenceLibrary --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ArtificialInteligenceLibrary, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ArtificialInteligenceLibrary as a Cake Addin
#addin nuget:?package=ArtificialInteligenceLibrary&version=1.0.0

// Install ArtificialInteligenceLibrary as a Cake Tool
#tool nuget:?package=ArtificialInteligenceLibrary&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

using ArtificialInteligence;
using NUnit.Framework;
using System.IO;

namespace PerceptronTests
{
public class Tests
{
Perceptron p;

    [Test]
    public void ItShouldWorkWithFiles()
    {
        var helper = new CSVHelper();
        var testData = helper.ConvertToData(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\TrainData.csv");
        var predictData = helper.ConvertToData(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\PredictionData.csv");
        p = new Perceptron(4);
        p.TrainDataSetForEpochs(1000, testData);
        var results = p.Predictions(predictData);
        System.Console.WriteLine($"Prediction should be high: {results[0]}");
        System.Console.WriteLine($"Prediction should be low: {results[1]}");
        Assert.That(results[0] > 0.9, $"Prediction should be > 0.9, currently: {results[0]}");
        Assert.That(results[1] < 0.1, $"Prediction should be < 0.1, currently: {results[1]}");
        helper.AppendResults(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\PredictionData.csv", results);
        
    }

}

}

! The file with the data will contain values separated by coma. The last value will be treated as the expected output. The others will be read as input values.

using ArtificialInteligence;
using NUnit.Framework;
using System.IO;

namespace PerceptronTests
{
public class Tests
{
Perceptron p;

    [Test]
    public void ItShouldWorkWithFiles()
    {
        var helper = new CSVHelper();
        var testData = helper.ConvertToData(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\TrainData.csv");
        var predictData = helper.ConvertToData(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\PredictionData.csv");
        p = new Perceptron(4);
        p.TrainDataSetForEpochs(1000, testData);
        var results = p.Predictions(predictData);
        System.Console.WriteLine($"Prediction should be high: {results[0]}");
        System.Console.WriteLine($"Prediction should be low: {results[1]}");
        Assert.That(results[0] > 0.9, $"Prediction should be > 0.9, currently: {results[0]}");
        Assert.That(results[1] < 0.1, $"Prediction should be < 0.1, currently: {results[1]}");
        helper.AppendResults(@"C:\Users\xxxxx\source\repos\ArtificialInteligence\PerceptronTests\PredictionData.csv", results);
        
    }

}

}

! The file with the data will contain values separated by coma. The last value will be treated as the expected output. The others will be read as input values.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 61 2/13/2021