【问题标题】:How to find the predicted input from new output after I trained my neural network?训练神经网络后如何从新输出中找到预测输入?
【发布时间】:2021-03-15 08:29:31
【问题描述】:

我有一个大型数据集,用于训练神经网络。现在我想在新的输出上使用它,是否可以得到这个输出的输入预测?

模型脚本如下:

    % Solve an Input-Output Fitting problem with a Neural Network

    % This script assumes these variables are defined:
% '''''''''''''''''''''''''''''''''''''''''''''''''
    data - input data.
    data_1 - target data.

    x = data';
    t = data_1';


    trainFcn = 'trainlm';  % Levenberg-Marquardt backpropagation.
% ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    % Create a Fitting Network
    hiddenLayerSize = 10;
    net = fitnet(hiddenLayerSize,trainFcn);

    % Setup Division of Data for Training, Validation, Testing
    net.divideParam.trainRatio = 70/100;
    net.divideParam.valRatio = 15/100;
    net.divideParam.testRatio = 15/100;

    % Train the Network
    [net,tr] = train(net,x,t);
% ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    % Test the Network`  data - input data.
    data_1 - target data.

    x = data';
    t = data_1';


    trainFcn = 'trainlm';  % Levenberg-Marquardt backpropagation.

    % Create a Fitting Network
    hiddenLayerSize = 10;
    net = fitnet(hiddenLayerSize,trainFcn);

    % Setup Division of Data for Training, Validation, Testing
    net.divideParam.trainRatio = 70/100;
    net.divideParam.valRatio = 15/100;
    net.divideParam.testRatio = 15/100;

    % Train the Network
    [net,tr] = train(net,x,t);

    % Test the Network
    y = net(x);
    e = gsubtract(t,y);
    performance = perform(net,t,y)

    view(net)`
    y = net(x);
    e = gsubtract(t,y);
    performance = perform(net,t,y)
    view(net)

我想插入新的输出并预测可能的输入。我该怎么做?

【问题讨论】:

  • 为了清楚起见,您是否混淆了您的术语?您想使用新的 input 来预测 output,而不是相反
  • @adriaan 不,我不困惑,我想知道我的输出的最佳输入条件是什么。

标签: matlab neural-network training-data


【解决方案1】:

你可以模拟你的网络

output = sim(net,input)

【讨论】:

  • 谢谢,但我的目的是找到我的输入的最佳组合(我想要的输出的最佳输入值)
  • @SaedRawash 实际上很令人困惑。介意解释吗?我的意思是,制作神经网络的全部目的是与你所说的相反。您提供输入,因此“查找”输入是没有意义的,同样,根据单词的定义,它是您提供给算法的内容,而不是算法搜索的内容。愿意进一步解释你在做什么?
猜你喜欢
  • 1970-01-01
  • 2020-12-18
  • 2018-09-27
  • 2017-08-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-17
  • 1970-01-01
相关资源
最近更新 更多