JSL - プラットフォーム関数内の繰り返しNames Default To Here( 1 );
// Create an Example data table
dt = currentdatatable();
// Get the names of the columns in the data table
colNames = dt << get column group( "WLS" );
nIters = 2;
Neural(
Y( :Type ),
X(eval(colNames)),
Validation Method( "KFold", 5 ),
Set Random Seed( 2 ),
for( k=1, k <= nIters, k++, Fit( NTanH ( 2 ) ) ),
);
添付のスクリプトを使用して、1 つ以上のニューラル モデルを適合させようとしています。for ループの代わりに Fit( NTanH(2)) を複数回記述すると正常に動作しますが、for ループでは動作しません。何か提案はありますか? ありがとうございます!
自動化とスクリプトデータの探索と視覚化Re: JSL - プラットフォーム関数内で繰り返すFit(NTanH()) を Neural() の外に移動できます。 以下は、スクリプト インデックスの例です。

for ループを使用したスクリプト インデックスからの修正版:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
obj = Neural(
Y(:mvalue),
X(:crim, :indus, :chas, :nox, :rooms, :age, :distance, :radial),
Set Random Seed(2)
);
For(i = 1, i <= 2, i++,
obj << Fit(NTanH(4));
);

Re: JSL - プラットフォーム関数内で繰り返すこんにちは、Jarmo、それは私が試していないオプションであり、私の問題の解決策です. 正常に動作します。 ありがとうございました!
Re: JSL - プラットフォーム関数内で繰り返すやあ、ヤルモ、以下は実際のスクリプトです。
Names Default To Here( 1 );
delete symbols();
dt = current data table();
colNames = dt << get column group("WLs");
exclColnames = dt << get excluded columns();
For( i = 1, i <= N Items( exclColnames ), i++,
Remove From( colNames, As List( Loc( colNames, exclColnames[i] ) ) )
);
rpt = New Window( "Neural of Type", dt <<
Neural(
Y( :Type ),
X( eval ( colNames ) ),
Informative Missing( 0 ),
Validation Method( "KFold", 5 ),
Set Random Seed( 2 ),
Fit( NTanH( 2 ) ),
Fit( NTanH( 2 ) ),
Fit( NTanH( 2 ) )
)
);
Wait( 0 );
rpt["Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )] <<
Make Combined Data Table;
rpt << Close Window;ただし、 Fit( NTanH(2)) を柔軟にしたい。 あなたが示した方法はここでは機能しません。次のスクリプトで解決しようとしました(最初の部分は省略しました):
obj =Neural(
Y( :Type ),
X( eval ( colNames ) ),
Informative Missing( 0 ),
Validation Method( "KFold", 5 ),
Set Random Seed( 2 ),
);
for(i=1, i<=3, i++, obj << Fit( NTanH(2)));
rpt = current window();<BR />
Wait( 0 );
rpt["Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )] <<
Make Combined Data Table;
rpt << Close Window;
しかし、次のエラー メッセージが表示されます。 )]' , rpt[/*###*/"Neural", Outline Box( 1 ), "Validation", "Type", Table Box( 1 )]". 最初のスクリプトは正常に実行されるため、このメッセージが表示される理由がわかりません。
JSL をもう少しよく理解するために、この問題の解決策を教えてください。 ありがとう!
Re: JSL - プラットフォーム関数内で繰り返すありがとう、Jarmo、それが私が探していた場所でした。 シンプルなラインですが、JSL初心者にはわかりにくい!
Re: JSL - プラットフォーム関数内で繰り返すコードは正しい参照を見つけていません。 rpt = Current Window(); を変更している可能性があります。 to rpt = Current Report() で十分ですが、参照を使用することを強くお勧めします (私の例では obj)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
obj = Neural(
Y(:mvalue),
X(:crim, :indus, :chas, :nox, :rooms, :age, :distance, :radial),
Set Random Seed(2),
<< Fit(NTanH(4)),
<< Fit(NTanH(4)),
<< Fit(NTanH(4))
);
For(i = 1, i <= 2, i++,
obj << Fit(NTanH(4));
);
Report(obj)[Outline Box("Neural")][Outline Box("Training")][Table Box(1)] << Make Combined Data Table;