AiDotNet 0.13.0
See the version list below for details.
dotnet add package AiDotNet --version 0.13.0
NuGet\Install-Package AiDotNet -Version 0.13.0
<PackageReference Include="AiDotNet" Version="0.13.0" />
<PackageVersion Include="AiDotNet" Version="0.13.0" />
<PackageReference Include="AiDotNet" />
paket add AiDotNet --version 0.13.0
#r "nuget: AiDotNet, 0.13.0"
#:package AiDotNet@0.13.0
#addin nuget:?package=AiDotNet&version=0.13.0
#tool nuget:?package=AiDotNet&version=0.13.0
AiDotNet
<div align="center">
Modern AI/ML Framework for .NET
Bringing the latest AI algorithms and breakthroughs directly to the .NET ecosystem
Getting Started • Documentation • Examples • Contributing
</div>
Overview
AiDotNet is a comprehensive machine learning and artificial intelligence library designed specifically for the .NET ecosystem. Our mission is to make cutting-edge AI algorithms accessible to .NET developers, whether you're a beginner taking your first steps in machine learning or an expert seeking full customization capabilities.
Why AiDotNet?
- Easy to Learn: Simplified APIs that reduce the steep learning curve typically associated with AI/ML
- Fully Customizable: Expert users have complete control over algorithm parameters and implementation details
- Modern Architecture: Built with the latest .NET features and best practices
- Production Ready: Comprehensive testing, CI/CD pipelines, and quality gates ensure reliability
- Actively Developed: Regular updates bringing the latest AI breakthroughs to .NET
Key Features
🧠 Neural Networks
- Flexible neural network architectures for classification and regression
- Support for custom layers and activation functions
- Advanced training with backpropagation and various optimizers
📈 Regression Models
- Linear and multiple regression
- Advanced regression techniques with feature engineering
- Real-world examples including housing price prediction
⏱️ Time Series Analysis
- Forecasting models for sequential data
- Support for stock prices, energy demand, and other time-dependent predictions
- Seasonal decomposition and trend analysis
🔄 Transfer Learning
- Domain adaptation algorithms
- Feature mapping between different data domains
- Pre-trained model support
⚡ Advanced Features
- LoRA (Low-Rank Adaptation): Efficient fine-tuning of large models
- Automatic Differentiation: Built-in autodiff for gradient computation
- Distributed Training: Scale your training across multiple machines
- Mixed Precision Training: Optimize performance with FP16/FP32 support
- Language Models: Integration with modern language model architectures
- Agents: AI agent frameworks for autonomous decision-making
🛠️ Supporting Components
- Multiple activation functions (ReLU, Sigmoid, Tanh, and more)
- Various optimization algorithms (Adam, SGD, RMSprop)
- Data preprocessing and normalization
- Outlier detection and removal
- Model evaluation metrics
- Caching for improved performance
Getting Started
Installation
Install AiDotNet via NuGet Package Manager:
dotnet add package AiDotNet
Or via the NuGet Package Manager Console:
Install-Package AiDotNet
Requirements
- .NET 8.0 or later
- .NET Framework 4.6.2 or later
Quick Start
Here's a simple example to get you started with neural network classification:
using AiDotNet.Enums;
using AiDotNet.LinearAlgebra;
using AiDotNet.NeuralNetworks;
// Create training data (XOR problem - classic neural network example)
var xorData = new double[,]
{
{ 0, 0 }, // Input: [0, 0]
{ 0, 1 }, // Input: [0, 1]
{ 1, 0 }, // Input: [1, 0]
{ 1, 1 } // Input: [1, 1]
};
var xorLabels = new double[,]
{
{ 0 }, // Expected output: 0
{ 1 }, // Expected output: 1
{ 1 }, // Expected output: 1
{ 0 } // Expected output: 0
};
// Convert to tensors (required format for neural network)
var features = new Tensor<double>(new int[] { 4, 2 }); // 4 samples, 2 features
var labels = new Tensor<double>(new int[] { 4, 1 }); // 4 samples, 1 output
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 2; j++)
features[new int[] { i, j }] = xorData[i, j];
labels[new int[] { i, 0 }] = xorLabels[i, 0];
}
// Create neural network architecture
var architecture = new NeuralNetworkArchitecture<double>(
inputFeatures: 2,
numClasses: 1,
complexity: NetworkComplexity.Medium
);
// Initialize and train the network
var neuralNetwork = new NeuralNetwork<double>(architecture);
for (int epoch = 0; epoch < 1000; epoch++)
{
neuralNetwork.Train(features, labels);
if (epoch % 200 == 0)
{
double loss = neuralNetwork.GetLastLoss();
Console.WriteLine($"Epoch {epoch}: Loss = {loss:F4}");
}
}
// Make predictions
var predictions = neuralNetwork.Predict(features);
Console.WriteLine($"
Prediction for [1, 0]: {predictions[new int[] { 2, 0 }]:F2}");
Console.WriteLine($"Prediction for [1, 1]: {predictions[new int[] { 3, 0 }]:F2}");
Examples
AiDotNet comes with comprehensive examples demonstrating various use cases:
Basic Examples
- Neural Network Example - Classification (Iris dataset) and regression (housing prices)
- Regression Example - Linear regression for house price prediction
- Time Series Example - Stock price forecasting
Advanced Examples
- Enhanced Neural Network - Customer churn prediction with preprocessing
- Enhanced Regression - Real estate analysis with feature engineering
- Enhanced Time Series - Energy demand forecasting with multiple models
Specialized Examples
- Mixture of Experts - Advanced ensemble learning techniques
To run the examples:
- Clone the repository
- Open
AiDotNet.slnin Visual Studio or your preferred IDE - Set the
AiDotNetTestConsoleproject as the startup project - Run the project and choose an example from the menu
Documentation
- API Documentation - Comprehensive API reference
- Advanced Reasoning Guide - Deep dive into advanced ML concepts
- Distributed Training - Scale your training workloads
- Autodiff Integration - Understanding automatic differentiation
- Mixed Precision Architecture - Optimize performance with mixed precision
Platform Support
| Platform | Versions |
|---|---|
| .NET | 8.0+ |
| .NET Framework | 4.6.2+ |
| Operating Systems | Windows, Linux, macOS |
Contributing
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Please read our Contributing Guide to learn about our development process and how to submit pull requests.
Code of Conduct
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
Community & Support
- Issues: Found a bug or have a feature request? Open an issue
- Discussions: Have questions or want to discuss ideas? Start a discussion
- Security: Found a security vulnerability? Please review our Security Policy
Roadmap
AiDotNet is actively developed with regular updates. Current focus areas include:
- Expanding neural network architectures (CNNs, RNNs, Transformers)
- Additional optimization algorithms
- Enhanced GPU acceleration support
- More pre-built model templates
- Improved documentation and tutorials
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Acknowledgments
AiDotNet is developed and maintained by Ooples Finance with contributions from the community. We're grateful to all our contributors who help make AI/ML more accessible in the .NET ecosystem.
<div align="center">
Made with ❤️ for the .NET Community
⭐ Star us on GitHub • 📦 View on NuGet
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.1
- AiDotNet.Tensors (>= 0.13.0)
- Azure.Search.Documents (>= 11.7.0)
- Elastic.Clients.Elasticsearch (>= 9.2.2)
- Google.Protobuf (>= 3.33.2)
- ILGPU (>= 1.5.3)
- ILGPU.Algorithms (>= 1.5.3)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Data.Sqlite (>= 8.0.22)
- Microsoft.ML.OnnxRuntime (>= 1.23.2)
- Newtonsoft.Json (>= 13.0.4)
- Pinecone.Client (>= 4.0.2)
- StackExchange.Redis (>= 2.10.1)
- System.Net.Http (>= 4.3.4)
- System.Numerics.Tensors (>= 10.0.1)
- System.ValueTuple (>= 4.6.1)
- TreeSitter.DotNet (>= 1.2.0)
-
net8.0
- AiDotNet.Tensors (>= 0.13.0)
- Azure.Search.Documents (>= 11.7.0)
- Elastic.Clients.Elasticsearch (>= 9.2.2)
- Google.Protobuf (>= 3.33.2)
- ILGPU (>= 1.5.3)
- ILGPU.Algorithms (>= 1.5.3)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Data.Sqlite (>= 8.0.22)
- Microsoft.ML.OnnxRuntime (>= 1.23.2)
- Newtonsoft.Json (>= 13.0.4)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 9.0.4)
- Pinecone.Client (>= 4.0.2)
- StackExchange.Redis (>= 2.10.1)
- System.Numerics.Tensors (>= 10.0.1)
- System.ValueTuple (>= 4.6.1)
- TreeSitter.DotNet (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.0 | 4 | 12/22/2025 |
| 0.19.0 | 26 | 12/22/2025 |
| 0.18.0 | 25 | 12/22/2025 |
| 0.17.0 | 35 | 12/22/2025 |
| 0.16.0 | 34 | 12/22/2025 |
| 0.15.0 | 32 | 12/21/2025 |
| 0.14.0 | 36 | 12/21/2025 |
| 0.13.0 | 31 | 12/21/2025 |
| 0.12.0 | 68 | 12/20/2025 |
| 0.11.0 | 200 | 12/19/2025 |
| 0.10.0 | 212 | 12/17/2025 |
| 0.9.0 | 216 | 12/17/2025 |
| 0.8.0 | 195 | 12/15/2025 |
| 0.7.0 | 166 | 12/14/2025 |
| 0.6.0 | 160 | 12/14/2025 |
| 0.5.0 | 167 | 12/14/2025 |
| 0.4.0 | 104 | 12/14/2025 |
| 0.3.0 | 371 | 12/11/2025 |
| 0.2.0 | 107 | 11/15/2025 |
| 0.1.0 | 241 | 11/12/2025 |
| 0.0.5-preview | 317 | 10/16/2023 |
| 0.0.3-preview | 133 | 9/24/2023 |
| 0.0.2-preview | 148 | 9/24/2023 |
| 0.0.1-preview | 119 | 9/23/2023 |