• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Distributions.Beta类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MathNet.Numerics.Distributions.Beta的典型用法代码示例。如果您正苦于以下问题:C# Beta类的具体用法?C# Beta怎么用?C# Beta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Beta类属于MathNet.Numerics.Distributions命名空间,在下文中一共展示了Beta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SetupDistributions

        public void SetupDistributions()
        {
            dists = new IDistribution[8];

            dists[0] = new Beta(1.0, 1.0);
            dists[1] = new ContinuousUniform(0.0, 1.0);
            dists[2] = new Gamma(1.0, 1.0);
            dists[3] = new Normal(0.0, 1.0);
            dists[4] = new Bernoulli(0.6);
            dists[5] = new Weibull(1.0, 1.0);
            dists[6] = new DiscreteUniform(1, 10);
            dists[7] = new LogNormal(1.0, 1.0);
        }
开发者ID:DvptUml,项目名称:mathnet-numerics,代码行数:13,代码来源:CommonDistributionTests.cs


示例2: CanSampleSequence

 public void CanSampleSequence()
 {
     var n = new Beta(2.0, 3.0);
     var ied = n.Samples();
     GC.KeepAlive(ied.Take(5).ToArray());
 }
开发者ID:jafffy,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例3: CanSampleSequence

 public void CanSampleSequence()
 {
     var n = new Beta(2.0, 3.0);
     var ied = n.Samples();
     var e = ied.Take(5).ToArray();
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例4: CanCreateBeta

 public void CanCreateBeta(double a, double b)
 {
     var n = new Beta(a, b);
     AssertEx.AreEqual<double>(a, n.A);
     AssertEx.AreEqual<double>(b, n.B);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例5: ValidateToString

 public void ValidateToString()
 {
     var n = new Beta(1.0, 2.0);
     AssertEx.AreEqual<string>("Beta(A = 1, B = 2)", n.ToString());
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例6: ValidateMode

 public void ValidateMode(double a, double b, double mode)
 {
     var n = new Beta(a, b);
     AssertEx.AreEqual<double>(mode, n.Mode);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例7: ValidateMedian

 public void ValidateMedian(double a, double b)
 {
     var n = new Beta(a, 1.0);
     var m = n.Median;
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例8: ValidateEntropy

 public void ValidateEntropy(double a, double b, double entropy)
 {
     var n = new Beta(a, b);
     AssertHelpers.AlmostEqual(entropy, n.Entropy, 14);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例9: ValidateMedianThrowsNotSupportedException

 public void ValidateMedianThrowsNotSupportedException()
 {
     var n = new Beta(0.0, 1.0);
     Assert.Throws<NotSupportedException>(() => { var m = n.Median; });
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例10: ValidateMaximum

 public void ValidateMaximum()
 {
     var n = new Beta(1.0, 1.0);
     Assert.AreEqual(1.0, n.Maximum);
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例11: ValidateInverseCumulativeDistribution

 public void ValidateInverseCumulativeDistribution(double a, double b, double x, double p)
 {
     var dist = new Beta(a, b);
     Assert.That(dist.InverseCumulativeDistribution(p), Is.EqualTo(x).Within(1e-6));
     Assert.That(Beta.InvCDF(a, b, p), Is.EqualTo(x).Within(1e-6));
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例12: ValidateDensityLn

 public void ValidateDensityLn(double a, double b, double x, double pdfln)
 {
     var n = new Beta(a, b);
     AssertHelpers.AlmostEqualRelative(pdfln, n.DensityLn(x), 13);
     AssertHelpers.AlmostEqualRelative(pdfln, Beta.PDFLn(a, b, x), 13);
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例13: ValidateDensity

 public void ValidateDensity(double a, double b, double x, double pdf)
 {
     var n = new Beta(a, b);
     AssertHelpers.AlmostEqualRelative(pdf, n.Density(x), 12);
     AssertHelpers.AlmostEqualRelative(pdf, Beta.PDF(a, b, x), 12);
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例14: ValidateCumulativeDistribution

 public void ValidateCumulativeDistribution(double a, double b, double x, double p)
 {
     var dist = new Beta(a, b);
     Assert.That(dist.CumulativeDistribution(x), Is.EqualTo(p).Within(1e-13));
     Assert.That(Beta.CDF(a, b, x), Is.EqualTo(p).Within(1e-13));
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:6,代码来源:BetaTests.cs


示例15: SetShapeBFailsWithNegativeB

 public void SetShapeBFailsWithNegativeB()
 {
     var n = new Beta(1.0, 1.0);
     Assert.That(() => n.B = -1.0, Throws.ArgumentException);
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例16: ValidateDensity

 public void ValidateDensity(double a, double b, double x, double pdf)
 {
     var n = new Beta(a, b);
     AssertHelpers.AlmostEqual(pdf, n.Density(x), 13);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例17: ValidateDensityLn

 public void ValidateDensityLn(double a, double b, double x, double pdfln)
 {
     var n = new Beta(a, b);
     AssertHelpers.AlmostEqual(pdfln, n.DensityLn(x), 14);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例18: ValidateToString

 public void ValidateToString()
 {
     var n = new Beta(1d, 2d);
     Assert.AreEqual("Beta(α = 1, β = 2)", n.ToString());
 }
开发者ID:kityandhero,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例19: ValidateMean

 public void ValidateMean(double a, double b, double mean)
 {
     var n = new Beta(a, b);
     AssertEx.AreEqual<double>(mean, n.Mean);
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:5,代码来源:BetaTests.cs


示例20: ValidateBetaSpecialCaseDensityLn

 public void ValidateBetaSpecialCaseDensityLn(double x)
 {
     var d = new Dirichlet(new[] { 0.1, 0.3 });
     var beta = new Beta(0.1, 0.3);
     AssertHelpers.AlmostEqualRelative(d.DensityLn(new[] { x }), beta.DensityLn(x), 10);
 }
开发者ID:EricGT,项目名称:mathnet-numerics,代码行数:6,代码来源:DirichletTests.cs



注:本文中的MathNet.Numerics.Distributions.Beta类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Distributions.ChiSquared类代码示例发布时间:2022-05-26
下一篇:
C# Massive.DynamicRepository类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap