I am following latex-tutorial website step by step. The url for the tutorial is http://www.latex-tutorial.com/tutorials/.

- Structuring the document by section, subsection, sub subsection, paragraph, subparagraph
- Importing packages
- Typesetting math in Latex, e.g. align, equation, frac, int, sqrt, left, right, matrix
- Adding figure, embed an image, add an tabular, e.g. table, tabular, centering, line, ref
- Generating the menu for the text
- Applying the bibliography to make the references easier, e.g. bibtex, cite

\documentclass{article} \usepackage[a4paper, margin=1in]{geometry} \usepackage{amsmath} \usepackage{graphicx} \usepackage{booktabs} \title{My first document} \date{2016-01-11} \author{Keren Ye} \begin{document} \pagenumbering{gobble} \maketitle \newpage \tableofcontents \newpage \pagenumbering{arabic} \section{Basic} Hello World! \subsection{Subsection} Structuring a document is easy! \subsubsection{Subsubsection} More text \paragraph{Paragraph} Some more text \subparagraph{Subparagraph} Even more text \section{Math} \subsection{Inline Math} This formula $f(x) = x ^ 2$ is an example. \subsection{Equation Environment} \begin{equation*} f(x) = x ^ 2 \end{equation*} \begin{equation} 1 = 3 - 2 \end{equation} \subsection{Align Environment} \begin{align*} 1 + 2 &= 3\\ 1 &= 3 - 2 \end{align*} \subsection{Fractions and More} \begin{align*} f(x) &= x ^ 2\\ g(x) &= \frac{1}{x}\\ F(x) &= \int^a_b \frac{1}{3}x^3_1\\ s(x) &= \frac{1}{\sqrt{x}} \end{align*} \begin{align*} y=\left[ \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right] \end{align*} \section{Image} \begin{figure}[h!] \includegraphics[width=128pt]{updates-downloading-updates-icon.png} \caption{A botton} \label{fig:botton1} \end{figure} Figure \ref{fig:botton1} shows a botton \section{Example of Bib} Random citation \cite{DUMMY:1} embedded in text. \bibliography{tutorial} \bibliographystyle{ieeetr} \section{Table} \begin{table}[h!] \centering \caption{Caption for the table.} \label{tab:table1} \begin{tabular}{l|c|r} 1 & 2 & 3\\ \hline a & b & c\\ \end{tabular} \end{table} Table \ref{tab:table1} shows the data \section{Table2} \begin{table}[h!] \centering \caption{Caption of the table.} \label{tab:table2} \begin{tabular}{ccc} \toprule Some & actural & content\\ \midrule prettifies & the & content\\ as & well & as\\ using & the & booktabs package\\ \bottomrule \end{tabular} \end{table} \end{document}

]]>

Firstly, the city is beautiful. I have so long live under the air pollutions (both for Changsha and Beijing). When I first located here, I was attracted by the blue sky, by the green trees, and by the lovely small animals live besides my campus.

Secondly, study is tough, lots of knowledges that I have not learned before. Though there are only three courses, the course load is heavy. For the Operating System, I have accomplished two course projects – the SRPC and the miniGoogle. Implementing Remote Procedure Call is a kind of challenge in the concept of design. It requires the developer to separate fully the function call and details in network protocol. The miniGoogle project is much simpler, it is just two layered architecture in the backend systems. I think I would publish my designs of these to OS project to my websites and publish a demo interface for the miniGoogle.

For the Artificial Intelligence, not much to say. But I find one of the assignment quite interesting. That is the ‘checker’. We are requiring to implement the heuristic function for the checker, and I applied the Logistic Regression methods. I have won 2 games in the tournament. And I believe that the reason I failed in the next game is I did not gather more accurate features. What ever, it is just a game. In sum, I learned a lot from University of Pittsburgh, and I think it is wealthy for me quitting my job and get here for study.

The TA job is a shit. I shall never forget my first course of teaching. I stuck for so many times in that I did not prepare well. Thus after that course I spend 4-6 hours each week preparing for my recitation. I feel I speaks better and better, yet the statistical result estimating my teaching quality is rather disappointing. More than half of my students are not satisfied with my teaching. The grading work is much worse. It costs my time for grading, even more, these time conflicts with my midterm and final exams. Thus, I think I should find a easy course to teach in the next semester.

Eating in Pittsburgh is not that bad. Sometimes I cook for myself, sometimes I go out for dinner/lunch. I get to be familiar with students who often eat at the graduate lounge. They are quite funny guys. For ranking the restaurant (fast food) I have tried, I think chipolle > five guys > subway > sichuan express > sushi.

The most exciting thing in this semester, I think, is that I possess my own car. It is a brand new 2016 Honda CR-V, with quite a amazing driving experience. Thanks to my friends, they drive me to the dealer, tell me how to choose cars, teach me how to drive, and accompany me to the road test.

Okay, that’s all I want to talk about.

]]>Please refer to the original paper written by Steve Branson, Catherine Wah, and other authors.

Paper Url:【http://vision.ucsd.edu/sites/default/files/Visipedia20q.pdf】

The authors present an interactive and hybrid method for object classification. They introduce a general framework for incorporating object recognition algorithms into the problem. Experimental results show that this new approach drives up recognition accuracy while reduces the amount of human interactions.

Rather than trying to solve object recognition entirely, the authors focus on minimizing the amount of human labor. So, this is a combining of the computer vision techs and the human efforts.

They present a framework that researchers can plug their existing algorithms into, thus drive up performance for real-life applications. Users need only answer YES/NO questions.

We are required to reproduce a paper regarding seam carving in our CS1699 course. The name of the paper is 【*Seam Carving for Content-Aware Image Resizing*】which is written by Shai Avidan and Ariel Shamir. Thus in this post, I will first introduce my understanding about this paper, then, give a implementation of my reproduce work (also, my home assignment).

Unlike the traditional image resizing method, seam carving does not crop an image from its border. The paper suppose that there may be very important information hiding in the border. Thus, a new approach is proposed to handle this issue, which is seam carving.

So, how to resize an image in this situation? A basic intuition is to find a vertical or horizontal line in the image containing the least information, e.g. we can use the entropy to measure the containing data, then find a least informative line and remove it.

The paper goes a step further, it does not search for a line, but for a seam. First, an energy image is computed (E(I) = sqrt(dx ^ 2 + dy ^ 2)), then, a dynamic programming algorithm is applied to this energy image in order to find the least informative seam. M(i, j)=e(i, j)+min(M(i−1, j−1), M(i−1, j), M(i−1, j+1)). Matrix M is called the cumulative image, backtrace technologies can be used here to trace for the principle route. Finally, a seam forms.

% [5 points] energyImage = energy_image(im) - to compute the energy at each pixel using the magnitude of the x and y gradients (equation 1 in the paper; sqrt(dx^2+dy^2)). There are at least two ways to compute the gradient in each direction (including with a filter), but don't use Matlab's imgradient function. The input im should be a nrows-x-ncols-x-3 matrix of datatype uint8, e.g. the output of imread on a color image. However, you need to convert it to grayscale before computing the gradients, using rgb2gray. The output should be a 2D matrix of datatype double. function retval = energy_image(im) im_gray = rgb2gray(im); dx = double(imfilter(im_gray, [-1, 1])); dy = double(imfilter(im_gray, [-1, 1])); retval = sqrt(dx .* 2 + dy .* 2); end

% [5 points] M = cumulative_minimum_energy_map(energyImage,seamDirection) - to compute minimum cumulative energy. The input energyImage should be a 2D matrix of datatype double. (It should be the output of the energy_image function defined above.). The input seamDirection should be the strings 'HORIZONTAL' or 'VERTICAL'. The output must be a 2D matrix of datatype double. function retval = cumulative_minimum_energy_map(energyImage, seamDirection) if strcmp(seamDirection, 'HORIZONTAL') energyImage = energyImage'; end % initialize k = zeros(size(energyImage)); k(1, :) = energyImage(1, :); % dynamic programming [r, c] = size(k); for i = 2 : r for j = 1 : c if j == 1 k(i, j) = energyImage(i, j) + min(k(i - 1, j), k(i - 1, j + 1)); elseif j == c k(i, j) = energyImage(i, j) + min(k(i - 1, j), k(i - 1, j - 1)); else k(i, j) = energyImage(i, j) + min(k(i - 1, j), min(k(i - 1, j - 1), k(i - 1, j + 1))); end end end if strcmp(seamDirection, 'HORIZONTAL') k = k'; end retval = k; end

% [5 points] verticalSeam = find_optimal_vertical_seam(M) and horizontalSeam = find_optimal_horizontal_seam(M) - to compute the optimal vertical and horizontal seams. The input should be a 2D matrix of datatype double. (It can be taken from the output of the cumulative_minimum_energy_map function defined above). The output must be a vector containing the column indices (row indices, respectively) of the pixels which form the seam for each row (each column, respectively). function retval = find_optimal_vertical_seam(M) [r, c] = size(M); cands = find(M(end, :) == min(M(end, :))); % backtrace trace j = cands(1); trace = zeros(r, 1); trace(r) = j; for i = r : -1 : 2 minval = M(i - 1, j); minind = j; if j > 1 && M(i - 1, j - 1) < minval minval = M(i - 1, j - 1); minind = j - 1; end if j < c && M(i - 1, j + 1) < minval minval = M(i - 1, j + 1); minind = j + 1; end j = minind; trace(i - 1) = j; end retval = trace; end

% [5 points] Functions with the following interface: % [reducedColorImage,reducedEnergyImage] = reduceWidth(im, energyImage) % [reducedColorImage,reducedEnergyImage] = reduceHeight(im, energyImage) % These functions should take as inputs a) a 2D matrix energyImage of datatype double and b) a nrows-x-ncols-x-3 matrix im of datatype uint8. The input energyImage should be the output of the energy_image function. The output must return 2 variables: a) a 3D matrix reducedColorImage same as the input image, of datatype uint8, but with its width or height reduced by one pixel; b) a 2D matrix reducedEnergyImage, of datatype double, the same as energyImage, but with its width or height reduced by one pixel. function [reducedColorImage, reducedEnergyImage] = reduce_height(im, energyImage) M = cumulative_minimum_energy_map(energyImage, 'HORIZONTAL'); seam = find_optimal_horizontal_seam(M); [r, c, ch] = size(im); reducedColorImage = zeros(r - 1, c, ch, 'uint8'); reducedEnergyImage = zeros(r - 1, c); for j = 1 : c reducedColorImage(1 : seam(j) - 1, j, :) = im(1 : seam(j) - 1, j, :); reducedColorImage(seam(j) : r - 1, j, :) = im(seam(j) + 1 : r, j, :); reducedEnergyImage(1: seam(j) - 1, j) = energyImage(1 : seam(j) - 1, j); reducedEnergyImage(seam(j) : r - 1, j) = energyImage(seam(j) + 1 : r, j); end end

OK, this is my first assignment in CS1699. Although CS1699 is an undergraduate course, I find it informative and well designed course. During the class in the first week, I learned how to load an image into memory(**imread**), how to transform a RGB 3-channels color image into a gray-scale image(**rgb2gray**), how to transform a matrix in to a vector(**reshape**), how to find pixels satisfied some conditions(**find**), how to transform indices into subscripts(**ind2sub**), and so on so forth.

I have attached the codes written in MATLAB as below. Requirements in this assignment are quote as comments.

% Part I: Matlab Basics (15 points) % Generate a 1000000x1 (one million by one) vector of random numbers from a Gaussian distribution with mean approximately 0 and standard deviation approximately 5. Use Matlab's randn function. v = 5 * randn(1000000, 1); % Add 1 to every value in this list, by using a loop. To get the number of loops you need to run, use Matlab's size function. Time this operation, print the number, and write the total time taken to add 1 to every number in your answer sheet. [r, c] = size(v); tic; for i = 1: r v(i, 1) = v(i, 1) +1; end t_val = toc; r, t_val % Now add 1 to every value in the list, without using a loop. Time this operation, print the time and write it down. Use a different function to print the number than you did above. tic; v = v + 1; t_val = toc; display(r); display(t_val); % Read in this image into Matlab as a matrix, and write down its dimensions. im = imread('Downtown_Pittsburgh_from_the_North_Shore.png'); size(im) % Convert the image into grayscale. im_gray = rgb2gray(im); size(im_gray) % Find the darkest pixel in the image, and write its value in your answer sheet. Hint: Convert to a vector first, and use Matlab's ind2sub function. [r, c] = size(im_gray); im_vec = reshape(im_gray, 1, r * c); px_val = min(im_vec) [i, j] = ind2sub(size(im_gray), find(im_gray == px_val)) % Consider a 31x31 square (a square with size 31 pixels) that is centered on the darkest pixel. Replace all pixels in that square with white pixels. sq_size = 31 canvas = im; for a = i - floor(sq_size / 2) : i + floor(sq_size / 2) for b = j - floor(sq_size / 2) : j + floor(sq_size / 2) for c = 1 : 3 canvas(a, b, c) = 255; end end end % Make a new figure, display the modified image and save it as a file. Use saveas(gcf, '[filename].png') to save your image. figure, imshow(canvas); saveas(gcf, 'result.png'); 'press any keys to continue...' pause(); exit(0);

Results can be find here:

]]>I have named this WeChat Account “匹村生活助手”, which means the Pitts’ Living Assistant. I would add some interesting features to this assistant, which I will discuss them later. Unlike my friends’ attempts, I shall have no energy dedicating myself into operating the account. Which means, I shall not recruit a team of representatives. Therefore, I wish my assistant to be a totally artificial intelligent assistant.

It will be a challenge for me to accomplish this task, however, I think I can learn a lot from this process. It is also a good opportunity for using the technologies I shall learned from the University of Pittsburgh, a good chance of applying Natural Language Processing, Computer Vision, Recommendation techs.

Here are some schedules for this project, terms will be long because I have courses to study.

1. I will make several research on the WeChat API for Developments, also some research on the Back-end Framework. I will test APIs I need and make some demos using these APIs. These may take me almost 2 weeks through Aug 13th – Aug 31h. I will check the milestone on Aug 31h.

2. I shall Initiate data for my assistant, grab data from the internet, invite some initial users and make some decisions based on survey from these initial users. These may take 2 weeks through Sep 1st – Sep 15th if all things goes well.

3. In the next step, I will apply some recsys techs to improve the users’ experiences. Make the assistant easy to use. Time schedule is not available.

4. Let the assistant to reply to users automatically. This is a quite a hard task for me now, but I think I can handle it some days.

]]>http://acl2014.org/acl2014/P14-2/pdf/P14-2012.pdf

]]>http://acl2014.org/acl2014/P14-2/pdf/P14-2004.pdf

Current **weakness**: previous work on **dialog interfaces** has focused on dealing with only a **single target task**

analyze and maintain dialog topics from a more **systematic perspective:**

1) **a separate sub-problem of dialog management** and attempted to solve it with **text categorization approaches** for the recognized utterances in a given turn.

2) **domain models(knowledge-based methods)** and their weakness.

This paper: Our composite kernel consists of **a history sequence** and **a domain context tree kernels**, both of which are composed based on similar textual units in Wikipedia articles to a given dialog context.

**Dialog topic tracking** can be considered as a **classification problem** to detect topic transitions.

Classifier f can be built on the training examples annotated with topic labels using **supervised machine learning techniques**.

**Fundamental features** extracted from the utterances mentioned at a given turn or in a certain number of previous turns is **not sufficient** to identify not only user-initiative, but also system-initiative topic transitions.

To overcome the above limitation, they propose to leverage on Wikipedia as an **external knowledge source**. This work aims at **incorporating various knowledge** obtained from Wikipedia into **the model using a composite kernel method**.

Two different kernels: 1) **a history sequence kernel**; 2) **domain context tree kernel**

These two kernels both represent the current dialog context at a given turn with a set of relevant Wikipedia paragraphs which are selected based on the **cosine similarity** between the **term vectors of the recently mentioned utterances** and **each paragraph in the Wikipedia collection** as follows

sim(x, pi)= φ(x)* φ(pi) / (| φ(x)| * | φ(pi)|)

where x is the **utterances**, pi is the i-th **paragraph in the Wikipedia collection**. φ is the feature extraction function. φ(x) is computed as:

φ(x)=(α1, α2, …, α1|W|), where αi=sum(λ * tfidf(wi)), λ is the **decay factor**, and |W| is the size of word dictionary.

S=(s0,s1,s2,…,st), where sj=argmaxi(sim(xj, pi))

**Hypothesis**: the more similar the dialog histories of the two inputs are, the more similar aspects of topic transitions occur for them.

**Sub-sequence kernel**: **Ks(S1, S2)** (important paper cited here)

The other kernel incorporates more various types of **domain knowledge obtained from Wikipedia** into the feature space. Each instance is encoded in a **tree structure** constructed following the rules. The root node of a tree has few children, each of which is a subtree rooted at each paragraph node in:

Pt = {pi | sim (xt, pi) > θ}, where θ is a **threshold** value to select the relevant paragraphs

we can explore these more enriched features to build the topic tracking model using a subset tree kernel(important paper cited here)

**Kt(T1, T2)**

The composition is performed by **linear combination** as follows:

K(x1, x2) =α · Kl(V1, V2) + β · Ks(S1, S2) + γ · Kt(T1, T2), and α + β + γ = 1

文章大体思路如下：

1、文章要解决的问题是dialog topic tracking，即需要判断对话的主题是否发生了改变

2、现有研究的缺点是，他们仅应用了对话上下文的信息，没有融合进领域的知识，于是这篇文章希望提出composite kernel来融合领域知识

3、文章的研究实际上使用了三组kernel：

1) **Fundamental Features**，抽取自对话本身以及语言学的处理；

2) **History Sequence Kernel**，这组kernel使用与当前对话cosine距离最接近的维基百科中的词条序号序列来表征对话历史，最后提出了一个公式来计算两个维基词条序列的相似度；

3) **Domain Context Tree Kernel**，针对每个对话来构建一棵领域上下文树，使用阈值来筛选相近词条来构建这棵树，最后使用subset tree kernel来计算树的相似度

4、最终判断主题是否改变的方法有些不解！？？？，貌似是训练了一个svm分类器，这个分类器来判断是否发生了主题改变，而分类器使用的特征维数为1-3维？？？！

5、结论：引入维基后提高了各项指标，收益正向

6、两个关键点：1) 历史序列的相似度计算；2) 领域知识树的构建方法和相似度计算。这两个关键点可以留作扩展阅读

]]>