InferNet.Infer is generic.
ModelBuilder uses the correct overload of InferNet.Infer.
CodeBuilder.Method checks for correct number of arguments.
FileArray implements IReadOnlyList.
* Added WordStrings and StringFormatTests.
* FactorManager does not allow point mass conversion of the return value argument of EP evidence methods (previously handled by MessageTransform).
* Code cleanup. Renamed IdentityComparer to ReferenceEqualityComparer.
* Enumerating support of distribution does not require it to be normalized unless determinization is requested.
Avoiding doing this speeds up enumerating some auotomata 10x.
* states of `EpsilonClosure` can be stored in plain array instead of list. This minor change speeds up epsilon
closure operations by 20% due to one less level of indirection and better memory allocation.
Previous version was correct but had a pathalogical (exponential) runtime for some forms of automata
with multiple branches with epsilon transitions. Also code was unneccessary complex, because it tried
to compute unreachable states in presence of loops.
Specific changes in this PR:
- `EnumerateSupport` implementation was moved into its own file - `Automaton.EnumerateSupport`
- `ComputeEndStateReachability` method has been resurrected. It is invoked only if loops are detected
In all other cases, it is trivial to check for end-state reachability during normal traversal
- Traversal loop has been split in steps, some of which were moved into their own local methods.
- Fast path for non-branchy part of automaton was implemented.
Removed Cancels attribute from PowerPlateOp.EnterAverageConditional
Sum_Expanded handles an empty array.
Dirichlet.GetMean handles zero pseudo-counts.
Moved TrueSkill tests into TrueSkillTests.
* Motif Finder uses SequenceCount = 70
* DiscreteFromDirichletOp.ProbsAverageConditional handles PiecewiseVector
* GammaPower.FromLogMeanMinusMeanLog handles infinite mean and negative power
* Tests use Assert.Throws instead of try/catch
* Test output is less verbose
* Added SimplestBackwardChainTest3
* Fixed IterativeProcessTransform when variable has QueryTypes.MarginalDividedByPrior and ConstrainEqualRandom(variable, observed)
* Discrete allows Dimension=0
* Fix long overflow in OperatorTests.Longs()
* Fixed printing big float arrays, extended series for ((exp(x) - 1) / x - 1) - 0.5
* GammaPower.GetLogProb uses ulp-based threshold
* Moved a constant for maximum terms in NormalCdfMomentRatio outside of method body
* Separate methods for Previous/NextDoubleWithPositiveDifference
* More magic constants replaced with ulp-based ones
* Fixed abs value comparison in GammaPower.GetLogProb
* Ulp-based constatnts in IsBetween.XAverageConditional
* Moved the definitions of Ulp1-dependant constants below that of Ulp1
* Replaced <= in GammaPower with a < as it used to be
Co-authored-by: Dmitry Kats <ratkillerx@hotmail.com>
* Add more generated files to exclusion list
* RobustGaussianProcess uses OxyPlot.Wpf only on Windows
Co-authored-by: Tom Minka <8955276+tminka@users.noreply.github.com>
IncrementTransform handles GetJaggedItemsOp and GetDeepJaggedItemsOp.
IndexingTransform gives a warning for unimplemented cases instead of throwing.
Improved code doc for Damp functions.
Changed "#if HAS_BINARY_FORMATTER" to "#if NETFULL"
Removed Assert.Timeout from performance tests
* RoslynDeclarationProvider uses all available source codes
to build the requested type declaration.
* Conversion.TryFindConversion looks for casts defined on the toType as
well.
Co-authored-by: Dmitry Kats <ratkillerx@hotmail.com>
Removed c_digamma_small case from MMath.Digamma
Added tests for MMath.GammaLnSeries and XMinusLog1Plus
GenerateSeries also generates error bounds
Added CheckMathLibraries
- Ensured argument consistency in NormalCdfIntegralTest
- Fixed some test values
- Exp-Sinh quadrature in LogisticGaussian
- Arithmetic-precision-based constants in logistic gaussian
- Named const for Ulp(1)
- Generating series for gamma(x) - 1/x
- Fixed integer overflow in BGRat
- GenerateSeries can print arrays of bigfloats.
ComputeSpecialFunctionsTestValues.py computes more accurate test values, uses pure mpmath, more reliable quadrature. Computes values for NormalCdfRatioLn. Removed hard-coded cases.
MMath.Log1PlusExp uses a threshold based on machine epsilon.