동일한 스크립트를 사용하여 다른 데이터에 성능 저하 모델을 맞출 수 있도록 성능 저하 스크립트를 자동화하려고 합니다.
저는 현재 Fit Model을 사용하여 원하는 모델을 내 데이터에 맞출 수 있었고 매개변수를 열 행렬로 얻었습니다.
그런 다음 열화 모델의 초기 값에 행렬을 입력하려고 했지만 모든 매개변수가 변경되지 않은 상태로 모델만 출력됩니다. 행렬을 매개변수 값으로 입력할 수 있는 방법이 있습니까? 아래 스크립트의 초기 값을 저하 스크립트에 입력할 수 있습니다.
Degradation(
Y( :"Output/mV"n ),
Time( :Time in hours ),
Label( :Unit ID ),
Application( Repeated Measures Degradation ),
Connect Data Markers( 1 ),
Show Fitted Lines( 1 ),
Show Spec Limits( 1 ),
Show Median Curves( 0 ),
Show Legend( 0 ),
No Tab List( 0 ),
Set Upper Spec Limit( . ),
Set Lower Spec Limit( . ),
Set Censoring Time( . ),
Show Residual Plot( 1 ),
Show Inverse Prediction Plot( 1 ),
Inverse Prediction Interval( No Interval ),
Inverse Prediction Alpha( 0.05 ),
Path Specifications(
Nonlinear Path(
Add Formula(
Formula Name( "Model" ),
Formula(
Parameter(
{a = 200, b = -0.00007},
a[Unit ID] * Exp( b[Unit ID] * Time in hours )
),
),<BR />//Trying to enter my matrix of parameters into the model
Initial Values(A_para),
Fitting Method( QuasiNewton BFGS ),
),
Select Formula( "Model" )
),
Run Model( "Model" )
),
Nonlinear Path( 1 ),
Mean Path( 1 ),
SendToReport(
Dispatch(
{"Overlay", "Output/mV Residuals by Time in hours"},
"7",
ScaleBox,
{Min( -80 ), Max( 210 ), Inc( 50 ), Minor Ticks( 4 )}
),
Dispatch(
{"Overlay", "Output/mV Residuals by Time in hours"},
"13",
ScaleBox,
{Min( -80 ), Max( 210 ), Inc( 50 ), Minor Ticks( 4 )}
),
Dispatch(
{"Overlay", "Model Specification"},
"Empty",
TextEditBox,
{Fixed Size( 1, 100, 19 ), Set Text( "Model" )}
),
)
);obj = Fit Curve(
Y( :"Output/mV"n ),
X( :Time in hours ),
Group( :Unit ID ),
);
//Currently this is using a slighlty different fitting method to the one used by the degredation platform
obj << Fit Exponential 2P;
//Next I want to create the table of parameter estimates
dt_p = obj << (Fit[1] << Make Parameter Table);
//Now create a single column matrix of the parameter estimates
col_scale = Column( dt_p, "Scale" );
col_growth = Column( dt_p, "Growth Rate" );
A_scale = col_scale << Get As Matrix;
A_growth = col_growth << Get As Matrix;
A_para = A_scale |/ A_growth;
//Put values into a column to check I've done it right
dt_temp = Data Table( "Stacked and Transposed New Dates Raw Data" );
col_p = dt_temp << New Column( "Parameters" );
col_p << Set Values(A_para);
현재 성능 저하 플랫폼은 원하는 방식으로 행렬의 명명된 변수를 사용할 수 없습니다.
해결 방법은 표현식을 구성한 다음 평가하는 것입니다.
이미 행렬이 있다고 가정합니다.
A_para = [....];
초기 값을 보유합니다.
해결 방법은 다음과 같은 표현식을 구성하는 것입니다.
code = expr(Degradation(
Initial Values(
A_para
),
Fixed(
....
)
));
이제 A_para라는 이름을 다음과 같이 실제 행렬로 바꿉니다.
substitute into(code, expr(A_para), A_para);
마지막으로 다음과 같이 코드를 실행합니다.
eval(code);
입력된 초기 값을 그대로 사용하려면 Fixed 절에 1의 행렬을 할당해야 한다고 생각합니다.
어떻게 되는지 알려주세요.