?
Current Path : /usr/share/emacs/24.3/lisp/calc/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/calc/calc-nlfit.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:45 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/calc/calc-nlfit.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require calc-arith calcalg3] 2) #@70 Return the parameters A and B for the best least squares fit y=a+bx. (defalias 'math-nlfit-least-squares #[(xdata ydata &optional sdata sigmas) "G\n\203 \306\307\n\"\202 \310 \311\"\n\203 \312\202 \312\211\312\211\313\203\274 @@@\314 \203L \315\"\202N \"\314\203a \315\"\202c \"\314\203z \315\316\211\"\"\202 \316\211\"\"\314\203\227 \315\316\"\"\202\235 \316\"\"\n\203\255 \314\f\315\311\"\"+AAA\202+ \317\316\f\"\316 \211\"\"\315\317\316\"\316 \"\"\"\315\317\316\f\"\316 \"\"\"\203.\315\"\320\315 \"!\315\f\" !\321\322!!E\321\322!E\323\211! E\323 EEE+\2023D.\n\207" [xdata n sdata s2data S Sx mapcar calcFunc-sqr make-list 1 0 nil math-add math-div math-mul math-sub math-neg sdev calcFunc-sqrt vec Sy Sxx Sxy D ydata s y x B A sigmas C22 C12 C11] 8 (#$ . 631)]) (defalias 'math-nlfit-get-rates-from-cumul #[(tdata qdata) "\303\304A@@\"\304 A@ @\"\"CG\305V\203J \306\307\310\303\304\3058A@\"\304\305 8 A@\"\"\303\304A@@\"\304 A@ @\"\"\"\"\nBA\211\202 \303\304A@@\"\304 A@ @\"\"\nB\311\n!)\207" [qdata tdata pdata math-div math-sub 2 math-mul (float 5 -1) math-add reverse] 10]) (defalias 'math-nlfit-get-cumul-from-rates #[(tdata pdata q0) "C\nA\203+ \304 @\305\211\306\304\nA@\n@\"\"\307A@@\"\"\" B\nAA\202 \310 !)\207" [q0 qdata pdata tdata math-add math-mul (float 5 -1) math-sub reverse] 8]) (defalias 'math-nlfit-find-qmax #[(qdata pdata tdata) "\306\307 #\310\n\"\311 @ A\"\312\307\fA@\f@\"!\313 \"\203, \314\315 \"\202. ,\207" [pdata qdata ratios tdata lsdata qmax math-map-binop math-div math-nlfit-least-squares math-max-list math-neg math-lessp math-add (float 5 -1) a] 4]) (defalias 'math-nlfit-find-logistic-parameters #[(qdata pdata tdata) "\306 \n#\307\310\"\311\n\f\"\312 @! A@E+\207" [qdata pdata tdata a newqdata bandc math-nlfit-find-qmax mapcar #[(q) "\302\303\304 \"\305\"!\207" [a q calcFunc-ln math-sub math-div 1] 5] math-nlfit-least-squares calcFunc-exp] 4]) (defalias 'math-nlfit-find-qmaxhalf #[(pdata tdata) "\304@A\"\305\306@\n\"\2031 \307 \310\211\311\307A@@\"\"\312A@@\"\"\"AA\202 *\207" [pdata qmh pmax tdata math-max-list 0 math-lessp math-add math-mul (float 5 -1) math-sub] 8]) (defalias 'math-nlfit-find-q0 #[(pdata tdata) "\306 \"\307\310\n\"\311 #\312\313\314\315\f\" #\307\316\317\n\"\"\"\203, \317\n\"\202 \320\n\"\313\314\321\f\" #\322\211\323W\203u \307\324\317 \"\"\312\313\314\325\f\" #\307\326\317\n\"\"\"\203i \202l T\211\202B \307\327\317 \"\".\207" [pdata tdata qhalf q0 qdata qmin math-nlfit-find-qmaxhalf math-mul 2 math-nlfit-get-cumul-from-rates math-lessp math-nlfit-find-qmax mapcar #[(q) "\302 \"\207" [q0 q math-add] 3] (float 5 -1) math-add math-sub #[(q) "\302 \"\207" [q0 q math-add] 3] 0 10 (float 5 -1) #[(q) "\302 \"\207" [q0 q math-add] 3] (float 5 -1) (float 5 -1) qmax qt i] 8]) (defvar math-nlfit-delta '(float 1 -8)) (defvar math-nlfit-epsilon '(float 1 -5)) (defvar math-nlfit-max-its 100) (defalias 'math-nlfit-set-elt #[(vec i x) "S \233\n\240\207" [i vec x] 2]) (defalias 'math-nlfit-get-elt #[(vec i) "S 8\207" [i vec] 2]) (defalias 'math-nlfit-make-matrix #[(i j) "\305\306\"\307\306 \fW\203 \310!\nB T\211\202\n \n+\207" [j k mat row i make-list 0 nil copy-sequence] 4]) (defalias 'math-nlfit-set-matx-elt #[(mat i j x) "S S\n8\233\240\207" [j i mat x] 3]) (defalias 'math-nlfit-get-matx-elt #[(mat i j) "S S\n88\207" [j i mat] 3]) (defalias 'math-nlfit-givens #[(C d) "\306!\306 !@GG\307\310\311\"\310\311\"\312\211\312\211\f\nX\203\fT\211X\203w\313\f#\313\f\211# \314\311 \"\204m\315\316!\317!\316 !\"\"\203r \320 !\311\307\211\202\266 \317\321!\322\323\317\211\"\317 \211\"\"!\"\324\"\320\324 \"!\315\316!\"\203\254 \202\266 \324\321!\" \325\f\211$\210\325\f$\210\fT\"\"\nX\203+\313\f\"##\313\"#$\326\317#\"\317$\"\"%\323\317#\"\317$\"\"$%#\325\"$$\210\325\f\"#$\210\"T\"+\202\323 )\327 \"&\327 \f\"'\326\317'\"\317&\"\"%\323\317'\"\317&\"\"&%'\330 &#\210\330 \f'#\210+*T\211\2023 )\fT\211\202) \n\312(\211\307Y\203\337\330 \311#\210\327 \"(T\211\"\nX\203\302\323(\317\313\"#\327\"\"\"\"(\"T\211\"\202\237)\330\320\324(\313\211#\"!#\210S\211\202\206*\nT\211X\203\376\330 \327 \"#\210T\211\202\345)\n\211\307Y\203\267\211\fTY\203\257\313\f#\314\307\"\203*\311\307\202b\315\316!\307\"\203G\322\326\307\317\211\"\"!\202b\324\307\316!\"\317\321!\322\326\307\317\211\"\"!\"\327 \"\327 \f\"\312%)*\323\317)\"\317*\"\"%\326\317*\"\317)\"\"*%)\330 *#\210\330 \f)#\210+S\211\202)\fS\211\202).\207" [C d n N j r copy-tree 1 make-list 0 nil math-nlfit-get-matx-elt math-equal math-lessp calcFunc-abs math-mul math-neg calcFunc-sign calcFunc-sqrt math-add math-div math-nlfit-set-matx-elt math-sub math-nlfit-get-elt math-nlfit-set-elt x w gamma sigma rho i cjj cij math-nlfit-delta k cjk cik h di dj s rj ri] 11]) (defalias 'math-nlfit-jacobian #[(grad xlist parms &optional slist) "\306 \203' \307\n @# \203 \310\311\f\"\202 \fB) A A\211\204 \312!)\207" [j xlist grad parms row slist nil apply mapcar #[(x) "\302 @\"\207" [x slist math-div] 3] reverse] 5]) (defalias 'math-nlfit-make-ident #[(l n) "\304\211\"\305 X\203 \306\n \211$\210 T\211\202 \n*\207" [n i m l math-nlfit-make-matrix 1 math-nlfit-set-matx-elt] 6]) (defalias 'math-nlfit-chi-sq #[(xlist ylist parms fn &optional slist) "\306 \2034 \307\310\n @#\f@\"\f\203 \311 \f@\"\312\313 \211\"\") A\fA\fA\f\202 )\207" [cs xlist fn parms ylist c 0 math-sub apply math-div math-add math-mul slist] 5]) (defalias 'math-nlfit-init-lambda #[(C) "\305@GG\203- @\211\203% \306\307\f@\f@\"\"\fA\211\204 )A\211\204 \310\311\307\n \"\"!+\207" [C N n l row 0 math-add math-mul calcFunc-sqrt math-div] 7]) (defalias 'math-nlfit-make-Ctilda #[(C l) "@G\304\n \"\305\"*\207" [C n l bot math-nlfit-make-ident append] 3]) (defalias 'math-nlfit-make-d #[(fn xdata ydata parms &optional sdata) "\306 \2032 \307\310\n @#\f@\"\203 \311 @\"\202 )B A\fAA\202 \312!)\207" [d xdata fn parms ydata dd nil math-sub apply math-div reverse sdata] 5]) (defalias 'math-nlfit-make-dtilda #[(d n) "\302\303 \304\"\"\207" [d n append make-list 0] 5]) (defalias 'math-nlfit-fit #[(xlist ylist parms fn grad &optional slist) "\306 \n$\307 \n%\310 \n %\311\f!\312\313\204\276 W\203\276 T\312\204\251 \314\f\" \315\f@G\"!\316 !\"\"\317\320\321\n!\"##\310 # %$\322$\"\203\236 \322\323\324$\"$\"%\"\203\212 \325\323\326\"$#\325\202\245 \327\326\"-\202; \306 \n$\307 \n%)\202&