Table of Contents

Class PointCloudDatasetLoaderBase<T>

Namespace
AiDotNet.Data.Geometry
Assembly
AiDotNet.dll

Base class for point cloud dataset loaders that expose tensor inputs and outputs.

public abstract class PointCloudDatasetLoaderBase<T> : InputOutputDataLoaderBase<T, Tensor<T>, Tensor<T>>, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>, IDataLoader<T>, IResettable, ICountable, IBatchIterable<(Tensor<T> Features, Tensor<T> Labels)>, IShuffleable

Type Parameters

T
Inheritance
InputOutputDataLoaderBase<T, Tensor<T>, Tensor<T>>
PointCloudDatasetLoaderBase<T>
Implements
IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>
IBatchIterable<(Tensor<T> Features, Tensor<T> Labels)>
Derived
Inherited Members
Extension Methods

Properties

FeatureCount

Gets the number of features per sample.

public override int FeatureCount { get; }

Property Value

int

FeatureDimension

Number of features per point.

public int FeatureDimension { get; }

Property Value

int

OutputDimension

Gets the number of output dimensions (1 for regression/binary classification, N for multi-class with N classes).

public override int OutputDimension { get; }

Property Value

int

PointsPerSample

Number of points per sample.

public int PointsPerSample { get; }

Property Value

int

TotalCount

Gets the total number of samples in the dataset.

public override int TotalCount { get; }

Property Value

int

Methods

BuildSampleIndices(int, int, PointSamplingStrategy, PointPaddingStrategy, Random)

Builds sample indices for point selection with sampling and padding strategies.

protected static int[] BuildSampleIndices(int pointCount, int pointsPerSample, PointSamplingStrategy samplingStrategy, PointPaddingStrategy paddingStrategy, Random random)

Parameters

pointCount int
pointsPerSample int
samplingStrategy PointSamplingStrategy
paddingStrategy PointPaddingStrategy
random Random

Returns

int[]

ExtractBatch(int[])

Extracts a batch of features and labels at the specified indices.

protected override (Tensor<T> Features, Tensor<T> Labels) ExtractBatch(int[] indices)

Parameters

indices int[]

The indices of samples to extract.

Returns

(Tensor<T> grad1, Tensor<T> grad2)

A tuple containing the features and labels for the batch.

Remarks

Derived classes must implement this to extract data based on their specific TInput and TOutput types.

SetLoadedData(Tensor<T>, Tensor<T>)

Assigns loaded tensors and initializes indexing metadata.

protected void SetLoadedData(Tensor<T> features, Tensor<T> labels)

Parameters

features Tensor<T>
labels Tensor<T>

Split(double, double, int?)

Creates a train/validation/test split of the data.

public override (IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Train, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Validation, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Test) Split(double trainRatio = 0.7, double validationRatio = 0.15, int? seed = null)

Parameters

trainRatio double

Fraction of data for training (0.0 to 1.0).

validationRatio double

Fraction of data for validation (0.0 to 1.0).

seed int?

Optional random seed for reproducible splits.

Returns

(IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Train, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Validation, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>> Test)

A tuple containing three data loaders: (train, validation, test).

Remarks

The test ratio is implicitly 1 - trainRatio - validationRatio.

For Beginners: Splitting data is crucial for evaluating your model: - **Training set**: Data the model learns from - **Validation set**: Data used to tune hyperparameters and prevent overfitting - **Test set**: Data used only once at the end to get an unbiased performance estimate

Common splits are 60/20/20 or 70/15/15 (train/validation/test).