matlab 数据规格化,如何禁止神经网络模型自带的数据规格化函数功能

我已经找到了!从2007b开始的。

Automated data preprocessing and postprocessing occur during network creation in the Network/Data Manager GUI (nntool), Neural Network Fitting Tool GUI (nftool), and at the command line.

At the command line, the new syntax for using network-creation functions, automates preprocessing, postprocessing, and data-division operations.

For example, the following code returns a network that automatically preprocesses the inputs and targets and postprocesses the outputs:

net = newff(p,t,20);

net = train(net,p,t);

y = sim(net,p);

To create the same network in a previous release, you used the following longer code:

[p1,ps1] = removeconstantrows(p);

[p2,ps2] = mapminmax(p1);

[t1,ts1] = mapminmax(t);

pr = minmax(p2);

s2 = size(t1,1);

net = newff(pr,[20 s2]);

net = train(net,p2,t1);

y1 = sim(net,p2)

y = mapminmax('reverse',y1,ts1);

Default Processing Settings

The default input processFcns functions returned with a new network are, as follows:

net.inputs{1}.processFcns = ...

{'fixunknowns','removeconstantrows', 'mapminmax'}

These three processing functions perform the following operations, respectively:

fixunknowns—Encode unknown or missing values (represented by NaN) using numerical values that the network can accept.

removeconstantrows—Remove rows that have constant values across all samples.

mapminmax—Map the minimum and maximum values of each row to the interval [-1 1].

The elements of processParams are set to the default values of the fixunknowns, removeconstantrows, and mapminmax functions.

The default output processFcns functions returned with a new network include the following:

net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'}

These defaults process outputs by removing rows with constant values across all samples and mapping the values to the interval [-1 1].

sim and train automatically process inputs and targets using the input and output processing functions, respectively. sim and train also reverse-process network outputs as specified by the output processing functions.

For more information about processing input, target, and output data, see "Multilayer Networks and Backpropagation Training" in the Neural Network Toolbox User's Guide.

Changing Default Input Processing Functions

You can change the default processing functions either by specifying optional processing function arguments with the network-creation function, or by changing the value of processFcns after creating your network.

You can also modify the default parameters for each processing function by changing the elements of the processParams properties.

After you create a network object (net), you can use the following input properties to view and modify the automatic processing settings:

net.inputs{1}.exampleInput—Matrix of example input vectors

net.inputs{1}.processFcns—Cell array of processing function names

net.inputs{1}.processParams—Cell array of processing parameters

The following input properties are automatically set and you cannot change them:

net.inputs{1}.processSettings—Cell array of processing settings

net.inputs{1}.processedRange—Ranges of example input vectors after processing

net.inputs{1}.processedSize—Number of input elements after processing

Changing Default Output Processing Functions

After you create a network object (net), you can use the following output properties to view and modify the automatic processing settings:

net.outputs{2}.exampleOutput—Matrix of example output vectors

net.outputs{2}.processFcns—Cell array of processing function names

net.outputs{2}.processParams—Cell array of processing parameters

Note   These output properties require a network that has the output layer as the second layer.

The following new output properties are automatically set and you cannot change them:

net.outputs{2}.processSettings—Cell array of processing settings

net.outputs{2}.processedRange—Ranges of example output vectors after processing

net.outputs{2}.processedSize—Number of input elements after processing

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值