Skip to main content

分享: 从SAS 到 Python 与 R

发信人: StatsGuy (StatsGuy), 信区: Statistics
标  题: 分享: 从SAS 到 Python 与 R
发信站: BBS 未名空间站 (Sat Jan 11 15:08:56 2014, 美东)

最近看到不少帖子,讨论到学习Python 与 R 的需求。
我想在这里分享一下自己的经历。希望对大家有帮助 :-)

我以前在传统行业做统计和SAS programming. 过着平稳的技术生活,在平常工作中不
断提高SAS水平,也曾去SAS Conference 做过 presentation. 也算是老板手下的SAS技
术骨干吧 (心里也挺踏实:-)。可是我N年前一个偶然的机会来到湾区,从此开始了"二
次创业"的奋斗史 (教训啊 来湾区的决定要慎重:-)

落脚未稳,首先就发现SAS在湾区不是主流技术(银行,药厂除外),大部分主流科技公
司对SAS可以说是有点排斥的 (越新的公司越如此)。也情有可缘,这里的公司更cost
effective, 即使买得起统计软件,也不愿在技术工具上受制于人。我曾有一次向老板
大力推荐SAS,要求公司买SAS licenses,他们也照做了,现在想起来可能人家多花
了几万块买SAS licenses也有点不太情愿吧。(唉,自己当时太年轻了 :-)

改变不了世界就改变自己吧:-)

于是我就想办法逐渐换自己的skill set。这个转化过程需要点时间,我也得到了一些
帮助。R 相对容易一些,因为多年前在学校里学的S-plus还记得(R 和 S-plus 在用户
界面上 有相似, 尽管后台是很不一样)。我在学习Python 过程中发现其实和SAS有些
相似。比如SAS data step 其实是implicit loop through records, 而Python 实际上
是explicit loop. 而且大量的string and number functions都近似。Python有很好用
的data structures. 还有发现Python 做reporting 也非常强大,堪比PROC SUMMARY
之类的SAS PROCEDURES。另外,Python与R搭配来处理text mining也堪称绝配。

我先是在用SAS和R 及Python并用的大公司做(在FLG 其中的一家也做过),逐渐过渡到
我现在所在的创业型公司完全是open source 技术工具。 科技公司typical的scoring
system. 常常是 Python 和R写的。用Linux shell 联络起来。(也有用Pig 来做
scoring 的,比如Twitter)。Predictive model 生成的scores 通常被公司campaign
系统所用,并且不断更新。同时也会有一些BI的工作,比如Tableau。(最近我们的那
个大牛工程师太忙,干脆把与 scoring 有关的 Java code 也丢给我来做. 哈哈,
another opportunity to enlarge my skill set)

我有时回想起在东部大公司做SAS的时候,工作挺稳定而且比较predictable.在东部
药厂做clinical trial的朋友们做得工作都稳定,他们也在换大房子吧:-)我也同意
SAS 是很强大的工具,要求传统大公司完全用open source的工具也是不现实的,因为
他们需要看得见的available 的技术支持。(也不排除将来回去做 SAS)

不过Python和R的好处是可以尝试一些新的东西。比如最近业余时间在尝试用openCV 的
技术,来处理image照片。类似处理image and sound wave data在Python已经完全
available了。

个人感受就是,open source 的工具在empower我们, 象几年前在map-reduce 框架下
做machine learning, 只有为数不多的CS 出身的工程师可以做。 现在 Mahout 和
Spark 框架下,受过统计训练的人都可以做。我希望大家可以把Python 与 R 作为 SAS
之外的additional tools 来掌握(这与掌握SAS 技术并不排斥。 印度同事经常宣称
自己是微软和Linux技术的全才,甚至通晓全世界的各种编程语言;哈哈,这一点值得
学习)

这样,也对我们statisticians与 CS 出身的人 职场竞争时,会有很大的帮助!

Comments

Popular posts from this blog

OWASP Top 10 Threats and Mitigations Exam - Single Select

Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service   Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection   Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream.   Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checking a shared sec

CKA Simulator Kubernetes 1.22

  https://killer.sh Pre Setup Once you've gained access to your terminal it might be wise to spend ~1 minute to setup your environment. You could set these: alias k = kubectl                         # will already be pre-configured export do = "--dry-run=client -o yaml"     # k get pod x $do export now = "--force --grace-period 0"   # k delete pod x $now Vim To make vim use 2 spaces for a tab edit ~/.vimrc to contain: set tabstop=2 set expandtab set shiftwidth=2 More setup suggestions are in the tips section .     Question 1 | Contexts Task weight: 1%   You have access to multiple clusters from your main terminal through kubectl contexts. Write all those context names into /opt/course/1/contexts . Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh , the command should use kubectl . Finally write a second command doing the same thing into /opt/course/1/context_default_no_kubectl.sh , but without the use of k