1. Introduction There are many classic sort algirithms, such as follows. Their algorithm complexity are different, see below. Mathematically, the complexity of comparison sorting algorithm has lower bound O(n log(n)). See details at LINK 2. Bubble sort It, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Configure Visual Studio code to use familiar softwares such as Python, R and C/C++ More details can be found https://code.visualstudio.com/ Configure VS code to use Python Prerequisites
VS Code VS Code Python extension Python 3 Install the Python Extension
install the Python extension for VS Code from the Visual Studio Marketplace. The Python extension is named Python and it’s published by Microsoft.
Today is a special day, April 4, 2020, Staturday. I will remember today forever. China held a national mourning Saturday for martyrs who died in the fight against the novel coronavirus disease (COVID-19) outbreak and compatriots died of the disease. During the commemoration, national flags flied at half-mast across the country and in all Chinese embassies and consulates abroad, and public recreational activities suspended across the country. At 10:00 am today, Chinese people nationwide observed three-minute silence to mourn for the deceased, while air raid sirens and horns of automobiles, trains and ships wailed in grief.
How to embed R into Jupyter? There is a simple way to embed R into Jupyter Notebook. Suppose you already have installed R and Anacoda with jupyter
Add the local paths of Anacoda and Python to your system Environment, such as
C:\Program Files\Python37\Scripts\
and
C:\ProgramData\Anaconda3\condabin\
On the Console of Rgui or Rstudio, type
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
Keep typing
We are the world In the special time, this song sounds so sad, but dramatically warm. Since the world is so small, we need take care of each other. The world union is strongly required and more strongly than in the past. We are the world, we are the children. There comes a time when we heed a certain call
When the world must come together as one
The course of Python
The contents including class101 syntax and examples dictionary syntax, usage and examples Scipy and Numpy useful functions and examples web crawler catch data from web Recognize matplotlib toy examples Homepage go back to
How to install hugo on MAC OS? there are three common methods, one of which may be helpful for you. download hugo form github
unzip downloaded file go to the currently unzipped fold and move hugo to /usr/local/bin/, on the terminal sudo mv hugo /usr/local/bin/
try hugo version. We can see the version if it succeeds. hugo version
install hugo via brew
This is the first blog written by blogdown, and build and published by R studio.
What is the blogdown? It is an R package that can create websites using R Markdown and Hugo.
R studio is an Integrated Development Environment with R. Now, it integrates R, git, hugo together, which is very convenient to build, enrich and maintain your website.
On git/terminal/shell, we type hugo sverver --theme=hyde --buildDrafts to continuously serve our website locally, which makes us to live preview the website locally.
Introduction to myself Xu Liu is currently a tenured Professor in the School of Statistics and Management at Shanghai University of Finance and Economics. He received Ph.D. in Statistics at Yunnan University in January 2011. Xu was an NSF postdoctoral fellow in the Department of Statistics at Northwestern University during 2011-2013, and in the Department of Statistics and Probablity at Michigan State University during 2013-2016. His current research interests include
The course of Computer Programming (C) The contents including Recognize C programs toy examples Data types Data types common errors for beginners and sugar functions Syntax of printf and scanf syntax, toy examples, and common errors Control Flow Syntax of if and switch syntax, toy examples, and common errors Loops syntax of while and for More examples Loops and arrays Arrays Array basics Functions Function basics More examples of function
A short course of R Language
Introduction to R What is R How to start Getting help Workspace Input and output Packages A short tutorial Creating dataset Data structures Data input Annotating Datasets Useful functions R language An overview R syntax R objects Vectors List Other objects Functions Preparing data Combing datasets Transformations Binning data Summarizing functions Data cleaning Graphics An overview of R graphics Scatter Plots Plotting time series Bar charts Other Plots Advanced graphics Lattice ggplot2 Statistics Analyzing data Probability distributions Statistical tests Power tests Regression models Logistic regression Time series analysis Autocorrelation functions Time series models More examples R packages Development through Rstudio project Development through package.
Grants “Statistical Analysis Method, Theory and Application of Incomplete Big Data” (NSF of China, 72331005), Co-PI, Participant Date of project: January/01/2024 - December/31/2028 “High-dimensional statistical inference incorporating complex networks and its applications in genomic data” (NSF of China, 12271329), PI Date of project: January/01/2023 - December/31/2026 “Semiparametric modelling and statistical inference for gene data of complex disease” (NSF of China, 11771267), PI Date of project: January/01/2018 - December/31/2021 “Research and
Create your first C project Visual Sdutio on Windows OS codeblocks on Windows OS Xcode on Mac OS The course of Computer Programming Computer Programming More details can be found in Rpubs R packages All my R packages called C/C++ to implement inner loops to speed up the computation. Details can be found in Softwares. A tutorial for developing R packages can be found in RPK. It also includes the
R tutorial R tutorial A short course of R A course of R More details can be found in Rpubs R packages All my R packages called C/C++ to implement inner loop to speed up the computation. Details can be found in Softwares. A tutorial for developing R packages can be found in RPK. It also includes the tutorial for matlab calling C/C++. R shiny Calculate large positive integer’s factorial.
Markdown supports math formula as latex style example: sqrt of n, $\sqrt{n}$, can be written as $\sqrt{n}$ Insert math formula in hugo blog Usually hugo bloc does not support math formula Choose theme hyde as an example open themes–>hyde–>layouts–>partials–>hook_head_end.html, and insert following codes <script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: {
equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.
Rpk’s devolopment There are many methods to develop a R-pacakge extension function An introduction of Writing R Extensions R call C/C++ Build foo.dll on Windows or foo.so on MacOS/LinuxOS R CMD SHLIB foo.c
Examples An example in VectProduce.c: #include <math.h>
#include <string.h>
#include "Rinternals.h"
#include "R_ext/Rdynload.h"
#include <R.h>
#include <R_ext/Applic.h>
void VectProduce(double *A, int *n1_, double *v, int *n2_, double *outMatrix)
{
int i,j,n1, n2;
n1 = n1_[0];
n2 = n2_[0];
for (i=0;i<n1;i++){
for(j=0;j<n2;j++) outMatrix[j*n1+i]=A[i]*v[j];
}
}
static const R_CMethodDef cMethods[] = {
{"VectProduce", (DL_FUNC) &VectProduce, 5},
NULL
};
void R_init_VectProduce(DllInfo *info)
{
R_registerRoutines(info,cMethods,NULL,NULL,NULL);
}
Or in VectProduce1.
Published Papers ($\color{red}{\small{*corresponding author,\underline{trainee}}} $) Bar-Lev, S. K., Liu, X.*, Ridder, A., and Xiang, Z. (2024). Generalized Linear Model Applications for the Exponential Dispersion Model Generated by the Landau Distribution. Mathematics. 12. An R-package “TBEinf” is available at https://github.com/xliusufe/TBEinf. Liu, X., Lian, H.* and Huang, J. (2024). More Efficient Estimation of Multivariate Additive Models Based on Tensor Decomposition and Penalization. Journal of Machine Learning Research. 25, 1-27. An R-package “tensorMAM”
Contact Information Tel: (+86) 021-6590-1156 Email: liu.xu@sufe.edu.cn Address: No. 777, Guoding Rd., Shanghai 200433, China School of Statistics and Management (Rm. 2207), Shanghai University of Finance and Economics (SUFE), Education 2011 received Ph.D. in Statistics, Yunnan University Work Experience 07/2024 - Present, Tenured Professor, School of Statistics and Management, SUFE, 07/2022 - 06/2024, Tenured Associate Professor, School of Statistics and Management, SUFE, 07/2019 - 06/2022, Associate Professor, School of Statistics
R packages The Python codes “REGS” is proposed for sampling from unnormalized densties by the techniques including Wasserstein gradient flows, numerical ODEs, density-ratio estimation and deep neural networks. REGS achieves a fantastic numerical performance on 2D mixtrues of Gaussian distributions with a large number of modes, a small variance, and a large distance between any two modes. “REGS” is available at https://github.com/xliusufe/REGS. Refer to Feng X., Gao, Y., Huang, J.,
Shanghai University of Finance and Economics STT102480: Mathematical Statistics Spring 2017 Spring 2018 Spring 2021 Spring 2022 Spring 2024 STT311240: Advanced Mathematical Statistics Fall 2016 Fall 2017 Fall 2018 Fall 2019 Fall 2020 STT213488: Data analysis and statistical modeling Fall 2017 Fall 2018 Fall 2019 Fall 2020 Fall 2021 Fall 2022 Fall 2023 STT101828: Computer Programming (C/C++) Spring 2019 Spring 2020 Spring 2023 Spring 2024 STT310537: Topics on High-dimensional Data
PhD Students Yiming Liu received her PhD degree in 2023. Her thesis title is “Multi-task Learning for High-dimensional Multi-view Data via Tensor Estimation”. She currently works at Shanghai Shengdi Pharmaceutical Co., Ltd. Xiao Zhang received his PhD degree in 2021. His thesis title is “Variable Selection and Inference for High Dimensional Data”. He is currently a postdoc in the Centre for Quantitative Medicine at Duke-NUS Medical School, Singapore. Xiangyong Tan
Xu Liu is currently a tenured Professor in the School of Statistics and Management at Shanghai University of Finance and Economics. He received Ph.D. in Statistics at Yunnan University in January 2011. Xu was an NSF postdoctoral fellow in the Department of Statistics at Northwestern University during 2011-2013, and in the Department of Statistics and Probablity at Michigan State University during 2013-2016. His current research interests include deep learning and