Skip to content

Commit

Permalink
Updated stationary transitions for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ncguilbeault committed Jul 10, 2024
1 parent e51d6e0 commit 5bf4142
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using System;

namespace Bonsai.ML.HiddenMarkovModels.Transitions
{
Expand All @@ -24,7 +22,7 @@ public class StationaryTransitions : TransitionsModel
[JsonProperty]
public override object[] Params
{
get =>[ LogPs ];
get => [LogPs];
set
{
LogPs = (double[,])value[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ public class StationaryTransitionsModel
/// </summary>
[XmlIgnore]
[Description("The log Ps of the transitions.")]
public double[,] LogPs { get; private set; } = null;
public double[,] LogPs { get; set; } = null;

/// <summary>
/// Returns an observable sequence of <see cref="StationaryTransitions"/> objects.
/// </summary>
public IObservable<StationaryTransitions> Process()
{
return Observable.Return(
new StationaryTransitions {
Params = [ LogPs ]
new StationaryTransitions
{
Params = [LogPs]
});
}

Expand All @@ -47,7 +48,7 @@ public IObservable<StationaryTransitions> Process(IObservable<PyObject> source)

return new StationaryTransitions
{
Params = [ logPsPyObj ]
Params = [logPsPyObj]
};
});
}
Expand Down

0 comments on commit 5bf4142

Please sign in to comment.