Cortex.ML
1.1.0
dotnet add package Cortex.ML --version 1.1.0
NuGet\Install-Package Cortex.ML -Version 1.1.0
<PackageReference Include="Cortex.ML" Version="1.1.0" />
<PackageVersion Include="Cortex.ML" Version="1.1.0" />
<PackageReference Include="Cortex.ML" />
paket add Cortex.ML --version 1.1.0
#r "nuget: Cortex.ML, 1.1.0"
#:package Cortex.ML@1.1.0
#addin nuget:?package=Cortex.ML&version=1.1.0
#tool nuget:?package=Cortex.ML&version=1.1.0
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
Cortexcore 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);
Related Packages
| 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 |
Links
| Product | Versions 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. |
-
net10.0
- Cortex (>= 1.1.0)
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.