Izzy Notes

Just a girl with a laptop


  • Home

  • Categories

  • About

  • Archives

  • Tags

疫情阴霾下一个普通人的新春旅行

Posted on 2020-02-23 | In Travel

1月24日那天,大年初一,日记写的是,“这是新年的第一天,祝愿阳光打在你的脸上。我们不停为你加油。因为你的希望就是我们的希望,因为你的苦难就是我们的苦难”。

Read more »

Summer in Taipei

Posted on 2018-09-01 | In Travel

IMG_9654.JPG

Read more »

Twitter Sentiment Analysis and Prediction

Posted on 2017-11-20 | In Tech

Just few development blog about twitter data analysis, following the tutorials on Kaggle. Complete code and downloadable files at Github repo

Using Jupyter Notebook

Tweets.csv (basically tweets about U.S airlines) also can be found at repo.

Read more »

TensorFlow Chinese Tutorials MNIST

Posted on 2017-11-18 | In Tech

Basic

使用 TensorFlow, 你必须明白 TensorFlow:

  • 使用图 (graph) 来表示计算任务.
  • 在被称之为 会话 (Session) 的上下文 (context) 中执行图.
  • 使用 tensor 表示数据.
  • 通过 变量 (Variable) 维护状态.
  • 使用 feed 和 fetch 可以为任意的操作(arbitrary operation) 赋值或者从其中获取数据.

TensorFlow 是一个编程系统, 使用图来表示计算任务.

图中的节点被称之为 op (operation 的缩写).

一个 op 获得 0 个或多个 Tensor, 执行计算, 产生 0 个或多个 Tensor. 每个 Tensor 是一个类型化的多维数组. 例如, 你可以将一小组图像集表示为一个四维浮点数数组, 这四个维度分别是 [batch, height, width, channels].

一个 TensorFlow 图描述了计算的过程. 为了进行计算, 图必须在会话里被启动. 会话 将图的 op 分发到诸如 CPU 或 GPU 之类的 设备 上, 同时提供执行 op 的方法. 这些方法执行后, 将产生的 tensor 返回. 在 Python 语言中, 返回的 tensor 是 numpy ndarray 对象;

Read more »

情感分析学习笔记1.1 NLTK Naive-Bayes

Posted on 2017-11-13 | In Tech

NLTK Naive Bayes Classification

Sentiment analysis: a movie reviews corpus with reviews categorized into posand neg categories, and a number of trainable classifiers.

Bag of Words Feature Extraction

For text, we’ll use a simplified bag of words model where every word is feature name with a value of True.

Training and Testing the Naive Bayes Classifier

The classifier training method expects to be given a list of tokens in the form of [(feats, label)] where feats is a feature dictionary and label is the classification label.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import nltk.classify.util
from nltk.classify import NaiveBayesClassifier
from nltk.corpus import movie_reviews
def word_feats(words):
return dict([(word, True) for word in words])
negids = movie_reviews.fileids('neg')
posids = movie_reviews.fileids('pos')
negfeats = [(word_feats(movie_reviews.words(fileids=[f])), 'neg') for f in negids]
posfeats = [(word_feats(movie_reviews.words(fileids=[f])), 'pos') for f in posids]
negcutoff = len(negfeats)*3/4
poscutoff = len(posfeats)*3/4
trainfeats = negfeats[:int(negcutoff)] + posfeats[:int(poscutoff)]
testfeats = negfeats[int(negcutoff):] + posfeats[int(poscutoff):]
print ('train on %d instances, test on %d instances' % (len(trainfeats), len(testfeats)))
classifier = NaiveBayesClassifier.train(trainfeats)
print ('accuracy:', nltk.classify.util.accuracy(classifier, testfeats))
classifier.show_most_informative_features()

Screen Shot 2017-11-14 at 11.05.48 AM

sentiwordnet

1
2
3
4
5
6
7
8
# scores
# senti_synset
from nltk.corpus import sentiwordnet as swn
breakdown = swn.senti_synset('breakdown.n.03')
print(breakdown)
breakdown.pos_score()
breakdown.neg_score()
breakdown.obj_score()

Screen Shot 2017-11-14 at 11.10.51 AM

Sentiment Analysi Notes 1.0 NLTK Basic

Posted on 2017-11-12 | In Tech

NLTK

Practical examples of natural language processing (NLP) like speech recognition, speech translation, understanding complete sentences, understanding synonyms of matching words, and writing complete grammatically correct sentences and paragraphs.

Benefits

  1. Search engines Google
  2. Social website feeds Facebook
  3. Speech engine Siri
    open source Natural Language Processing (NLP) libraries
  • Natural language toolkit (NLTK)
  • Apache OpenNLP
  • Stanford NLP suite
  • Gate NLP library
    pip3 install nltk
Read more »

Reference of Sentiment Analysis

Posted on 2017-10-21 | In Tech

领域

来源:微博(twitter)淘宝,youtube 短评 格式音频视频音乐图片

用途

货物评价 事件评价 预测(股票,广告prefer products; reviews hotel airports) 推荐系统

挑战

语言翻译 错误拼写 Sarcasm
偏旁

Steps

  1. Web crawling:
  2. Text cleaning:
  3. Topic extraction:
  4. Semantic analysis: Semantic analysis is the most important step to obtain investor sentiment data.

方法

  • 词典

    NTU 知网DataTang SnowNLP

  • 语料

    电影Amazon微博 酒店
    NTLK语料库 (特征提取-模型训练)词汇量——DL深度学习(lstm Long Short Term Memory长短时记忆)

  • word2vec(bow+skip-gram)

    语境x词序 CBOW的目标是根据上下文来预测当前词语的概率。Skip-gram刚好相反:根据当前词语来预测上下文的概率

  • doc2vec (dm+dbow)

    Distributed Memory(DM) 和 Distributed Bag of Words(DBOW)。DM 试图在给定上下文和段落向量的情况下预测单词的概率
    scikit-learn “t-sne”降维

Read more »

Hello World

Posted on 2017-10-19 | In Life

Hello World

It’s my first post using Github Pages. A bit sad moving my previous website to this blog. Since I cannot afford the server :( However, I’d rather treat it as brand-new beginning.

In a nutshell, the blog is mainly used to record study on CS and partly about pieces of my life and travel experience. Gonna be a cool place huh xD

Take heart!

2016 Exchange Experience

Posted on 2017-06-05 | In Life

排除万难攀星斗

——2016年秋季堪萨斯州立大学交换有感(学习篇)

Ad astra per aspera
是拉丁语中“排除万难攀星斗”的意思,也是美国堪萨斯州的格言。我认为这一句话能很好的反应我这一年的学习与生活,我怀着忐忑又憧憬的心情来到陌生的异国他乡,经过一年的努力和融入当地,最终不仅提高了学习技能和再生活上更独立,还收获了许多许多。

1. 工程学院硬件环境

我交换就读的计算机科学系 (Computer Science) 属于工程学院(College of Engineering)。工程学院里与计算机有关系的系主要有计算机科学、计算机工程(软件工程方向)和电子工程。这三个专业的基础课很多都重合(比如工程师编程导论和电子电路),后两者比较偏硬件。开学前一天工程学院组织了几个会议介绍学分、选课相关事宜并建议我们每周要保证课外学习30个小时,起初我很诧异,这相当于除去周末每天要学六个小时,后来我发现要想有所获,每天大部分时间还是需要学习的。

IMG_1739.JPG.jpeg

春天工程学院外景


工程学院教室方面有三个大的阶梯教室,数十个小的讲学课室,课余学习方面有一个供学生用电脑学习的实验室和公共学习室。公共学习室里大桌子供学习小组学习,白板给同学们写草稿讨论。

IMG_3570.JPG.jpeg

工程学院公共学习室


2. 计算机系环境硬件

我们计算机科学自己独立的一个“小地盘”,有四个教学使用实验室,两个是windows系统,一个是Linux系统,一个是三个系统(Mac、Linux、windows)都可以使用。同时也具有一个供学生小组讨论、休息用的沙发室。除此之外还有几个研究用实验室。

IMG_2167.JPG.jpeg

计算机系外景

Read more »

美西Road Trip我们走过山和大海

Posted on 2017-01-16 | In Travel

回想这次旅行挺神奇的

封面是加州一号公路上最美的大瑟尔(Big Sur),这张照片也很有故事,后面再说~

六月底的时候看新闻,山泥倾泻导致桥塌了,这个最漂亮的景点已经没有了,而且泥土结构的改变使得很难再建成这样的观景台。现在暂时要封至少一年,而且按照美国人民的速度。。。

所以有喜欢想玩的地方,有钱有时间就一定要早点去呀!

Brief Itinerary

12/24 12/25 12/26 12/27 12/28 12/29 12/30 12/31
LA LA LA LA San Diego San Diego Las Vegas Las Vegas
1/1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/10 1/11 1/12 1/13
Las Vegas Las Vegas Grand Canyon Tehachapi Yosemite San Francisco, Oakland San Francisco San Francisco Palo Alto, Monterey, San Jose Pacific Highway Santa Barbara LA LA
Read more »
12
Izzy Qiu

Izzy Qiu

Coding | Life | Music | Travel

19 posts
3 categories
72 tags
GitHub E-mail
© 2021 Izzy Qiu
Powered by Hexo
Theme - NexT.Muse