# CMLDA Repository for the course Computational Mathematics for Learning and Data Analysis. ## Installation These steps are for MacOS, with [```brew```](brew.sh) and ```python3``` already installed. ### Installing Julia ```sh brew install julia ``` ### Installing JupyterLab and IJulia kernel #### IJulia kernel Inside the julia REPL: ```julia using Pkg Pkg.add("IJulia") ``` A simple notebook experience can be obtained by simply running ```noteboot()```, which will install in a separate [```conda```](https://docs.conda.io/en/latest/) environment the needed python packages. #### JupyterLab A separate environment with [```virtualenv```](https://pypi.org/project/virtualenv/) or [```virtualenvwrapper```](https://pypi.org/project/virtualenvwrapper/) is recommended. ```sh pip install jupyterlab ``` ## Running To run simply start the notebook with ```jupyter lab``` , the julia kernel should be automatically detected. # Project 19 (Non-ML) ## Project In the folder `Project` there is our implementation for the project. Project description: > (P) is the linear least squares problem > $$\min_{w} \lVert \hat{X}w-\hat{y} \rVert$$ > where > $$\hat{X}= \begin{bmatrix} X^T \newline \lambda I_m \end{bmatrix},\ \ \hat{y} = \begin{bmatrix} y \newline 0 \end{bmatrix},$$ > with $X$ the (tall thin) matrix from the ML-cup dataset by prof. Micheli, $\lambda > 0$ and $y$ is a random vector. > - (A1) is an algorithm of the class of **limited-memory quasi-Newton methods**. > - (A2) is **thin QR factorization with Householder reflectors**, in the variant where one does not form the matrix $Q$, but stores the Householder vectors $u_k$ and uses them to perform (implicitly) products with $Q$ and $Q^T$. ## Report In the folder `Report` there is the latex project for the report of the project. Run to compile: ``` pdflatex -file-line-error -shell-escape --synctex=1 -interaction=nonstopmode main.tex biber main pdflatex -file-line-error -shell-escape --synctex=1 -interaction=nonstopmode main.tex ```