Before I get started, it is necessary to install some extensions.
This post provides an example of simulating data in a Multivariate Normal distribution with given parameters, and estimating the parameters based on the simulated data via Cholesky decomposition in
stan. Multivariate Normal distribution is a commonly used distribution in various regression models and machine learning tasks. It generalizes the Normal distribution into multidimensional space. Its PDF can be expressed as:
It happens often to me that I need to repeated use the same key combinations, when I am writing R scripts in Rstudio. For example, I always need to insert a new chunk of R code in the Rmarkdown file. Instead of clicking the “insert” button, I add a shortcut (shift + cmd + i) to easily create a new chunk of R script.
Here I am listing the most commonly used shortcuts for my Rstudio (see Figure below). …
It takes a while for me to get used to the new cluster (SLURM), since you always need to build a container first and upload it to the cloud. Simply put, you need to write a definition file (.def) for all necessary softwares and packages, and install or compress them into a singularity image file (.sif). This image file is called a container.
It takes a while for me to figure out how you can preview pictures and pdfs in vifm on Kitty terminal. I tried many different utilities, such as w3m and überzug, but the displayed pictures are not satisfying or it is really a pain to deploy the environments on my MacBook.
I recently find that Kitty can support image display in the terminal via
icat function. To make it work, you first need to install ImageMagick. See the Kitty webpage for details, and a tutorial for the configuration of kitty and vifm on your computer. …
A good terminal tool can speed up your workflow, and make your life much easier. Here I give a complete tutorial of installing the kitty terminal, and configuring the fish shell and vifm manager on mac.
(1) install kitty on mac
>> curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
(2) set kitty as the default terminal tool
To set kitty as the default application, you need to install a plug-in called “RCDefaultApp.prefPane”. You can download it from my github repository.
>> git clone https://github.com/JakeJing/kittyconfig.git
>> sudo mv kittyconfig/RCDefaultApp.prefPane /Library/PreferencePanes/
This will add an icon of “default apps” in your system…
I am trying to deploy the environments for python markdown notebook in Atom, so that you can compile your python script (*.pmd) into a pdf file. This configuration is tailored for markdown lovers and R users, who are looking for a python IDE similar to Rstudio. It is also useful for researchers who want to attach their scripts as well-formed pdfs in the publications. I include the template files, scripts and other settings in my github repository.
>> pip3 install --upgrade Pweave
2. download and install Atom
3. install the necessary packages via Atom package manager
PyTorch has gained great popularity among industrial and scientific projects, and it provides a backend for many other packages or modules. It is also accompanied with very good documentation, tutorials, and conferences. This blog attempts to use PyTorch to fit a simple linear regression via three optimisation algorithms:
We will start with some simulated data, given certain parameters, such as weights, bias and sigma. The linear regression can be expressed by the following equation:
Programming, Data analysis & Deep learning!