JSLのアウトラインボックスNIPALSフィットへのアクセスPLS レポートのフィット部分に動的にアクセスしたい (「NIPALS fit with x factor」)。 アウトラインボックスの番号(例えば、OutlineBox(6))または正確なタイトルがわかればアクセスできることはわかっていますが、要素の数によって前者の番号と後者の番号が変わる可能性があるため、アウトライン ボックスに動的にアクセスするのに問題があります。
名前の一部を検索して、アウトライン ボックスのツリー位置を取得する方法はありますか?
スクリプティングRe: アウトラインボックスへのアクセス NIPALS Fit in JSLスニペットで
mywind=Window() << Get Window Title;
pls_wind = {};
For( i = 1, i <= N Items( mywind ), i++,
If( Contains( mywind[i], "Partial Least Squares"),
Insert Into( pls_wind, mywind[i] )
)
);
ob = Window( pls_wind[1] ) << XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");PLS ウィンドウにアクセスしてメッセージを送信できるので、うまくいっているようです。
Re: アウトラインボックスへのアクセス NIPALS Fit in JSLPartial Least Squares() プラットフォームへの「pls」ポインタが、X および Y 入力のためにポップアップする必要があるときに失われたように見えます。以下は、この例で生成される出力ウィンドウの名前への参照を使用し、それがいつ表示されるかを確認し続け、赤い線を適用するソリューションの実際のクルージです。私は解決策が好きではありません....他のコミュニティメンバーがより良い解決策を持っていることを願っています.
Names Default To Here( 1 );
dt = Open( "$Sample_data/iris.jmp" );
pls = Partial Least Squares(
Validation Method( KFold( 7 ), Initial Number of Factors( 3 ) ),
Fit( Method( NIPALS ), Number of Factors( 3 ) ),
Fit( Method( NIPALS ), Number of Factors( 2 ) )
);
ob = "";
counter = 0;
While( ob == "",
Wait( 5 );
ob = Try( Window( "iris - Partial Least Squares of Petal width" ) << XPath( "//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]" ), "" );
Try( ob[1] << Prepend( Spacer Box( size( 800, 5 ), color( "red" ) ) ) );
);
Re: アウトラインボックスへのアクセス NIPALS Fit in JSL@ih : 私の例であなたの方法を試すと、エラー メッセージが表示されます。

私はPLSを使用して呼び出しています
pls = Partial Least Squares(
Validation( :Validation ),
Initial Number of Factors( 15 ),
Centering( 0 ),
Scaling( 0 ),
Fit(
Method( NIPALS ),
Distance Plots( 1 ),
Diagnostics Plots( 1 ),
Overlay Loadings Plots( 1 ),
VIP vs Coefficients Plots( 1 ),
T Square Plot( 1 ),
Correlation Loading Plot( 2 ),
Overlay Coefficients Plots( 1 )
)
);
X と Y の入力を求める PLS ダイアログが必要だからです。
Re: アウトラインボックスへのアクセス NIPALS Fit in JSLxpath を使用して、すべてのアウトライン ボックスを名前で検索できます。
pls report << XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");例:
names default to here(1);
dt = Open( "$Sample_data/iris.jmp" );
pls = Partial Least Squares(
Y( :Petal width ),
X( :Sepal length, :Sepal width, :Petal length ),
Validation Method( KFold( 7 ), Initial Number of Factors( 3 ) ),
Fit( Method( NIPALS ), Number of Factors( 3 ) ),
Fit( Method( NIPALS ), Number of Factors( 2 ) )
);
//get all matching outline boxes:
ob = pls << XPath("//OutlineBox[ contains( text(), 'NIPALS Fit with' ) ]");
//Reference the first match:
ob[1] << Prepend ( Spacer Box( size( 800, 5 ), color( "red" ) ) );