神经网络的三种训练方法,神经网络越训练越差

1、求助:神经网络两次训练的结果不一样

神经网络两次训练的结果不一样,这是因为每次训练的迭代初值不相同(是随机的),所以得到的结果是有差异的。一般的话,软件开启第一次时,运行得到结果是比较正确的。例如:用BP神经网络预测某地区人口数

第一次运行:

第二次运行:

谷歌人工智能写作项目:小发猫

2、关于神经网络LM训练算法的一些问题

1.初始权值不一样,如果一样,每次训练结果是相同的 2.是 3.在train之前修改权值,IW,LW,b,使之相同 4.取多次实验的均值 一点浅见,仅供参考

3、神经网络训练时准确度突然变得急剧下降,为啥?

可能是因为太激进,设置太高的学习率,也可能是因为设置的参数的问题。

4、如何训练神经网络

1、先别着急写代码
训练神经网络前,别管代码,先从预处理数据集开始。我们先花几个小时的时间,了解数据的分布并找出其中的规律。
Andrej有一次在整理数据时发现了重复的样本,还有一次发现了图像和标签中的错误。所以先看一眼数据能避免我们走很多弯路。
由于神经网络实际上是数据集的压缩版本,因此您将能够查看网络

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
国际大赛的第一名为Better所夺得 三个月结束时他的EA(自动交易系统) 把本金从$10000增加成$130 475.45 他采用的就是神经网络原理的EA 这使得用神经网络方法做EA成为不少人关注的焦点 这里翻译一篇采用神经网络做EA的不错的示例文章当然附有源码是吸引人的地方 不过也许作者提出了研究神经网络EA的一些思考更为值得注意 作者提出了∶ 1。“如果有飞机,为什么还要教人类去飞?” 意思是研究是经网络不必从零起步。MT4里已有了不错的“遗传算法” 文中介绍了如何利用MT4已有的“遗传算法” 2。大家都说做单子最重要的是“顺势而为”,但更需要解决的是∶ “一个基于趋势的交易系统是不能成功交易在盘整(sideways trends), 也不能识别市场的回调(setbacks)和逆转(reversals.,反向走势)!” 这可是抓到不少人心中的“痒处” ,有多少人不是到了该逆势时没转向而产生亏损呢? 3。训练神经网络需要用多长的历史数据,提出了并不是用的历史数据好,另外也不是训练的间隔好,文中提出了什么情况下有需再训练它。 4。示例当然仅是示例 等等。。 一个朋友看了就觉得不错拿去发表了 这里发表以飨这里的朋友 下面是译文和作者的原文 The problem is stated for this automated trading system (ATS) as follows: (ATS)自动的(智能的,采用神经网络的)交易系统的问题表述如下 Let's consider we have a basic trading system - BTS. It is necessary to create and teach a neural network in order it to do things that cannot be done with the BTS. This must result in creation of a trading system consisting of two combined and mutually complementary BTS and NN (neural network). 如果我们有一个(BTS, basic trading system),同时需要用创建一个神经网络系统并教会它做BTS所不能做的事,按这个思路就是要创建这样一个交易系统∶它由互相补充(配合)的两部分组成,BTS和NN(神经网络)。 Or, the English of this is: There is no need to discover the continents again, they were all discovered. Why to teach somebody to run fast, if we have a car, or to fly, if we have a plane? 呃,英语说,我们不需要再去发现“新大陆”,它们是已经存在的东西!进一步说,如果我们已经有了汽车,那为什么还要教人如何跑得快?如果有飞机,为什么还要教人类去飞? Once we have a trend-following ATS, we just have to teach the neural network in countertrend strategy. This is necessary, because a system intended for trend-based trading cannot trade on sideways trends or recognize market setbacks or reversals. You can, of course, take two ATSes - a trend-following one and a countertrend one - and attach them to the same chart. On the other hand, you can teach a neural network to complement your existing trading system. 一旦有一个趋势交易系统的ATS,我们仅需要教会这个神经网络如何逆势(反趋势)交易的策略。这一点是非常必要的,因为一个基于趋势的交易系统是不能成功交易在盘整(sideways trends),也不能识别市场的回调(setbacks)和逆转(reversals.,反向走势)!当然,你可以采用两个ATS,一个基于“趋势”,一个基于“反趋势”(逆向),然后把它们挂到同一图表上。另一个办法是,你能教会神经网络如何与你现有的系统“互补地”协调工作! For this purpose, we designed a two-layer neural network consisting of two perceptrons in the lower layer and one perceptron in the upper layer. 为实现这个目标,我们设计了一个两层的神经网络,下层有两个感知机(perceptrons)上层有一个感知机。 The output of the neural network can be in one of these three states: 这个神经网络的能输出下列三种状态之一 Entering the market with a long position (Entering)市场是处在多向仓 Entering the market with a short position (Entering)市场是处在空向仓 Indeterminate state 不确定的, (不明确的, 模糊的)状态 Actually, the third state is the state of passing control over to the BTS, whereas in the first two states the trade signals are given by the neural network. 实际上,第三种状态是就把控制权交给BTS,反之前两种状态是交易信号由神经网络给出。 The teaching of the neural network is divided into three stages, each stage for teaching one perceptron. At any stage, the optimized BTS must be present for perceptrons to know what it can do. 神经网络的“教育”分成三步骤,每一步骤“教育”一个感知机,在任何一步骤,这个优化了的BTS必须存在为的是“感知机们”知道它自己能做什么。 The sep***te teaching of perceptrons by a genetic algorithm is determined by the lack of this algorithm, namely: The amount of inputs searched in with the help of such algorithm is limited. However, each teaching stage is coherent and the neural network is not too large, so the whole optimization does not take too much time. 感知机们分别的“教育”由遗传算法来承担,由于这样的算法的缺乏,换句话说,搜索到的这样的算法有限,限制了“输入”(参数变量)的数量(借助这样算法得到的参数变量的值),然而,每一步骤的“教育”是密切配合补充的。(因此效果还是不错),这样这个神经网络不会太大,整个的优化也不会耗费太多的时间。 The very first stage, preceding the teaching of an NN, consists in optimization of the BTS. 在“教育”NN之前的一步是对BTS进行优化。 In order not to lose ourselves, we will record the stage number in the input of the ATS identified as "pass". Identifiers of inputs corresponding with the stage number will and in the number equal to this stage number. 为了不使我们自己也被搞糊涂了,我们将已经测试通过的ATS的输入(参数变量)记录上(”通过”("pass")的步骤号(stage number).,输入s(参数变量)的标识符将和stage number(步骤号)一致(等同)。 Thus, let's start prep***tions for optimization and teaching the NN. Let's set the initial deposit as $1000000 (in order not to create an artificial margin call during optimization) and the input to be optimized as "Balance" in Expert Advisor properties on the tab of "Testing" in the Strategy Tester, and start genetic algorithm. 这样,我们开始对这个NN进行优化和“教育”的准备。存入初始保证金为$100万(以便于在优化期间不产生人为的补充保证金的通知)。Input(参数变量)是按“余额”进行优化,设置EA的Strategy Tester的测试的属性tab为"Testing" 。开始运行遗传算法。 Let's go to the "Inputs" tab of the EA's properties and specify the volume of positions to be opened by assigning the value 1 to the identifier "lots". 在这个EA的开仓量 "lots".的值设为1 lot。 Optimization will be performed according to the model: "Open prices only (fastest method to analyze the bar just completed, only for EAs that explicitly control bar opening)", since this method is available in the ATS algorithm. 从这个ATS算法明确地有效开始,实施优化,所采用复盘模型是∶“仅用开盘价(以最快速的方法分析刚形成的柱线)”。 Stage 1 of optimization. Optimization of the BTS: 优化步骤1,BTS的优化 Set the value 1 for the input "pass". 设置为 1 为这input(参数变量)“为通过”(the input "pass")。 We will optimize only inputs that correspond with the first stage, i.e., that end in 1. Thus, we check only these inputs for optimization, and uncheck all others. 我们仅仅优化步骤1相关的那些inputs(参数变量),即,尾标为 1 的参数变量,于是,我们仅仅测试优化有关的inputs而不测试其他的变量参数 tp1 - TakeProfit of the BTS. It is optimized with the values within the range of 10 to 100, step 1 tp1,BTS的所取的止盈值(TakeProfit)。在step 1,优化的值的范围在10到100, sl1 - StopLoss of the BTS. It is optimized with the values within the range of 10 to 100, step 1 sl1,BTS的所取的止损值(StopLoss)。在step 1,优化的值的范围在10到100 。 p1 - period of CCI used in the BTS. It is optimized with the values within the range of 3 to 100, step 1 pl, 用于BTS的CCI的周期值。在step 1 ,优化的值的范围在 3到100 Stage 2. Teaching the perceptron responsible for short positions: 步骤 2 ,“教育负责管“开空仓”(short positions)的感知机 Set the value 2 (according to the stage number) for the input "pass". 根据步骤的步骤号,设置(input,参数变量) 的"pass"的值为 2。 Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage. 不测试那些已经测试过的优化了的以前步骤的inputs.(变量参数)。以防万一,保存以前步骤获得的inputs(变量参数值)到一个文件中去 Check the inputs for optimization according to our rule: their identifiers must end in 2: 根据我们的规则,必须是测试那些是在尾标为 2的inputs(变量参数)。 x12, x22, x32, x42 - weight numbers of the perceptron that recognizes short positions. It is optimized with the values within the range of 0 to 200, step 1 x12, x22, x32, x42 是识别并开空仓的感知机的权重,它们的值在step 1时被优化在范围0 to 200 tp2 - TakeProfit of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1 tp2 (TakeProfit) 是感知机所开的仓的止盈值,它们的值在step 1时被优化在范围10 to 100。 sl2 - StopLoss of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1 sl2 (StopLos) 在 step 1它是感知机所开的仓的止损值,被优化值的范围在 10 to 100 p2 - the period of the values of price difference to be analyzed by the perceptron. It is optimized with the values within the range of 3 to 100, step 1. p2 感知机所分析的价格差的周期值 (iiCCI()函数的一个参数∶period - Averaging period for calculation),在step 1 它的值所优化的范围在3 to 100 Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below: 现在,开始用遗传算法来优化“教育”NN(让它“学习”市场),获得的结果如下∶ Stage 3. Teaching the perceptron responsible for long positions: 步骤 3 “教育”负责开多仓的感知机(“学习”市场)。 Set the value 3 (according to the stage number) for the input "pass". 设置值 3 (根据步骤的步骤号)说明这些input(变量参数)已经“通过”(the input "pass") Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage. 同样,不测试,那些已经测试过的优化了的,以前步骤的inputs.(变量参数值),以防万一,保存以前步骤获得的inputs.(变量参数值) 到一个文件中去 Check the inputs for optimization according to our rule: their identifiers must end in 3: 根据我们的规则,优化测试的inputs(变量参数值)必须是尾标为3的那些变量参数。 x13, x23, x33, x43 - weight numbers of the perceptron that recognizes long positions. It is optimized with the values within the range of 0 to 200, step 1. x13, x23, x33, x43是识别多仓的感知机的权重,它们的值在step 1时被优化时得到的范围在0 to 200 tp3 - TakeProfit of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1 tp 3 (TakeProfit) 是感知机所开的仓的“止盈值”,它的值在step 1时被优化时的范围是在10 to 100。 sl3 - StopLoss of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1 sl3 (StopLoss) 是感知机所开的仓的“止盈值”,它们的值在step 1时被优化为范围是10 to 100。 p3 - the period of the values of price difference to be analyzed by the perceptron . It is optimized with the values within the range of 3 to 100, step 1. p3 --感知机所分析的价差的周期值。它在步骤 1 优化时得到的值的范围是 3 to 100 。 Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below: 启动采用遗传算法的优化来“教育”NN,所获得的结果如下∶ Stage 4 (final). Teaching the first layer, i.e., teaching the perceptron that is in the upper layer: 步骤 4 (最终步骤) “教育”第一层,即“教育”在上层的感知机。 Set the value 4 (according to the stage number) for the input "pass". 根据步骤的步骤号,设置值4 为输入通过(for the input "pass") Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage. 不测试那些在之前步骤已经测试过的优化了的“输入” (inputs) (意思是∶已经在之前步骤优化过的变量的参数值就不再优化它们了)。以防万一,将之前步骤获得的这些变量的参数值存到一个文件中去。 Check the inputs for optimization according to our rule: their identifiers must end in 4: 根据我们的规则,只测试优化标识符最后位是4的那些inputs(变量的参数值) x14, x24, x34, x44 - weight numbers of the perceptron of the first layer. It is optimized with the values within the range of 0 to 200, step 1. x14, x24, x34, x44 是第一层感知机参数的权重值。在步骤 1 时它们被优化的值的范围在0 io 200 。 p4 - the period of the values of price difference to be analyzed by the perceptron. It is optimized with the values within the range of 3 to 100, step 1. p4 被感知机分析的价差的值的周期。在步骤 1 它的值的范围被优化在 3 to 100 。 Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below: 采用遗传算法来优化,启动“教育”来教它“学习”。所获得结果如下∶ That's all, the neural network has been taught. 这就是全部,神经网络已经被“教育”了。 The ATS has one more non-optimizable input, mn - Magic Number. It is the identifier of positions for a trading system not to mix its orders with the orders opened manually or by other ATSes. The value of the magic number must be unique and not coincide with the magic numbers of positions that have not been opened by this specific Expert Advisor. 这个ATS有一个不能被优化的input(参数) mn-- Magic Number.(魔法号)它是一个交易系统它所开的仓位的识别符,为的是不和手动开仓或其他ATSes开的仓位混淆。这个Magic Number的值必须是唯一的并且和这个特别的ea尚未开仓的magic numbers不一致。 P.S. The size of the initial deposit is found as the doubled absolute drawdown, i.e., we consider some safety resources for it. 出于保证有一些安全保险的考虑,初始保证金的金额设置是考虑为绝对最大回落的两倍 The EA given in the source codes is not optimized. 这个ea的源代码没有优化。 If you need to replace the built-in BTS with the algorithm of another trading system, you must modify the contents of the function basicTradingSystem(). 如果你需要置换嵌入另一个交易系统算法的BTS,你必须修改BTS功能的内部。 In order not to enter the initial and the final values and the values of steps for optimization, you can take the ready file combo.set, place it in the folder tester MT4, and upload to the EA's properties in Tester. 以便于不输入优化时的初值,终值和步长,你可采用已备好的combo.set文件,把它放置到MT4的 tester 目录并加载这个ea的属性(properties)到Strategy Tester。 Re-optimization of the EA is to be performed at a weekend, i.e., on Saturday or on Sunday, but only if the results of the preceding week were unprofitable. The presence of losses means that the market has changed, and the re-optimization is necessary. The presence of profits means that the ATS does not need any re-optimization and recognizes market patterns quite well. 这个ea的再优化可在周末进行,即周六和周日,但仅在前面一周的结果是不盈利的。亏损的出现意味着市场已经改变,于是需要重新优化,若是仍然获利意味着这个ATS不需要重新优化,它对市场目前的模型的识别继续有效! 5 comments Subscribe to discussion sstef wrote: backtests seems ok, how about forward tests ? Try independet without me. You all have for original forward and other tests: open source, tester, head and hands. reply 08.03.2008 08:57 Reshetov thanks a lot Reshetov, very simple but very powerful, i have never think about this idea, backtests seems ok, how about forward tests ? reply 07.03.2008 23:42 sstef tws0124 wrote: What is the number of pass? Try test for pass value of 1, 2, 3 and 4 What is best of the best, that use (right solution: pass = 4) reply 07.03.2008 10:45 Reshetov All the optimization is completed, now I use it by live account, What is the number of pass? Sorry,bad English...
供水管网发生爆管事故后,快速确定爆管位置,可以实现迅速抢修,有效降低事故的损失。针对爆管定位问题,本文基于人工神经网络(ANN),建立爆管位置与事故时压力监测点的压力变化率之间的非线性映射关系,构建了ANN爆管定位模型,并选取了一个供水管网案例,引入相关系数(R2)指标评估模型的精度,验证了方法的可行性。此外,分析了不同监测点组合对模型定位精度的影响,发现监测点组合均匀分布在管网内部时,模型定位精度高。   随着我国城市化进程的不断加快,城市供水管网的规模也不断增加,由于缺乏科学合理的规划、维护与运行管理,各大城市的供水管网爆管事故频发,严重影响了城市供水的安全性和经济性,对资源、环境、社会均产生了巨大的负面影响。目前水务公司发现爆管事故多依赖于人工报告,此为被动性爆管定位方法,此方法虽然可以确定准确的爆管点,但弊端也比较明显,检测效率较低,反应时间较长,发现事故时,可能已经造成了较大的损失。因此,需要开展供水管网爆管事故智能检测方面的研究,快速准确地确定爆管位置和事故影响范围,并做出相应的科学决策。   为了解决爆管定位的难题,各国学者均开展了大量的相关研究工作。1992 年,Liggett 等人首先提出基于暂态的爆管定位方法,该方法的基本原理是爆管产生的压力波将先后传播到附近的几个压力监测点,根据传播路径和时间差来诊断爆管位置,但由于压力波传播路径比较复杂,且时间差通常很短,因此定位精度会受到严重影响;等人综合运用负压波和流量检测法进行泄漏模式识别与漏点定位,可及时发现和定位泄漏点。基于水力模型的爆管定位方法也取得了一定的进展,Wu 在此研究方向做出了代表性的工作,其结果被英国的水务公司所采用;Sanz 等人后续推进了这方面的研究,其依据爆管的水量变化过程,不断校核管网模型的空间分布参数,其结果展示出了较高的爆管定位精度;等人利用监测资料与低压供水模型相结合的管网爆管水力学模型实现了爆管定位,并分析了爆管点位置与周围压力变化的关系。随着人工智能技术的快速发展,数据驱动的智能爆管分析方法成为了国内外学者的热点关注问题。应用人工免疫网络并结合最近邻方法,推测爆管事故的发生;Zhang等人采用支持向量机分析爆管区域;等人通过SCADA(SupervisoryControl and Data Acquisition)监测系统收集压力数据,对比爆管前后两个时刻的压力值变化,绘制爆管压降等值线图,最后通过压降中心来定位爆管点,以上三个研究均是基于机器学习的方法,通过训练模型达到对实测数据的异常辨识功能,从而确定爆管的位置。   针对智能化的爆管定位问题,本文提出了一种基于人工神经网络(ANN)的供水管网爆管定位方法,利用ANN的模式识别功能,建立爆管位置与压力监测点水压化率之间的非线性映射关系,实现爆管位置的确定。此外,本文选取了一个案例管网,通过大量的模拟爆管事故,验证了所提出方法的可行性。
神经网络的实验步骤详细分析具体-神经网络大作业(一).doc 本人做的神经网络的实验,步骤详细,分析具体,适合做入门学习用-I do neural network experiments, the steps detailed analysis of specific, suitable for entry to study 截取某些内容,方便参考: 用BP网络识别雷达测速的三类信号 一.数据来源      此信号来自一部测速雷达获得的三种目标的回波信号,三种目标分别是行人W、自行车B和卡车T,信号中包含目标的速度信息。 二.信号的分析与处理      根据所给的三类信号的样本,每一个样本中均包含1024个数据,由于每一个样本的数据量较大,不可能将所有1024个数据全都作为神经元的输入,计算量太大,所以必须首先对信号进行分析,提取最有价值的特征信息。      首先可以看看每一个样本中的数据图,以各类信号中的第一个样本为例,如图1所示。 (1)                                       (2)                                        (3) 图1 (1)行人数据图  (2)自行车数据图  (3)卡车数据图              从上图的时域数据基本上观察不出规律,因此我们要对数据进行傅立叶变换,从频域分析数据的特征,如下图2所示。 图2 行人数据频谱图 从上图中看到行人的数据的频谱的幅度很小,原因是因为信号在零点处的值特别大,所以要将在零点处的值去掉,得到如图3所示。 图3 行人数据去掉零点后的频谱图 这时可以观察到信号的一些特征,从图中发现信号的频谱图是基本对称分布的,而且信号的峰值也很大,可以对它首先进行归一化,如下图4所示。 图4 (1)行人数据归一化后的频谱图 (2)取绝对值后的频谱图 同时将自行车和卡车的频谱图来做比较如图5,6所示 图5 (1)自行车数据归一化后的频谱图        (2)取绝对值后的频谱图 图6 (1)卡车数据归一化后的频谱图              (2)取绝对值后的频谱图 从上面三幅图中,可以观察到信号都有明显的峰值,但是出现的位置不同,另外,信号的均值和方差明显不同。但是考虑到雷达所测数据中,会有一些速度反常规的游离数据,所以考虑采用受游离数据影响小的平均绝对值偏差来代替样本方差作为输入特征。同时,以数据的样本中位数来作为输入特征来减少游离数据的影响。根据这些特征进行提取来作为输入。 三.特征提取 1.取信号归一化后的均值作为一个特征量。 2.取信号归一化后的平均绝对值偏差作为一个特征量。 3.取信号归一化后的样本中位数作为一个特征量。 4.由三幅图的比较可以发现,信号的每两点之间的起伏程度也不尽相同,所以可以设定一个特征量,来纪录信号两点间的起伏程度的大小。 5.信号在经过归一化后,可以将信号全部的值加起来,用这个总的值来作为一个特征量。 除了上述的特征,还有很多特征可以提取,但是特征多,需要的输入神经元多,依照隐层神经元约为输入神经元的两倍的原则,隐层的神经元也将多。则网络训练的时间将花费很大。所以,本实验只提取了上述特征中的1,2,3。 四.算法与实现 根据提取的特征的维数,来决定输入神经元的个数。因为提取的三个特征的维数分别为8,1和1,所以输入神经元的个数为10。输出神经元的个数定为3个,考虑到被识别的三种信号分别对应三个输出,虽然用两个神经元就可以表示三种输出状态,但是用三个神经元能更好地分辨,减少出错的概率。至于隐层的神经元个数则按照约为输入神经元个数的两倍的原则,设为20个。当然还可以在调试过程中根据输出的识别率来找到一个一个较为合适的个数。
神经网络的实验步骤详细分析具体-神经网络大作业(三).doc 本人做的神经网络的实验,步骤详细,分析具体,适合做入门学习用-I do neural network experiments, the steps detailed analysis of specific, suitable for entry to study 截取某些内容,方便参考: 用BP网络识别雷达测速的三类信号 一.数据来源      此信号来自一部测速雷达获得的三种目标的回波信号,三种目标分别是行人W、自行车B和卡车T,信号中包含目标的速度信息。 二.信号的分析与处理      根据所给的三类信号的样本,每一个样本中均包含1024个数据,由于每一个样本的数据量较大,不可能将所有1024个数据全都作为神经元的输入,计算量太大,所以必须首先对信号进行分析,提取最有价值的特征信息。      首先可以看看每一个样本中的数据图,以各类信号中的第一个样本为例,如图1所示。 (1)                                       (2)                                        (3) 图1 (1)行人数据图  (2)自行车数据图  (3)卡车数据图              从上图的时域数据基本上观察不出规律,因此我们要对数据进行傅立叶变换,从频域分析数据的特征,如下图2所示。 图2 行人数据频谱图 从上图中看到行人的数据的频谱的幅度很小,原因是因为信号在零点处的值特别大,所以要将在零点处的值去掉,得到如图3所示。 图3 行人数据去掉零点后的频谱图 这时可以观察到信号的一些特征,从图中发现信号的频谱图是基本对称分布的,而且信号的峰值也很大,可以对它首先进行归一化,如下图4所示。 图4 (1)行人数据归一化后的频谱图 (2)取绝对值后的频谱图 同时将自行车和卡车的频谱图来做比较如图5,6所示 图5 (1)自行车数据归一化后的频谱图        (2)取绝对值后的频谱图 图6 (1)卡车数据归一化后的频谱图              (2)取绝对值后的频谱图 从上面三幅图中,可以观察到信号都有明显的峰值,但是出现的位置不同,另外,信号的均值和方差明显不同。但是考虑到雷达所测数据中,会有一些速度反常规的游离数据,所以考虑采用受游离数据影响小的平均绝对值偏差来代替样本方差作为输入特征。同时,以数据的样本中位数来作为输入特征来减少游离数据的影响。根据这些特征进行提取来作为输入。 三.特征提取 1.取信号归一化后的均值作为一个特征量。 2.取信号归一化后的平均绝对值偏差作为一个特征量。 3.取信号归一化后的样本中位数作为一个特征量。 4.由三幅图的比较可以发现,信号的每两点之间的起伏程度也不尽相同,所以可以设定一个特征量,来纪录信号两点间的起伏程度的大小。 5.信号在经过归一化后,可以将信号全部的值加起来,用这个总的值来作为一个特征量。 除了上述的特征,还有很多特征可以提取,但是特征多,需要的输入神经元多,依照隐层神经元约为输入神经元的两倍的原则,隐层的神经元也将多。则网络训练的时间将花费很大。所以,本实验只提取了上述特征中的1,2,3。 四.算法与实现 根据提取的特征的维数,来决定输入神经元的个数。因为提取的三个特征的维数分别为8,1和1,所以输入神经元的个数为10。输出神经元的个数定为3个,考虑到被识别的三种信号分别对应三个输出,虽然用两个神经元就可以表示三种输出状态,但是用三个神经元能更好地分辨,减少出错的概率。至于隐层的神经元个数则按照约为输入神经元个数的两倍的原则,设为20个。当然还可以在调试过程中根据输出的识别率来找到一个一个较为合适的个数。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值