Yin-Ting Chou
http://yintingchou.com/
Recent content on Yin-Ting ChouHugo -- gohugo.ioyintingchou@gmail.com (Yin-Ting Chou)yintingchou@gmail.com (Yin-Ting Chou)Sun, 07 Apr 2019 00:00:00 +0000Running SQL Server on Mac using Docker
http://yintingchou.com/posts/docker-sql-server/
Sun, 07 Apr 2019 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/docker-sql-server/It is time to practice T-SQL but how can I do that with my Macbook Pro? Thanks to Docker, it is never mission impossible.
References Running SQL Server 2019 CTP in a Docker container – DBA From The Cold Running SQL Server with Docker on the Mac – SQL passion Steps Follow the post to install docker and create a container with SQL Server 2019 CTP.Fourier Series and Fourier Transform
http://yintingchou.com/posts/fourier-series-and-fourier-transform/
Sun, 03 Jun 2018 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/fourier-series-and-fourier-transform/References http://www.math.psu.edu/wysocki/M412/Notes412_8.pdf https://zhuanlan.zhihu.com/p/19763358 https://www.math.psu.edu/tseng/class/Math251/Notes-PDE%20pt2.pdf http://www.oulu.fi/sites/default/files/content/files/series.pdf http://www.engr.uconn.edu/~lanbo/G377FFTYC.pdf
Fourier Series Theorem (references: Second Order Linear Partial Differential Equations, 复数形式傅立叶变换的物理意义，相位究竟指的是什么？) \(\text{Suppose } f(x) \text{ is a periodic function with period } T \text{ and is an integrable function on } [0, T]. \\ \text{Then, the Fourier Series of } f(x) \text{ can be written as }\)
\[ \begin{align} f(x) & = \frac{c_0}{2} + \sum_{n=1}^{\infty} c_ncos(n \cdot \frac{2\pi}{T} \cdot x + \varphi_n) \\ &= \frac{c_0}{2} + \sum_{n=1}^{\infty} c_ncos(\varphi _n)cos(n \cdot \frac{2\pi}{T} \cdot x)+ (-c_n)sin(\varphi _n)sin(n \cdot \frac{2\pi}{T} \cdot x) \\ &\text{( let } a_0 = c_0, \;a_n = c_ncos(\varphi _n) \text{ and } b_n = (-c_n)sin(\varphi _n) \;) \\ &= \frac{a_0}{2} + \sum_{n=1}^{\infty} a_ncos(n \cdot \frac{2\pi}{T} \cdot x)+ b_nsin(n \cdot \frac{2\pi}{T} \cdot x) \\ \\ \text{where } c_n &= \sqrt{a_n^2 + b_n^2} = \sqrt{c_n^2(cos^2(\varphi _n) + sin^2(\varphi _n))} = \sqrt{c_n^2} \;\; (Amplitude)\\ \varphi_n &= tan^{-1}(-\frac{b_n}{a_n}) \;\; (Phase)\\ a_0 &= \frac{1}{T}\int_{0}^{T}f(x)dx \\ a_n &= \frac{1}{T}\int_{0}^{T}f(x) \cdot cos(n \cdot \frac{2\pi}{T} \cdot x)dx \\ b_n &= \frac{1}{T}\int_{0}^{T}f(x) \cdot sin(n \cdot \frac{2\pi}{T} \cdot x)dx \end{align} \]About
http://yintingchou.com/about/
Sat, 28 Apr 2018 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/about/I am Yin-Ting Chou. The main purpose for me to start this website is to provide myself a place to solidate my knowledges and to practice my writing skills.
My motto is “Dream big, keep pursuing and never give up.” And, I am also inspired by Christopher Olah’s motto, “I want to understand things clearly, and explain them well.”
This website is based on the Hugo theme temple and the R package blogdown.Resources
http://yintingchou.com/resources/
Sat, 28 Apr 2018 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/resources/Blogs/ Posts Rob J Hyndman Nikolaos Kourentzes - Forecasting research RStudio Blog R Views RStudio Webinars and Videos Books Forecasting: principles and practice Forecasting: principles and practice - V2 An Introduction to Statistical Learning The Elements of Statistical Learning : Data Mining, Inference, and Prediction R for Data Science Advanced R Text Mining with R Applied Predictive Modeling Feature Engineering and Selection: A Practical Approach for Predictive Models R Packages caret tidyverse forecast blogdown keras testthat R Docker tutorialParallel Computing in R
http://yintingchou.com/posts/parallel-computing-in-r/
Thu, 16 Nov 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/parallel-computing-in-r/In my work, I usually deal with dataset of products from different customers across different market places. Basically, each product has its own time series dataset. The size of each dataset is not big but we have millions of them. Before finding any convincing reasons to combine dataset from different products, now we just treat them all as independent dataset. And, since they are all independent, it is definitely a good idea to use parallel computing to push the limit of our machine and to make code executed efficiently.Connect SQL Server Database to R
http://yintingchou.com/posts/connect-sql-server-database-to-r/
Sun, 15 Oct 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/connect-sql-server-database-to-r/When I am working on my personal projects, all the data I have can be easily saved as .csv or .txt files. Things are not complicated. However, when things are in scale, it is hard to not to talk about database. In my company, all the data are stored in SQL Server database. So, it is important for me to know how to connect R with SQL Server. And, also good to know how to interact with database in R by passing variables in R environment to database and then return the desired dataset.Learning Microsoft SQL Server
http://yintingchou.com/posts/learning-microsoft-sql-server/
Fri, 01 Sep 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/learning-microsoft-sql-server/This page is about the SQL Server commands. All of the contents are based on the code in w3schools - SQL with the sample database, Northwind. To make myself easier to look up the commands I want in the future, I picked out the ones I have been used a lot in my work and add some notes on it. I also borrowed some materials from the course LinkdedIn Learning - Microsoft SQL Server 2016: Query Data.How Web Scraping eases my job searching pain? - Part III : Make it More Efficient
http://yintingchou.com/posts/web-scraping-3/
Thu, 20 Jul 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/web-scraping-3/Update : 2018-05-06 I have found that the website structure of Indeed, Monster, Dice, Careerbuilder have been changed since I wrote these posts. So, some of my code may not work now. But, I think the concept and the process is still the same.
The Github repository for this project : choux130/webscraping_example.
From the previous posts, How Web Scraping eases my job searching pain? - Part I : Scrape contents from one URL and How Web Scraping eases my job searching pain?How Web Scraping eases my job searching pain? - Part II : Scrape contents from a list of URLs
http://yintingchou.com/posts/web-scraping-2/
Wed, 14 Jun 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/web-scraping-2/Update : 2018-05-06 I have found that the website structure of Indeed, Monster, Dice, Careerbuilder have been changed since I wrote these posts. So, some of my code may not work now. But, I think the concept and the process is still the same.
The Github repository for this project : choux130/webscraping_example.
From the previous post, How Web Scraping eases my job searching pain? - Part I : Scrape contents from one URL, we know how to summarize all the job searching results from Careerbuilder into a .How Web Scraping eases my job searching pain? - Part I : Scrape contents from one URL
http://yintingchou.com/posts/web-scraping-1/
Mon, 05 Jun 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/web-scraping-1/Update : 2018-05-06 I have found that the website structure of Indeed, Monster, Dice, Careerbuilder have been changed since I wrote these posts. So, some of my code may not work now. But, I think the concept and the process is still the same.
The Github repository for this project : choux130/webscraping_example.
The process of finding jobs online can definitely be a torture. Every day is started by sitting in front of computer, browsing different kind of job searching websites and trying to track every job I have read and then categorizing them into interested or not interested.ioslides vs. Slidify in R Markdown Presentation
http://yintingchou.com/posts/ioslides-vs-slidify-in-r-markdown-presentation/
Fri, 26 May 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/ioslides-vs-slidify-in-r-markdown-presentation/The Github repository for this website : choux130/slide_thesis_ioslides. The link to my slides : https://choux130.github.io/slide_thesis_ioslides/#1
Having an opportunity to give a presentation for my master thesis, I decided to give it a try on R Markdown Presentation with interactive graphs and planned to publish it online after the presentation. There are three main choices in R Studio for the R Markdown Presentation: ioslides, Slidy, and Beamer. Beamer is for .pdf file which cannot show the interactive graphs and not meets my need for this time.BATS and TBATS Model
http://yintingchou.com/posts/bats-and-tbats-model/
Wed, 03 May 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/bats-and-tbats-model/BATS model is Exponential Smoothing Method + Box-Cox Transformation + ARMA model for residuals. The Box-Cox Transformation here is for dealing with non-linear data and ARMA model for residuals can de-correlated the time series data. Alysha M.(2010) has proved that BATS model can improve the prediction performance compared to the simple Sate Space Model. However, BATS model does not do well when the the seaonality is complex and high frequency. So, Alysha M.State Space Model for Exponential Smoothing
http://yintingchou.com/posts/state-space-model-for-exponential-smoothing/
Tue, 02 May 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/state-space-model-for-exponential-smoothing/The main weakness of original Exponential Smoothing Method is that it can only provide point estimation. Hyndman (2002) proposed using state space framework to rewrite the original exponential smoothing algorithm and then give distribution assumption on the error terms to calculate the prediction interval. There are two types of error terms in the state space model: Additive and Multiplicative. The point estimator for these two models are the same but the prediction intervals are different.Exponential Smoothing
http://yintingchou.com/posts/exponential-smoothing/
Wed, 29 Mar 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/exponential-smoothing/This post is about Exponential Smoothing method, a prediction method for time series data. There are many forms of Exponential Smoothing method and the most basic ones are Single, Double and Triple (Holt-Winters) Exponential Smoothing. Some of the Exponential Smoothing forms can be written as ARIMA model; some of them can not and vice versa. Compared to ARIMA model, Exponential Smoothing method do not have strong model assumptions and it also can not add explanatory variables in the algorithm.LDA and QDA
http://yintingchou.com/posts/lda-and-qda/
Mon, 13 Mar 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/lda-and-qda/LDA and QDA are classification methods based on the concept of Bayes’ Theorem with assumption on conditional Multivariate Normal Distribution. And, because of this assumption, LDA and QDA can only be used when all explanotary variables are numeric.
This post is my note about LDA and QDA, classification teachniques. All the contents in this post are based on my reading on many resources which are listed in the References part.R --- LDA and QDA
http://yintingchou.com/posts/r-lda-and-qda/
Mon, 13 Mar 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/r-lda-and-qda/This post shows the R code for LDA and QDA by using funtion lda() and qda() in package MASS. To show how to use these function, I created a function, bvn(), to generate bivariate normal dataset based on the assumptions and then used lda() and qda() on the generated datasets.
Details Resources for Package ‘MASS’ CRAN - Package ‘MASS’ Package ‘MASS’ - Reference manual Example Code LDA : Suppose our dataset are from \[X_{green}=N(\begin{pmatrix} 0.Jekyll Website with Github, Github Pages and R Markdown
http://yintingchou.com/posts/jekyll-website-with-github-github-pages-and-r-markdown/
Thu, 23 Feb 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/jekyll-website-with-github-github-pages-and-r-markdown/Update : 2018-05-06 Yihui Xie has announced a new package blogdown in September 2017. This package include all the features in knitr-jekyll but instead of using Jekyll this time he switched to Hugo. There is a terrific instruction from him, blogdown: Creating Websites with R Markdown. So, if you want to integrate your website with R Markdown, I will definitely recommend you to check that out. I also convert my whole website from Jekyll with knitr-jekyll to Hugo with blogdown.Naive Bayes Classifier
http://yintingchou.com/posts/naive-bayes-classifier/
Sun, 12 Feb 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/naive-bayes-classifier/Naive Bayes Classifier is a simple and intuitive method for the classification. The algorithm is based on Bayes’ Theorem with two assumptions on predictors: conditionally independent and equal importance. This technique mainly works on categorical response and explanatory variables. But it still can work on numeric explanatory variables as long as it can be transformed to categorical variables.
This post is my note about Naive Bayes Classifier, a classification teachniques. All the contents in this post are based on my reading on many resources which are listed in the References part.R --- Naive Bayes Classifier
http://yintingchou.com/posts/r-naive-bayes-classifier/
Sun, 12 Feb 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/r-naive-bayes-classifier/This post shows the R code for Naive Bayes Classifier by using funtion naiveBayes() in package e1071. And I use the simple example in my post, Naive Bayes Classifier, to show how to use this function.
Details Resources for Package ‘e1071’ CRAN - Package ‘e1071’ Package ‘e1071’ - Reference manual Example Code (e1071::naiveBayes()) Suppose we have a contingency table like this: Q : And, what will be our guess on type if we have a data has X1=“Yes” and X2=“Unsure”?