Cortex.ML 1.1.0

dotnet add package Cortex.ML --version 1.1.0
                    
NuGet\Install-Package Cortex.ML -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cortex.ML" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cortex.ML" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cortex.ML" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cortex.ML --version 1.1.0
                    
#r "nuget: Cortex.ML, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cortex.ML@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cortex.ML&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cortex.ML&version=1.1.0
                    
Install as a Cake Tool

Cortex.ML

Classical machine learning toolkit for Cortex with 25+ models, transformers, metrics, and BLAS acceleration.

Part of the Cortex data science ecosystem for .NET.

Requires .NET 10+ and the Cortex core package.

Features

  • 25+ ML models — linear/logistic regression, decision trees, SVM, k-NN, random forest, gradient boosted trees, KMeans, PCA, t-SNE, and more
  • Feature engineering — encoders, scalers, imputers, and polynomial features
  • Pipeline API — compose preprocessing and model steps into reproducible workflows
  • Evaluation metrics — accuracy, precision, recall, F1, ROC-AUC, RMSE, R², and more
  • BLAS/LAPACK-accelerated tensor operations for fast training
  • Tensor API — convert DataFrames to typed tensors for numeric computation

Installation

dotnet add package Cortex.ML

Quick Start

using Cortex;
using Cortex.ML;

var df = DataFrame.ReadCsv("iris.csv");
var (train, test) = df.TrainTestSplit(testFraction: 0.2);

var model = new RandomForestClassifier(nTrees: 100);
model.Fit(train.Drop("species"), train["species"]);

var predictions = model.Predict(test.Drop("species"));
Console.WriteLine($"Accuracy: {Metrics.Accuracy(test["species"], predictions):P2}");

Regression

using Cortex.ML.Models;
using Cortex.ML.Tensors;

var X = df.ToTensor<double>("Feature1", "Feature2", "Feature3");
var y = df.ToTensor<double>("Target");

var model = new RandomForestRegressor(nEstimators: 100, maxDepth: 10);
model.Fit(X, y);

var predictions = model.Predict(X_test);
var r2 = model.Score(X_test, y_test);

Clustering and Dimensionality Reduction

var kmeans = new KMeans(nClusters: 5);
var labels = kmeans.FitPredict(X);

var pca = new PCA(nComponents: 2);
var reduced = pca.FitTransform(X);
Package Description
Cortex Core DataFrame (required)
Cortex.ML.Torch GPU training with TorchSharp neural networks
Cortex.ML.Onnx ONNX Runtime model inference
Cortex.ML.MLNet ML.NET IDataView bridge
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (9)

Showing the top 5 NuGet packages that depend on Cortex.ML:

Package Downloads
Cortex.ML.Onnx

ONNX Runtime inference bridge for Cortex DataFrames

Cortex.Vision

Image and video processing for Cortex: transforms, augmentation pipelines, data loaders, and model integration

Cortex.GPU

GPU-accelerated operations for Cortex using ILGPU. Supports CUDA, OpenCL, and CPU fallback.

Cortex.TimeSeries

Time series forecasting and analysis for Cortex: ARIMA, exponential smoothing, seasonal decomposition, stationarity tests

Cortex.Viz

Interactive D3.js visualizations for Cortex DataFrames

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 127 3/30/2026
1.0.0 124 3/27/2026