资源简介
WindowsFormsApplication1.rar
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using MathNet.Numerics;
using MathNet.Numerics.LinearAlgebra.Double;
using MathNet.Numerics.Distributions;
namespace WindowsFormsApplication1
{
public class DiscreteMarkov
{
#region 属性
///
/// 样本点状态时间序列按照时间升序
///
public List StateList { get; set; }
///
/// 状态总数对应模型的m
///
public int Count { get; set; }
///
/// 概率转移矩阵Pij
///
public List ProbMatrix { get; set; }
///
/// 各阶的自相关系数
///
public double[] Rk { get; set; }
///
/// 各阶的权重
///
public double[] Wk { get; set; }
///
/// 频数矩阵
///
public int[][] CountStatic { get; set; }
///
/// 目标序列是否满足“马氏性“
///
public Boolean IsMarkov { get; set; }
///
/// 滞时期,K
///
public int LagPeriod { get; set; }
///
/// 预测概率
///
public double[] PredictValue { get; set; }
#endregion
#region 构造函数
public DiscreteMarkov(List data int count int K = 5)
{
this.StateList = data;
this.LagPeriod = K;
this.Count = count;
this.CountStatic = StaticCount(data count);
this.ProbMatrix = new List();
var t0 = DenseMatrix.OfArray(StaticProbability(this.CountStatic));
ProbMatrix.Add(t0);
for (int i = 1; i < K; i++) //根据CK方程,计算各步的状态转移矩阵
{
var temp = ProbMatrix[i - 1] * t0;
ProbMatrix.Add(temp);
}
IsMarkov = ValidateMarkov();
if (IsMarkov)
{
CorrCoefficient();
TimeWeight();
PredictProb();
}
else
{
Console.WriteLine(“马氏性 检验失败无法进行下一步预测“);
}
}
#endregion
#region 验证
///
/// 验证是否满足马氏性默认的显著性水平是0.05,自由度25
///
///
private Boolean ValidateMarkov()
{
//计算列和
int[] cp1 = new int[Count];
double gm = 0;
try
{
int allcount = CountStatic.Select(n => n.Sum()).Sum();//总数
for (int i = 0; i < Count; i++)
{
for (int j = 0; j < Count; j++) cp1[i] += CountStatic[j][i];
}
double[] cp = cp1.Select(n => (double)n / (double)allcoun
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1041 2016-01-04 14:35 WindowsFormsApplication1\WindowsFormsApplication1.sln
..A..H. 46592 2017-06-25 13:07 WindowsFormsApplication1\WindowsFormsApplication1.v12.suo
文件 7664 2016-01-05 16:07 WindowsFormsApplication1\WindowsFormsApplication1\DiscreteMarkov.cs
文件 505 2016-01-04 14:35 WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
文件 4446 2016-01-04 15:09 WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
文件 1121752 2013-07-23 05:17 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\FSharp.Core.dll
文件 603029 2013-07-23 05:17 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\FSharp.Core.xm
文件 1177600 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.dll
文件 455680 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.FSharp.dll
文件 294400 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.FSharp.pdb
文件 90418 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.FSharp.xm
文件 3792384 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.pdb
文件 3229256 2015-12-30 17:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\MathNet.Numerics.xm
文件 19968 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 50688 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 22656 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2017-03-19 05:00 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 36352 2013-09-24 22:54 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\zh-Hans\FSharp.Core.resources.dll
文件 1453 2016-01-05 16:22 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7214 2017-06-25 13:03 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 6555 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 19968 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
文件 180 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
文件 50688 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
文件 180 2016-01-04 15:24 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 48789 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache
文件 977 2017-06-25 13:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
文件 1390 2016-01-04 14:35 WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
文件 2900 2016-01-04 14:35 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
文件 5612 2016-01-04 14:35 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
............此处省略17个文件信息
相关资源
- 通过变化的电磁耦合,大型强子对撞
- Delphi XE10.3 破解文件
- Delphi XE10.2.3破解 破解
- 剖析Linux系统下基于NUMA构建的服务
- zend studio 12 破解 注册码 key 绿色版
- CCLicenseService
- WinRAR 4.0 简体中文破解版
- 单片机仿真软件proteus6.7免安装绿色版
- UltraEdit 26.x版本 激活工具
- 一种基于LM3150 Buck型开关电源设计.p
- 百度文库、豆丁、道客巴巴文件免费
- 改善分数分频锁相环合成器中的整数
- 233网校视频器2018最新绿色版
- OdooHotelManagementSystem 基于Odoo的酒店管
- SecureCRT-6.0.2安装包和SecureCRT-6.0.2注册
- 数据结构与算法课件ppt
- 方正超粗黑简体 FZCCHJW—GB1-0 字体
- FZCCHJW-GB10
- Dr. Cleaner Pro mac破解版
- kindle epub 电子书大全
- 迅雷敏感资源限制解除小工具.zip
- Eclipse编程技术与附CD-ROM光盘
- HEU_KMS_Activator_j
- pzs_44217116_06.aia
- Git汉化资源
- digital字体
- 浪潮英信服务器NP120D用户手册
- 看门狗复位的应用技巧
- Hillstone SA-2003高性能纯硬件安全网关产
- Hillstone ARP防护——StoneOS如何保
评论
共有 条评论