Come usare JSL per trovare l'intervallo di variabili X per soddisfare il limite di specifica correggendo altre variabili in Prediction Profiler?Ciao esperti JSL,
Ho un modello DoE OLS o REML con profiler di previsione come quello di seguito. Come posso trovare tutti gli intervalli di variabili X per soddisfare LSL e USL automaticamente con JSL correggendo altre variabili? Ad esempio, X1 deve essere inferiore a 34,6 per soddisfare le specifiche. Grazie mille per il tuo aiuto.

Esplorazione e visualizzazione dei datiRi: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?JMP 17 ha introdotto il profilatore dello spazio di progettazione per determinare le distanze operative in questo tipo di situazione. Un buon motivo per aggiornare a 17 se non l'hai già fatto.
Se hai davvero bisogno della particolare soluzione JSL che hai descritto, si spera che qualcuno con competenze JSL migliori di me possa intervenire.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Grazie @Ross_Metusalem , al momento stiamo utilizzando JMP 16. Speriamo di poter passare presto a 17.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Nel frattempo, puoi usare il Funzionalità di simulazione nel Prediction Profiler per questo scopo.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?@Mark_Bailey puoi darmi qualche suggerimento su come ottenere l'intervallo usando la simulazione nel Prediction Profiler? Grazie mille.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Hai studiato la sezione Aiuto che ho citato?
È necessario specificare prima i limiti di risposta per determinare la funzione di desiderabilità per valutare l'idoneità dell'intervallo di fattori.
Aprire il simulatore nel Prediction Profiler. Tutti i livelli dei fattori sono fissati all'inizio. Cambia X1 per variare in modo casuale come previsto sotto il controllo del processo. Specifica anche la variazione casuale della risposta. La simulazione visualizzerà un istogramma per darti un'idea dell'idoneità della trasmissione dell'errore da X1 alla risposta. La tabella di simulazione fornirà informazioni dettagliate.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?CIAO @Mark_Bailey , ho seguito il link che hai condiviso, posso trovare manualmente il tasso di difetto inferiore al 5% per ogni variabile X. Poiché ho così tanti modelli e variabili, voglio trovare un modo per automatizzare questo processo senza farlo uno per uno. Ci vorrà così tanto tempo. È possibile farlo in JSL?
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Sì, puoi scrivere il Profiler e il simulatore che fornisce. Vedere Guida > Indice script > Oggetti > Profiler e simulatore.

Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?@Mark_Bailey Ho terminato la simulazione per i parametri e ho già raccolto tutti i risultati della simulazione. Fantastico!!!Grazie mille per il vostro aiuto.
L'unica sfida per me è ottenere il termine valore dallo script del modello. Quello che ho usato è cercare "{Profiler(" e poi "Term Value" per ottenere tutti i termini in un elenco, quindi simulare. Il termine valore ha numeri e caratteri, alcuni con "xxxx"n, altri no, è piuttosto difficile creare codice per tutti i diversi casi. Hai un modo semplice per ottenere il valore del termine dal modello DoE?
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Di " ottieni il valore del termine dallo script del modello", intendi la stima del parametro nello script della tabella del modello? Hai salvato uno script di tabella per il modello?
Le stringhe di caratteri possono essere utilizzate per i nomi. Alcuni caratteri non sono consentiti nei nomi. L'uso di nomi impropri richiede una soluzione.
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?@Mark_Bailey Di seguito è riportato uno dei miei esempi. Ho bisogno di un codice generico che deve leggere gli script dal modello di gruppo Fit e quindi ottenere il valore del termine in un elenco di fattori. Una volta che avrò l'elenco, confronterò con il nome della colonna nella tabella dei dati per determinare che sono numeri o caratteri in modo da poter creare il mio codice di simulazione.L'ultima parte è il mio codice, ma è troppo complicato e non funzionerà se ci sono più Term Value nel profiler. Quindi è meglio lasciare attivo solo Profiler.Mi chiedo se hai un modo più semplice per finire lo stesso compito? Grazie mille per il vostro aiuto.
factors = {"ELONG", "HARDNESS(+/-0.2)", "ABRASION For example (%)", "MODULUS"}Questo è lo script di un modello di esempio:
Fit Group(
Fit Model(
Y( :"SILICA (%)"n ),
Effects( :ELONG, :"HARDNESS(+/-0.2)"n ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:"SILICA (%)"n << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SILANE Value ),
Effects(
:"ABRASION For example (%)"n, :MODULUS, :ELONG, :"HARDNESS(+/-0.2)"n,
:MODULUS * :ELONG
),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) ),
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:SILANE Value << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SULFUR ),
Effects( :ELONG ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value( ELONG( 417.5, Lock( 0 ), Show( 1 ) ) )
),
:SULFUR << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
<<{Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
<FONT color="#0000FF"> ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) ),
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) )</FONT>
)
)}
);Questo è il mio codice per creare un elenco di fattori:
Names Default To Here( 1 );
dt = Current Data Table();
curep = Current Report();
dtname = dt << Get Name;
//Check how many prediction profiles, if >1 it's fit group, =1 it's fit model
pred_objs = curep << XPath( "//OutlineBox[ contains( text(), 'Prediction Profile' ) ]" );
num_objs = N Items( pred_objs );
If( num_objs < 1,
Throw( "No prediction profile is found!" )
);
If( num_objs == 1,
textind = "Profiler(",
textind = "{Profiler("
);
//Read the Model Term list
modelobj = curep[Outline Box( 1 )] << get scriptable object;
modeltext = Char( modelobj << get script );
//Show( modeltext );
posA = Contains( modeltext, textind );
termstext = Right( modeltext, Length( modeltext ) - posA + 1 );
/*Show( termstext );*/
posB = Contains( termstext, "Term Value" );
posC = Contains( termstext, "Show(1))", -1 );
termvalue = Left( termstext, posC + 7 ) || ","; //Make sure all terms end with )),
termvalue = Right( termvalue, Length( termvalue ) - posB - 10 );
/*Show( termvalue );
Show( posB );
Show( posC );
Show( posD );*/
//Check how many factors or main effects in the final model
words = Words( termvalue, "," );
termnum = 0;
For( i = 1, i <= N Items( words ), i++,
If( Contains( words[i], "Show" ),
termnum = termnum + 1
)
);
//Get the term with default value
term list = {};
For( k = 1, k <= termnum, k++,
//show(firstpos);
pos1 = Contains( termvalue, "))," ) + 3;
term1 = Left( termvalue, pos1 );
//show(term1);
termvalue = Right( termvalue, Length( termvalue ) - pos1 );
//show(termvalue);
Insert Into( term list, term1 );
);
Show( term list );
//get term name without default value
factors = {};
For( k = 1, k <= N Items( term list ), k++,
termK = term list[k];
firstchar = Left( termK, 1 );
If( firstchar == "\!"",
pos2 = Contains( termK, "\!"", -1 );
term2 = Left( termK, pos2 + 1 );
,
pos2 = Contains( termK, "(" ); //Categorical terms cannot have "()" in the column name
term2 = Left( termK, pos2 - 1 );
);
Insert Into( factors, char(parse(term2)) );
);
Show( factors );
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Penso che ci sia un approccio più elegante e robusto. Vedere la fine di questo esempio per l'approccio a cui sto pensando.
Names Default to Here( 1 );
// JMP Pro 16.2
// start with example of a model script
model = Expr(
Fit Group(
Fit Model(
Y( :"SILICA (%)"n ),
Effects( :ELONG, :"HARDNESS(+/-0.2)"n ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:"SILICA (%)"n << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SILANE Value ),
Effects(
:"ABRASION For example (%)"n, :MODULUS, :ELONG, :"HARDNESS(+/-0.2)"n,
:MODULUS * :ELONG
),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) ),
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:SILANE Value << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SULFUR ),
Effects( :ELONG ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value( ELONG( 417.5, Lock( 0 ), Show( 1 ) ) )
),
:SULFUR << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
<<{Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) ),
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) )
)
)}
);
);
// last argument is in-line message send for Profiler
last = N Arg( model );
profilerExpr = Arg( model, last );
// unwrap Send() and its list argument
profilerExpr = Arg( profilerExpr, 1 )[1];
// find term values
termVals = Associative Array();
termExpr = Arg( profilerExpr, 3 );
nArgs = N Arg( termExpr );
For( i = 1, i <= nArgs, i++,
Insert Into( termVals,
Char( Head( Arg( termExpr, i ) ) ),
Arg( Arg( termExpr, i ), 1 )
)
);
// use resulting dictionary for term values
Show( termVals );Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?Quello che mostri alla fine come valore desiderato della variabile str È non una stringa.
Come userai str nella tua sceneggiatura? Sarà un argomento per una funzione?
Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?@Mark_Bailey str è solo un nome di variabile, durante il mio codice qui sotto ho effettivamente usato random_sim e responses_sim, cambiando queste due variabili nel mio ciclo for, posso simulare tutti i fattori una volta alla volta. Il codice che ho usato prima per estrarre Y e Term Value ha "\! nella stringa, ma il tuo modo di estrarre l'argomento non ha "\!, che è l'unica differenza.
simu model script = Parse(
Eval Insert(
"\[
simobj << Simulator(
1,
Factors( ^random_sim^),
Responses( ^responses_sim^ ),
Resimulate
);
]\"
)
);
Show( simu model script );
Eval( simu model script );Ri: Come utilizzare JSL per trovare l'intervallo di variabili X per soddisfare il limite delle specifiche fissando altre variabili in Prediction Profiler?@Mark_Bailey La tua soluzione è ottima e molto più semplice della mia. Grazie mille per il vostro aiuto.
Ma ho un altro problema con questo metodo. Mi puoi aiutare?
factors = {"Kilometer (kg)"n, "Temperature (ºC)"n};
responses_sim = "";
values = {1.23,2.34};
for (i=1, i<=N Items(factors), i++,
responses_sim = responses_sim || factors[i] || "<< Add Random Noise(" || char(values[i]) || "),"
);
show(responses_sim);
responses_sim = "Kilometer (kg)<< Add Random Noise(1.23),Temperature (ºC)<< Add Random Noise(2.34),";
<BR /><FONT face="arial black,avant garde" size="5"><STRONG>I want to get this result below, how to do it?</STRONG></FONT>
responses_sim = "Kilometer (kg)"n << Add Random Noise(1.23), "Temperature (ºC)"n << Add Random Noise(2.34),"