Neural Network Toolbox の Neural Net Clustering で 「関数'init'(​タイプ'double​'の入力引数)が未定​義です。」というエラ​ーが出てきたのですが​、どうすればいいでし​ょうか?

Neural Network Toolbox の Neural Net Clustering でサンプルデータの Simple Clusters を入力とし、size of two-dimensional Map を 10 にし、Train をクリックしたのですが「関数'init'(タイプ'double'の入力引数)が未定義です。」というエラーが出ました。もう一つのサンプルデータ irisInputs を入力にしても同じでした。
元々、以下のプログラムで実行したくてしたのですが、「関数 'train' (タイプ'double' の入力引数) が未定義です。」というエラーが出ました。
close all
clear variables
% Solve a Clustering Problem with a Self-Organizing Map
% Script generated by NCTOOL
%
% This script assumes these variables are defined:
%
% X - input data.
load(uigetfile('ファイル名.mat'))
X = ファイル名;
inputs = X';
% Create a Self-Organizing Map
dimension = [10 10];
step = 100;
kinbou_size = 3;
net = selforgmap(dimension,'gridtop','dist');
% net = selforgmap(dimension,step,kinbou_size,'gridtop','dist');
numClasses = 5;
kohonenLR = 0.01; %学習率
conscienceLR = 0.001; %バイアス
competlayer(numClasses,kohonenLR,conscienceLR)
% Train the Network
[net,tr] = train(net,inputs);
outputs = net(inputs);
classes = vec2ind(inputs);
% Plots
% Uncomment these lines to enable various plots.
% figure, plotsomtop(net)
% figure, plotsomnc(net)
% figure, plotsomnd(net)
% figure, plotsomplanes(net)
% figure, plotsomhits(net,inputs)
% figure, plotsompos(net,inputs)
というプログラムを実行したところ
ans =
Neural Network
name: 'Competitive Neural Layer'
userdata: (your custom info)
dimensions:
numInputs: 1
numLayers: 1
numOutputs: 1
numInputDelays: 0
numLayerDelays: 0
numFeedbackDelays: 0
numWeightElements: 5
sampleTime: 1
connections:
biasConnect: true
inputConnect: true
layerConnect: false
outputConnect: true
subobjects:
input: Equivalent to inputs{1}
output: Equivalent to outputs{1}
inputs: {1x1 cell array of 1 input}
layers: {1x1 cell array of 1 layer}
outputs: {1x1 cell array of 1 output}
biases: {1x1 cell array of 1 bias}
inputWeights: {1x1 cell array of 1 weight}
layerWeights: {1x1 cell array of 0 weights}
functions:
adaptFcn: 'adaptwb'
adaptParam: (none)
derivFcn: 'defaultderiv'
divideFcn: (none)
divideParam: (none)
divideMode: 'sample'
initFcn: 'initlay'
performFcn: 'mse'
performParam: .regularization, .normalization
plotFcns: {}
plotParams: {1x0 cell array of 0 params}
trainFcn: 'trainru'
trainParam: .showWindow, .showCommandLine, .show, .epochs,
.time
weight and bias values:
IW: {1x1 cell} containing 1 input weight matrix
LW: {1x1 cell} containing 0 layer weight matrices
b: {1x1 cell} containing 1 bias vector
methods:
adapt: Learn while in continuous use
configure: Configure inputs & outputs
gensim: Generate Simulink model
init: Initialize weights & biases
perform: Calculate performance
sim: Evaluate network outputs given inputs
train: Train network with examples
view: View diagram
unconfigure: Unconfigure inputs & outputs
関数 'train' (タイプ'double' の入力引数) が未定義です。
エラー: Untitled11 (line 30)
[net,tr] = train(net,inputs);
というエラーが出てきました。 どのファイルを入力データとして用いても同じくエラーが出てきました。 昨日までは使えたのですが、突然使えなくなりました。 再起動、再インストールは試しましたが効果なしでした。 使用しているのは、MATLAB2017a です。 どうすればいいでしょうか?

 Accepted Answer

ます、直接の要因としては
に詳しいです。どれが該当するかは少し試行錯誤が必要になりますが、4)か 5) から調査するのが良いかと。
[net,tr] = train(net,inputs);
の直前まで実行したあとで、
which train -all
which net -all
を実行してみてください。

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 25 Nov 2017

Answered:

on 27 Nov 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!