JSL에서 아웃라인 박스 NIPALS Fit에 접근하기PLS 보고서의 맞춤 부분에 동적으로 액세스하고 싶습니다("NIPALS fit with x factor"). 아웃라인 박스(예: OutlineBox(6))의 개수나 정확한 제목을 알면 접근이 가능하다는 것을 알지만, 요소의 개수에 따라 전자의 개수가 변경될 수 있고 후자가 변경될 수 있으므로, 개요 상자에 동적으로 액세스하는 데 문제가 있습니다.
이름의 일부를 검색하여 개요 상자의 트리 위치를 얻는 방법이 있습니까?
스크립팅Re: JSL에서 개요 상자 NIPALS Fit에 액세스스니펫으로
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: JSL에서 개요 상자 NIPALS Fit에 액세스Partial Least Squares() 플랫폼에 대한 "pls" 포인터가 X 및 Y 입력에 대해 팝업되어야 할 때 손실되는 것처럼 보입니다.따라서 아래는 예제를 위해 생성될 출력 창의 이름에 대한 참조를 사용하고 언제 나타나는지 계속 확인하고 빨간색 선을 적용하는 솔루션의 실제 klug입니다.솔루션이 마음에 들지 않습니다.... 다른 커뮤니티 회원이 더 나은 솔루션을 가지고 있기를 바랍니다.
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: JSL에서 개요 상자 NIPALS Fit에 액세스@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: JSL에서 개요 상자 NIPALS Fit에 액세스xpath를 사용하여 이름으로 모든 개요 상자를 검색할 수 있습니다.
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" ) ) );