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.
`SequenceDistribution.SetTo()` called `SetWorkspace` that tried to normalize weight function.
This is not necessary if sequence distribution is set to another valid sequence distribution.
This allows you to avoid confusion of private internal versions of these packages, with those on nuget.org or other feeds with other privately build versions.
The Nightly build has been failing because it uses VS2017 hosted machines that can not target the desired version of .NET Core.
Switching to VS2019 machines fixes this issue.
Added PointMassEstimator.
PointMass overrides Equals.
Observed variables can have query types.
Removed the obsolete Output attribute.
Fixed build order.
Internal compiler changes:
* Added MarginalAnalysisTransform. VariableTransform, ChannelTransform, Channel2Transform no longer set marginal prototypes.
* VariableInformation can be attached to any declaration, not just variables.
* DeriveArrayVariable does not propagate MarginalPrototype attributes.
* VariableTransform and ChannelTransform create marginal channels for constants and parameters.
* ModelBuilder only attaches sizes to objects assignable from arrays.
* Added ObservedVariableMessages CompilerAttribute.
* Channel2Transform attaches DescriptionAttributes
- Moved arguments and expected result values for special function tests from inlined code to csv files.
- Added a python script to compute expected result values for tested special functions in high precision.
- Improved accuracy of NormalCdfLn for `x < -8`. Truncated series was too short, test used to pass, because the expected value itself was incorrect.
* Update to .NET Core 3.1
This update was faily trivial change of project properties with only one caveat
```
error CS0104: 'Range' is an ambiguous reference between 'Microsoft.ML.Probabilistic.Models.Range' and 'System.Range'
```
which require sprinkling everywhere following line of code
```
using Range = Microsoft.ML.Probabilistic.Models.Range;
```
* Update build definition to use more modern images
- Windows 2019 for .NET Core 3.1
- Mac OS 10.14 (Specifically https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops)
Co-authored-by: Tom Minka <8955276+tminka@users.noreply.github.com>
`AppendInPlace()` is not inplace anymore, it creates a copy of automata under the hood.
This makes calling it repeatedly quite expensive, because runtime will grow quadratically
with the number of calls. This method should be removed in future.
As a replacement a new method is introduced - `Concatenate()` which concatenates multiple
automata/transducers at once. It is significantly faster.
It really is not required - at all points it is known with which automaton we operate right now.
Also, where only state index was needed we store now the int index instead of fat State object
which contains extra information.
Add `GetElementsUntyped` method to `ICollectionDistribution` interface to be able to get elements for the collection without knowing of the element type.
Contracts has been changed: `TryEnumerateSupport()` does not throw if it encounters non-enumerable automata.
- Implementation of `TryEnumerateSupport` was changed a lot:
- It avoids recursion (and "stacked IEnumerables")
- An optimization has been added - traversing states with single point-mass forward transition
(90+% of real-world cases) is cheaper, because it avoids some extra allocations
Also "is enumerable" status is cached. It is set proactively at automaton construction
in 2 common cases which are cheap to detect:
- automaton with self-loops can not be enumerated
- automaton with only forward transitions (and thus no loops) can always be enumerated
In all other cases this flag is calculated lazily on first enumeration try.
`System.Collections.Immutable` has `ImmutableArray` that serves the same purpose as
`ReadOnlyArray` but has different API. This type is available (without extra dependencies)
only in netcore, so can't be used in Infer.NET which has to support netframework.
Until netframework support can be dropped reimplement a subset of `ImmutableArray`
in Infer.NET codebase.