cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-600498%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EAdattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-600498%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CSTRONG%3EPanoramica%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECome%20posso%20verificare%20se%20un%20adattamento%20non%20lineare%20%C3%A8%20riuscito%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E(I%20dati%20reali%20non%20sempre%20convergono%20e%20potrebbero%20richiedere%20una%20revisione%20manuale%20per%20problemi%20di%20automazione%2Ftest%2Fprodotto.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EDettaglio%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EVorrei%20scrivere%20una%20risposta%20dopo%20che%20un%20adattamento%20non%20lineare%20non%20riesce%20a%20convergere.Se%20l'adattamento%20fallisce%2C%20devo%20elaborare%20in%20un%20altro%20modo%20e%2Fo%20eventualmente%20etichettare%20per%20la%20revisione%20manuale.%20(Sto%20campionando%20una%20popolazione%2C%20quindi%20per%20ogni%20parte%2C%20eseguendo%20un%20adattamento%20non%20lineare.Generalmente%20se%20fallisco%20la%20convergenza%2C%20c'era%20un%20problema%20di%20test%20da%20qualche%20parte%3B%20In%20realt%C3%A0%20non%20voglio%20allentare%20i%20criteri%20di%20convergenza.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(messaggio%20%22fallito%22%3A%20%22fallito%3A%20impossibile%20ridurre%20la%20funzione%20obiettivo%22)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F50091i16B5465CA55A7137%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Nonlinear%20Fail%20Screenshot.png%22%20alt%3D%22Nonlinear%20Fail%20Screenshot.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScript%20modificato%20solo%20da%20derivati%20numerici%20(Guida%20%26gt%3B%20Indice%20script%20%26gt%3B%20%22%26lt%3B%3CNON%20lineare%3D%22%22%3E%3C%2FNON%3E%3C%2FP%3E%3CP%3E(Attualmente%20in%20esecuzione%20JMP%2015.2.1)%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%0A%20%22%24SAMPLE_DATA%2FNonlinear%20Examples%2FUS%20Population.jmp%22%0A)%3B%0A%0A%2F%2F%20Random%2C%20intentionally%20divergent%2C%20formula%20on%20this%20dataset%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%20%22Random%22%2C%20Numeric%2C%20Formula(%20Random%20LogLogistic(5)%20)%20)%3B%0A%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%20%22FancyPredictionFormula%22%2C%0A%20Numeric%2C%0A%20Continuous%2C%0A%20Formula(%0A%20%20Parameter(%0A%20%20%20%7BRth0%20%3D%20735%2C%20n%20%3D%200.5%7D%2C%0A%20%20%20(%3Ayear%20%2F%20%3Apop)%20*%20((1%20-%20((n%20-%201)%20*%20%3Apop%20*%20Rth0)%20%2F%20(%3Ayear%0A%20%20%20%20*%20(300%20%2F%20%3Ayear)%20%5E%20n))%20%5E%20(-1%20%2F%20(n%20-%201))%20-%201)%0A%20%20)%0A%20)%0A)%3B%0A%0Anonlinear%20%3D%20dt%20%26lt%3B%26lt%3B%20Nonlinear(%0A%20Y(%20%20%3AName(%20%22Random%22%20)%20)%2C%0A%20X(%20%3AName(%22FancyPredictionFormula%22)%20)%2C%0A%20Expand%20Intermediate%20Formulas(%201%20)%2C%0A%20Numeric%20Derivatives%20Only(%201%20)%2C%0A%20QuasiNewton%20SR1%2C%0A%20Interation%20Limit(50)%2C%0A%20Finish%2C%0A%20Plot(%200%20)%2C%0A%20Confidence%20Limits%2C%0A%20Save%20Estimates%0A)%3B%0A%0A%2F%2F%20How%20to%20check%20if%20nonlinear%20fit%20succeeded%3F%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3EIdeale.%3C%2FU%3E%3C%2FP%3E%3CP%3ESe%20esiste%20una%20variabile%20di%20stato%20bool%20restituita%20dalla%20piattaforma%20di%20adattamento%20non%20lineare%20da%20qualche%20parte%20che%20indica%20il%20successo%20o%20il%20fallimento%2C%20credo%20che%20sarebbe%20il%20metodo%20ideale%20per%20verificare%20il%20successo.%3C%2FP%3E%3CP%3E%3CU%3Ealternativa%201.%3C%2FU%3E%3C%2FP%3E%3CP%3EPosso%20anche%20tabulare%20o%20fare%20un%20riepilogo%20dei%20dati%20per%20vedere%20se%20tutti%20i%3CFONT%20face%3D%22verdana%2Cgeneva%22%3E%20%3A%3CFONT%20color%3D%22%230000FF%22%3E%20Nome%3C%2FFONT%3E%20(%3CFONT%20color%3D%22%23993366%22%3E%20%22Formula%20Previsione%20Fantasia%22%3C%2FFONT%3E%20)%3C%2FFONT%3E%20i%20valori%20sono%20zero.(I%20valori%20sembrano%20essere%200%20se%20l'adattamento%20fallisce).%3C%2FP%3E%3CP%3E%3CU%3EAlternativa%202.%20%3C%2FU%3E%3C%2FP%3E%3CP%3EProbabilmente%20c'%C3%A8%20un%20modo%20per%20controllare%20l'XML%20e%20leggere%20il%20messaggio%20%22fallito%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrazie%20per%20il%20vostro%20tempo%20e%20considerazione.%3C%2FP%3E%3CP%3E-Aubrey%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-600498%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EScripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-600622%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Adattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-600622%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20un%20approccio%20che%20utilizza%20l'alternativa%202a%20(raschiando%20le%20parole%20dal%20rapporto).%20Le%20prime%202%20righe%20svolgono%20il%20lavoro%20effettivo%20e%20la%20terza%20riga%20%C3%A8%20solo%20un%20semplice%20esempio%20di%20cosa%20fare%20con%20le%20informazioni%3B%20probabilmente%20hai%20qualcos'altro%20in%20mente%20per%20questa%20parte.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20How%20to%20check%20if%20nonlinear%20fit%20succeeded%3F%0Ar%20%3D%20nonlinear%20%26lt%3B%26lt%3B%20report%3B%0Aalltext%20%3D%20r%5BOutline%20Box(%22Control%20Panel%22)%5D%20%26lt%3B%26lt%3B%20get%20text%3B%0Aif%20(contains(alltext%2C%20%22Cannot%20Decrease%22)%2C%20caption%20(%22Failed%3A%20Cannot%20Decrease%20...%22))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-600846%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Adattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-600846%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EQuesto%20lo%20far%C3%A0.Grazie%20Jed!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601016%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Adattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601016%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMi%20chiedo%20se%20un%20controllo%20migliore%20sia%20se%20il%20testo%20%C3%A8%20qualcosa%20di%20diverso%20dal%20successo%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Not(%20Contains(%20alltext%2C%20%22Converged%22%20)%20)%2C%0A%20%2F%2F%20trap%20failure%0A%20%2C%0A%20%2F%2F%20proceed%20after%20success%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601121%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Adattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601121%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESei%20pi%C3%B9%20vicino%20a%20dove%20mi%20sto%20dirigendo.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eho%20lavorato%20con%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eif%20(contains(alltext%2C%20%22Failed%22)%2C%20caption%20(%22Failed%3A%20Do%20additional%20action%20now%20...%22))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ECome%20cattura%20tutto%2C%20ma%20sto%20considerando%20di%20aggiungere%20pi%C3%B9%20di%20un'istruzione%20case%20(o%20immagino%20pi%C3%B9%20%22se%22)%2C%20per%20gestire%20in%20modo%20specifico%20il%20motivo%20dell'errore.%3CCODE%20class%3D%22%20language-jsl%22%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3Ead%20esempio%2C%20posso%20eseguire%20di%20nuovo%20con%20un%20numero%20di%20iterazioni%20pi%C3%B9%20elevato%20se%20rilevo%20questo%20motivo%20di%20errore%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Econtains(alltext%2C%20%22Maximum%20Iteration%20Exceeded%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELa%20vera%20motivazione%20%C3%A8%20che%20%22la%20maggior%20parte%22%20delle%20parti%20converger%C3%A0%20con%20un%20approccio%20numerico%2C%20ma%20alcune%20sembrano%20richiedere%20analisi.Non%20sono%20sicuro%20di%20cosa%20stia%20succedendo%20per%20causare%20questo.Criteri%20di%20convergenza%3FMa%20la%20%22correzione%22%20%C3%A8%20eseguire%20di%20nuovo%20senza%20derivate%20numeriche%2C%20qualcosa%20del%20tipo%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enonlinear%20%3D%20dt%20%26lt%3B%26lt%3B%20Nonlinear(%0A%20Y(%20%20%3AName(%20%22Random%22%20)%20)%2C%0A%20X(%20%3AName(%22FancyPredictionFormula%22)%20)%2C%0A%20Expand%20Intermediate%20Formulas(%201%20)%2C%0A%20Newton%2C%0A%20Finish%2C%0A%20Plot(%200%20)%2C%0A%20Confidence%20Limits%2C%0A%20Save%20Estimates%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EDopo%20aver%20catturato%20con%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Econtains(alltext%2C%20%22Cannot%20Decrease%20Objective%20Function%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601522%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Adattamento%20non%20lineare%20-%20Come%20verificare%20il%20successo%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601522%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIl%20solito%20colpevole%20dietro%20la%20mancata%20convergenza%20sono%20i%20valori%20dei%20parametri%20iniziali.%20Spesso%20%C3%A8%20sufficiente%20utilizzare%20l'euristica%20specifica%20del%20dominio%20per%20inizializzarli%20quando%20disponibili.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
AApperson
Level II

Nonlinear Fit - How to check for success?

Overview:

How can I check to see a Nonlinear fit succeeded?

(Real-data doesn't always converge and may need manual review for automation/test/product issues.)

 

Detail:

I would like to script a response after a nonlinear fit fails to converge.  If the fit fails, I need to process another way, and/or eventually label for manual review. (I'm sampling a population, then for each part, doing a non-linear fit.  Generally if I fail convergence, there was a test issue somewhere; I don't actually want to loosen the convergence criteria.)

 

('Failed' message: "Failed: Cannot Decrease Objective Function")

Nonlinear Fail Screenshot.png

 

Modified script from Numeric Derivatives Only (Help > Scripting Index > "<<Nonlinear")

(Currently running JMP 15.2.1)

Names Default To Here( 1 );
dt = Open(
	"$SAMPLE_DATA/Nonlinear Examples/US Population.jmp"
);

// Random, intentionally divergent, formula on this dataset
dt << New Column( "Random", Numeric, Formula( Random LogLogistic(5) ) );

dt << New Column( "FancyPredictionFormula",
	Numeric,
	Continuous,
	Formula(
		Parameter(
			{Rth0 = 735, n = 0.5},
			(:year / :pop) * ((1 - ((n - 1) * :pop * Rth0) / (:year
			 * (300 / :year) ^ n)) ^ (-1 / (n - 1)) - 1)
		)
	)
);

nonlinear = dt << Nonlinear(
	Y(  :Name( "Random" ) ),
	X( :Name("FancyPredictionFormula") ),
	Expand Intermediate Formulas( 1 ),
	Numeric Derivatives Only( 1 ),
	QuasiNewton SR1,
	Interation Limit(50),
	Finish,
	Plot( 0 ),
	Confidence Limits,
	Save Estimates
);

// How to check if nonlinear fit succeeded?

 

 

 

Ideal.

If there is a bool status variable returned by the Nonlinear fit platform somewhere indicating success or failure, that would be the ideal method to verify success, I think.

Alternative 1.

I can also tabulate or take a summary of the data to see if all the :Name("FancyPredictionFormula") values are zero.  (Values seem to be 0 if the fit fails). 

Alternative 2.

There's probably a way to check the XML and read the 'failed' message. 

 

Thank you for your time and consideration.

-Aubrey

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Nonlinear Fit - How to check for success?

Here's an approach using Alternative 2a (scraping the words from the report). The first 2 lines do the actual work, and the third line is just a simple example of what to do with the information; you likely have something else in mind for this part.

 

// How to check if nonlinear fit succeeded?
r = nonlinear << report;
alltext = r[Outline Box("Control Panel")] << get text;
if (contains(alltext, "Cannot Decrease"), caption ("Failed: Cannot Decrease ..."));

View solution in original post

5 REPLIES 5

Re: Nonlinear Fit - How to check for success?

Here's an approach using Alternative 2a (scraping the words from the report). The first 2 lines do the actual work, and the third line is just a simple example of what to do with the information; you likely have something else in mind for this part.

 

// How to check if nonlinear fit succeeded?
r = nonlinear << report;
alltext = r[Outline Box("Control Panel")] << get text;
if (contains(alltext, "Cannot Decrease"), caption ("Failed: Cannot Decrease ..."));
AApperson
Level II

Re: Nonlinear Fit - How to check for success?

That'll do it.  Thanks Jed!

Re: Nonlinear Fit - How to check for success?

I wonder if a better check is if the text is anything other than success:

 

If( Not( Contains( alltext, "Converged" ) ),
	// trap failure
	,
	// proceed after success
);
AApperson
Level II

Re: Nonlinear Fit - How to check for success?

You are closer to where I am heading with it.

 

I've been working with:

 

if (contains(alltext, "Failed"), caption ("Failed: Do additional action now ..."));

As a catch all, but I'm considering adding more of a case statement (or I guess multiple 'ifs'), to specifically handle the fail reason.

e.g. I can run again with a higher iteration count if I catch this fail-reason:

 

contains(alltext, "Maximum Iteration Exceeded");

 

The real motivation is, 'most' parts will converge with a numerical approach, but some seem to require analytical.  I'm not sure what's happening to cause this.  Convergence criteria?  But the 'fix' is to run again without numerical derivatives, something like:

nonlinear = dt << Nonlinear(
	Y(  :Name( "Random" ) ),
	X( :Name("FancyPredictionFormula") ),
	Expand Intermediate Formulas( 1 ),
	Newton,
	Finish,
	Plot( 0 ),
	Confidence Limits,
	Save Estimates
);

After catching with:

contains(alltext, "Cannot Decrease Objective Function");

Re: Nonlinear Fit - How to check for success?

The usual culprit behind failing to converge is the starting parameter values. It is often sufficient to use domain-specific heuristics to initialize them when available.