day1/session3.tex
changeset 131 b3a78754c4a9
parent 125 99ca3cb18fd2
child 137 4dea7c5e1bf5
equal deleted inserted replaced
130:8905a5badd7e 131:b3a78754c4a9
    76 \title[]{Arrays \& Least Squares Fit}
    76 \title[]{Arrays \& Least Squares Fit}
    77 
    77 
    78 \author[FOSSEE] {FOSSEE}
    78 \author[FOSSEE] {FOSSEE}
    79 
    79 
    80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    81 \date[] {31, October 2009}
    81 \date[] {31, October 2009\\Day 1, Session 3}
    82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    83 
    83 
    84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    85 %\logo{\pgfuseimage{iitmlogo}}
    85 %\logo{\pgfuseimage{iitmlogo}}
    86 
    86 
   228 \item Rank of matrix A
   228 \item Rank of matrix A
   229 \item Singular values of A
   229 \item Singular values of A
   230 \end{enumerate}
   230 \end{enumerate}
   231 \end{itemize}
   231 \end{itemize}
   232 \begin{lstlisting}
   232 \begin{lstlisting}
   233 coeffs, res, rank, sing = lstsq(A,Tsq)
   233 In []: coef, res, r, s = lstsq(A,Tsq)
   234 \end{lstlisting}
   234 \end{lstlisting}
   235 \end{frame}
   235 \end{frame}
   236 
   236 
   237 \begin{frame}[fragile]
   237 \begin{frame}[fragile]
   238 \frametitle{Least Square Fit Line \ldots}
   238 \frametitle{Least Square Fit Line \ldots}
   239 \begin{itemize}
   239 \begin{itemize}
   240 \item Use the poly1d function of pylab, to create a function for the line equation using the coefficients obtained
   240 \item Use the poly1d function of pylab, to create a function for the line equation using the coefficients obtained
   241 \begin{lstlisting}
   241 \begin{lstlisting}
   242 p=poly1d(coeffs)
   242 In []: p=poly1d(coef)
   243 \end{lstlisting}
   243 \end{lstlisting}
   244 \item Get new $T^2$ values using the function \typ{p} obtained
   244 \item Get new $T^2$ values using the function \typ{p} obtained
   245 \begin{lstlisting}
   245 \begin{lstlisting}
   246 Tline = p(L)
   246 In []: Tline = p(L)
   247 \end{lstlisting}
   247 \end{lstlisting}
   248 \item Now plot Tline vs. L, to get the Least squares fit line. 
   248 \item Now plot Tline vs. L, to get the Least squares fit line. 
   249 \begin{lstlisting}
   249 \begin{lstlisting}
   250 plot(L, Tline)
   250 In []: plot(L, Tline)
   251 \end{lstlisting}
   251 \end{lstlisting}
   252 \end{itemize}
   252 \end{itemize}
   253 \end{frame}
   253 \end{frame}
   254 
   254 
   255 \begin{frame}
   255 \begin{frame}
   415   \end{lstlisting}
   415   \end{lstlisting}
   416 \end{frame}
   416 \end{frame}
   417 
   417 
   418 \end{document}
   418 \end{document}
   419 
   419 
   420 Least squares: Smooth curve fit. 
       
   421 Array Operations: Mean, average (etc region wise like district wise and state wise from SSLC.txt) 
       
   422 Subject wise average. Introduce idea of dictionary. 
       
   423 
       
   424 Session 3
       
   425 
       
   426 import scipy
       
   427 from scipy import linalg.
       
   428 
       
   429 choose some meaningful plot. ??
       
   430 Newton's law of cooling. 
       
   431 u, v, f - optics
       
   432 hooke's law
       
   433 Least fit curves. 
       
   434 
       
   435 
       
   436 Choose a named problem. 
       
   437 ODE - first order. Whatever. 
       
   438 
       
   439 
       
   440 arrays, etc etc. 
       
   441 sum, average, mean. whatever. statistical
       
   442 sslc data
       
   443 numpy load text??