2009/06/16

我的31歲

30歲那年的年尾 離開了生平第一個工作的公司
31歲那年 為自己的理想打拼 為自己的人生努力

那年 讓我學看到很多 學到很多
沒有當時的歷練 就不會有現在的自己

現在雖然離開了當時努力的公司 仍是感謝有過那段經驗

2009/04/01

How many software packages is too much?

看了這篇
How many software packages is too much後的想法 一套DM package就夠了
重要的是對DM method的瞭解 知道什麼方法可以用在什麼樣的問題以及它的限制 用不同software的不同方法會有不同結果通常是因為一些預設值不同造成的 所以在用DM解決問題時 還是要回到最基本的功夫上

2009/03/19

mixed type sort

It's a common problem in semiconductor EDA analysis which plot by lot+wafer number as axis ticks. But the usual sort cannot get the right order for character embed numbers.
The package gtools has the "mixedsort" method for solving this problem.

2009/02/19

Data Modeling

好文
如何建構與評估經濟理論模型

"1.經濟理論模型必須要有實證動機;2. 經濟理論模型必須能夠透過估計檢定或是模擬校準(calibra-
tion) 等方式, 評估該理論模型的良莠"


同樣的對於統計模型 DM modeling 也是吧

2009/02/18

Axis scaling algorithm

A good look axes scale usually increase by 10^(x) or 0.5*10^(x) according to the data's range. Dorothy E. Pugh provide an algorithm (and SAS Macro) for generated suitable axis scale, I modified the SAS code into R code


reference:Dorothy E. Pugh(SUGI25), "A Robust Generalized Axis-scaling Macro"

2008/10/29

Exercise of HSAUR Chapter 1

The book: A Handbook of Statistical Analyses Using R

rle and inverse.rle

rle return a list of run length of the vector, length for the run length, value for it's corresponding value
inverse.rle rollback the original vector

example:
> x <- c(1,0,0,1,1,1,1,1,0,0,0) > (tmp <- rle(x)) Run Length Encoding lengths: int [1:4] 1 2 5 3 values : num [1:4] 1 0 1 0

>inverse.rle(tmp)
[1] 1 0 0 1 1 1 1 1 0 0 0


Application: Finding peaks in vector
getPeaks <- function(x) { tmp <- rle(diff(x)>0) change.index <- cumsum(c(1, tmp$lengths)) ind <- change.index[which(tmp$values ==FALSE)] return(ind) }

> x<-c(rnorm(300),rnorm(700,5,2)) > d1<- density(x) > ind <- getPeaks(d1$y) > plot(d1,xlab="",ylab="") > ind [1] 149 279 > points(d1$x[ind], d1$y[ind], pch = 16, col="red")

CC Copyright

創用 CC 授權條款
本著作由Chunhung Chou製作,以創用CC 姓名標示-相同方式分享 3.0 Unported 授權條款釋出。