Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public class PointProcessModelConfiguration
/// </summary>
public double? SigmaRandomWalk { get; set; }

/// <summary>
/// The kernel limit of the model.
/// </summary>
public int? KernelLimit { get; set; }

/// <summary>
/// The scalar type of the model.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ClusterlessMarkEncoder : ModelComponent, IEncoder
private Tensor _markIntensities = empty(0);
private Tensor _channelIntensities = empty(0);
private Tensor _observationDensity = empty(0);
private Tensor[] _channelEstimates = [];
private readonly Tensor[] _channelEstimates = [];

private Tensor _spikeCounts = empty(0);
private Tensor _samples = empty(0);
Expand Down Expand Up @@ -98,6 +98,7 @@ public ClusterlessMarkEncoder(
_observationEstimation = new KernelDensity(
bandwidth: observationBandwidth,
dimensions: _stateSpace.Dimensions,
kernelLimit: kernelLimit,
device: device,
scalarType: scalarType
);
Expand All @@ -106,7 +107,8 @@ public ClusterlessMarkEncoder(
{
_markEstimation[i] = new KernelDensity(
bandwidth: bandwidth,
dimensions: jointDimensions,
dimensions: jointDimensions,
kernelLimit: kernelLimit,
device: device,
scalarType: scalarType
);
Expand Down
1 change: 1 addition & 0 deletions src/PointProcessDecoder.Core/Encoder/SortedSpikeEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private static IEstimation GetEstimationMethod(
EstimationMethod.KernelDensity => new KernelDensity(
bandwidth: bandwidth,
dimensions: dimensions,
kernelLimit: kernelLimit,
device: device,
scalarType: scalarType
),
Expand Down
2 changes: 2 additions & 0 deletions src/PointProcessDecoder.Core/PointProcessModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public PointProcessModel(
DistanceThreshold = distanceThreshold,
IgnoreNoSpikes = ignoreNoSpikes,
SigmaRandomWalk = sigmaRandomWalk,
KernelLimit = kernelLimit,
ScalarType = scalarType
};
}
Expand Down Expand Up @@ -272,6 +273,7 @@ public override void Save(string basePath)
distanceThreshold: configuration.DistanceThreshold,
ignoreNoSpikes: configuration.IgnoreNoSpikes,
sigmaRandomWalk: configuration.SigmaRandomWalk,
kernelLimit: configuration.KernelLimit,
device: device,
scalarType: configuration.ScalarType
);
Expand Down