Class PointCloudDatasetLoaderBase<T>
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
-
PointCloudDatasetLoaderBase<T>
- Implements
-
IDataLoader<T>
- Derived
- Inherited Members
- Extension Methods
Properties
FeatureCount
Gets the number of features per sample.
public override int FeatureCount { get; }
Property Value
FeatureDimension
Number of features per point.
public int FeatureDimension { get; }
Property Value
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
PointsPerSample
Number of points per sample.
public int PointsPerSample { get; }
Property Value
TotalCount
Gets the total number of samples in the dataset.
public override int TotalCount { get; }
Property Value
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
pointCountintpointsPerSampleintsamplingStrategyPointSamplingStrategypaddingStrategyPointPaddingStrategyrandomRandom
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
indicesint[]The indices of samples to extract.
Returns
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
featuresTensor<T>labelsTensor<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
trainRatiodoubleFraction of data for training (0.0 to 1.0).
validationRatiodoubleFraction of data for validation (0.0 to 1.0).
seedint?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).