30 Ocak 2013 Çarşamba
Data Mining Using SAS Enterprise Miner
Matignon: Data Mining Using SAS Enterprise Miner from The Association for Computing Machinery on FORA.tv
28 Ocak 2011 Cuma
Data Mining Research interview: Ajay Ohri

Here is the winner of the Data Mining Research People Award 2010: Ajay Ohri! Thanks to Ajay for giving some time to answer Data Mining Research questions. And all the best to his blog, Decision Stat!
Data Mining Research (DMR): Could you please introduce yourself to the readers of Data Mining Research?
Ajay Ohri (AO): I am a business consultant and writer based out of Delhi- India. I have been working in and around the field of business analytics since 2004, and have worked with some very good and big companies primarily in financial analytics and outsourced analytics. Since 2007, I have been writing my blog at http://decisionstats.com which now has almost 10,000 views monthly.
All in all, I wrote about data, and my hobby is also writing (poetry). Both my hobby and my profession stem from my education ( a masters in business, and a bachelors in mechanical engineering).
My research interests in data mining are interfaces (simpler interfaces to enable better data mining), education (making data mining less complex and accessible to more people and students), and time series and regression (specifically ARIMAX)
In business my research interests software marketing strategies (open source, Software as a service, advertising supported versus traditional licensing) and creation of technology and entrepreneurial hubs (like Palo Alto and Research Triangle, or Bangalore India).
DMR: I know you have worked with both SAS and R. Could you give your opinion about these two data mining tools?
AO: As per my understanding, SAS stands for SAS language, SAS Institute and SAS software platform. The terms are interchangeably used by people in industry and academia- but there have been some branding issues on this.
I have not worked much with SAS Enterprise Miner , probably because I could not afford it as business consultant, and organizations I worked with did not have a budget for Enterprise Miner.
I have worked alone and in teams with Base SAS, SAS Stat, SAS Access, and SAS ETS- and JMP. Also I worked with SAS BI but as a user to extract information.
You could say my use of SAS platform was mostly in predictive analytics and reporting, but I have a couple of projects under my belt for knowledge discovery and data mining, and pattern analysis. Again some of my SAS experience is a bit dated for almost 1 year ago.
I really like specific parts of SAS platform – as in the interface design of JMP (which is better than Enterprise Guide or Base SAS ) -and Proc Sort in Base SAS- I guess sequential processing of data makes SAS way faster- though with computing evolving from Desktops/Servers to even cheaper time shared cloud computers- I am not sure how long Base SAS and SAS Stat can hold this unique selling proposition.
I dislike the clutter in SAS Stat output, it confuses me with too much information, and I dislike shoddy graphics in the rendering output of graphical engine of SAS. Its shoddy coding work in SAS/Graph and if JMP can give better graphics why is legacy source code preventing SAS platform from doing a better job of it.
I sometimes think the best part of SAS is actually code written by Goodnight and Sall in 1970’s , the latest procs don’t impress me much.
SAS as a company is something I admire especially for its way of treating employees globally- but it is strange to see the rest of tech industry not following it. Also I don’t like over aggression and the SAS versus Rest of the Analytics /Data Mining World mentality that I sometimes pick up when I deal with industry thought leaders.
I think making SAS Enterprise Miner, JMP, and Base SAS in a completely new web interface priced at per hour rates is my wishlist but I guess I am a bit sentimental here- most data miners I know from early 2000’s did start with SAS as their first bread earning software. Also I think SAS needs to be better priced in Business Intelligence- it seems quite cheap in BI compared to Cognos/IBM but expensive in analytical licensing.
If you are a new stats or business student, chances are – you may know much more R than SAS today. The shift in education at least has been very rapid, and I guess R is also more of a platform than a analytics or data mining software.
I like a lot of things in R- from graphics, to better data mining packages, modular design of software, but above all I like the can do kick ass spirit of R community. Lots of young people collaborating with lots of young to old professors, and the energy is infectious. Everybody is a CEO in R ’s world. Latest data mining algols will probably start in R, published in journals.
Which is better for data mining SAS or R? It depends on your data and your deadline. The golden rule of management and business is -it depends.
Also I have worked with a lot of KXEN, SQL, SPSS.
DMR: Can you tell us more about Decision Stats? You have a traffic of 120′000 for 2010. How did you reach such a success?
AO: I don’t think 120,000 is a success. Its not a failure. It just happened- the more I wrote, the more people read.In 2007-2008 I used to obsess over traffic. I tried SEO, comments, back linking, and I did some black hat experimental stuff. Some of it worked- some didn’t.
In the end, I started asking questions and interviewing people. To my surprise, senior management is almost always more candid , frank and honest about their views while middle managers, public relations, marketing folks can be defensive.
Social Media helped a bit- Twitter, Linkedin, Facebook really helped my network of friends who I suppose acted as informal ambassadors to spread the word.
Again I was constrained by necessity than choices- my middle class finances ( I also had a baby son in 2007-my current laptop still has some broken keys – by my inability to afford traveling to conferences, and my location Delhi isn’t really a tech hub.
The more questions I asked around the internet, the more people responded, and I wrote it all down.
I guess I just was lucky to meet a lot of nice people on the internet who took time to mentor and educate me.
I tried building other websites but didn’t succeed so i guess I really don’t know. I am not a smart coder, not very clever at writing but I do try to be honest.
Basic economics says pricing is proportional to demand and inversely proportional to supply. Honest and candid opinions have infinite demand and an uncertain supply.
DMR: There is a rumor about a R book you plan to publish in 2011 Can you confirm the rumor and tell us more?
AO: I just signed a contract with Springer for ” R for Business Analytics”. R is a great software, and lots of books for statistically trained people, but I felt like writing a book for the MBAs and existing analytics users- on how to easily transition to R for Analytics.
Like any language there are tricks and tweaks in R, and with a focus on code editors, IDE, GUI, web interfaces, R’s famous learning curve can be bent a bit.
Making analytics beautiful, and simpler to use is always a passion for me. With 3000 packages, R can be used for a lot more things and a lot more simply than is commonly understood.
The target audience however is business analysts- or people working in corporate environments.
Brief Bio-
Ajay Ohri has been working in the field of analytics since 2004 , when it was a still nascent emerging Industries in India. He has worked with the top two Indian outsourcers listed on NYSE,and with Citigroup on cross sell analytics where he helped sell an extra 50000 credit cards by cross sell analytics .He was one of the very first independent data mining consultants in India working on analytics products and domestic Indian market analytics .He regularly writes on analytics topics on his web site www.decisionstats.com and is currently working on open source analytical tools like R besides analytical software like SPSS and SAS.
KAYNAK : http://www.dataminingblog.com/data-mining-research-interview-ajay-ohri/
2 Mart 2010 Salı
SAS | Döküman
http://hotfile.com/dl/30896039/3673219/SAS.rar.html
23 Şubat 2010 Salı
DO DÖNGÜSÜ (DO-Loop)
Döngü içerisinde tekrarlanacak işlemlerin sonuna mutlaka END; gelmelidir. Genel yazılımı aşağıdaki gibidir.
DO indeks = başlangıç TO bitiş by adım;
SAS ifadeleri
END;
Örneğin, 1 den 100 e kadar 2 şer atlatmak istiyorsak;
DO I=1 TO 100 by 2; şeklinde yazarız.
Sadece birer birer artırılmak isteniyorsa
DO I=1 TO 100; şeklide yazmak yeterlidir.
Örnek :
Ortalaması 10 ve standart sapması 2 olan normal dağılıştan 100 şans sayısı üretelim.
DATA ssayisi;
DO I = 1 TO 100; // Döngümüz
Z = RANNOR(0); // Rasgele sayı üretme
X=Z*2 + 10;
OUTPUT;
END;
PROC PRINT; PROC MEANS; VAR Z X; RUN;
Burada normal dağılış gösteren 100 şans sayısı X değişkenine atanmıştır. Sonra standart normal değerleri ile birlikte tanımlayıcı istatistikleri istenmiştir. RANNOR (0) fonksiyonunda çekirdek değer ( başlangıç değeri, seed ) yerinde sıfır kullanılması ilk kullanılacak verinin, bilgisayarın saatinden alınacağını tanımlamaktadır.
SAS | Dağılımlar - Normal Dağılım
Normal dağılış PROBNORM (x)
Ki-kare dağılışı PROBCHI(x,df)
t- dağılışı PROBT(x,df)
Beta dağılışı PROBBETA(x,a,b)
Poisson dağılışı POISSON (lamda, n)
Ters normal dağ. PROBIT(arg)
Binom dağılışı PROBBNML (p,n,m)
Aşağıda bazı olasılık dağılışları ile şans sayısı üreten SAS fonksiyonları verilmiştir:
Normal dağılış RANNOR (seed)
Üniform dağılış RANUNI(seed)
Poisson dağılışı RANPOI (seed, lamda)
Binom dağılışı RANBIN (seed, n,p)
Üstel dağılış RANEXP(seed)
Normal dağılış
Normal dağılış ile olasılıkların hesaplanması iki şekilde olabilir. Birincisi; Z standart normal değerine karşılık gelen olasılığın hesaplanması, ikincisi ise; verilen olasılık düzeyine karşılık gelen Z standart değerinin hesaplanmasıdır.
Aşağıdaki örnek her iki durumu açıklamak için hazırlanmıştır.
Örnek:
DATA Normal1;
INPUT Z @@;
PROB = PROBNORM (Z);
CARDS;
-3 -2 -1 0 1 2 3
PROC PRINT;
RUN;
Bu uygulamada normal olasılık yoğunluk fonksiyonu yazılım şekli üzerinde durulmuştur.
Obs Z PROB
1 -3 0.00135
2 -2 0.02275
3 -1 0.15866
4 0 0.50000
5 1 0.84134
6 2 0.97725
7 3 0.99865
Bu uygulamada -3’ten +3’e kadar olan standart Z değerleri için olasılıklar hesaplanmıştır. Burada verilen olasılıklar ilgili Z değerine eşit ya da küçük olma olasılıklarıdır. Z dağılışı, ortalaması sıfır ve varyansı 1 olan standart normal dağılıştır. Olasılıklardan Z değerlerini hesaplayabilmek için ters (Invers ) olasılık fonksiyonu PROBIT kullanılır.
Örnek:
Normal1 örneğini tersten hesaplayalım. Yani, olasılıklar verilsin Z değerleri istensin.
Yukarıda bulunan P değerlerini kullanarak Z değerleri aşağıdaki program makrosu ile hesaplanabilir.
DATA Normal2;
INPUT P;
Z = PROBIT(P);
CARDS;
0.00135
0.02275
0.15866
0.50000
0.84134
0.97725
0.99865
PROC PRINT;
RUN;
Bu örnekte olasılıklardan Z değerini hesaplamak için PROBIT ters olasılık yoğunluk fonksiyonu kullanılmıştır. Sonuçlar aşağıdaki gibidir.
Obs P Z
1 0.00135 -2.99998
2 0.02275 -2.00000
3 0.15866 -0.99998
4 0.50000 -0.00000
5 0.84134 0.99998
6 0.97725 2.00000
7 0.99865 2.99998
Sonuçlar incelendiğinde Z değerleri tamsayı haline dönüştürülürse, normal1 örneğinde verilen Z değerlerinin hesaplandığı görülmektedir. Bu Z değerlerine eşit ya da küçük olma olasılıkları karşısında bulanan P değerleridir.
20 Şubat 2010 Cumartesi
SAS | Veri Tabanı Yönetimi


PROC IMPORT OUT= WORK.veri
DATATABLE= "durum" // veri tabanı tablo ismi
DBMS=ACCESS REPLACE;
DATABASE="C:\veri\veri.mdb"; // veri tabanı yolu
RUN;
Yukarıdaki kodlar yardımıyla veri tabanımızı SAS’a tanıttık.
Şimdi veri tabanımız üzerinden ki-kare analizi gerçekleştirelim. ( Cinsiyet ile günlük internet kullanımı arasında fark var mı? )
Yukarıdaki kodları silmeden bir alt satıra geçerek editöre şu kodları ekleyin.
proc freq ;
tables cinsiyet * gun_int_kul / chisq expected;
run;

Statistics for Table of Cinsiyet by gun_int_kul
Statistic DF Value Prob
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Chi-Square 6 8.0000 0.2381
Likelihood Ratio Chi-Square 6 10.5850 0.1021
Mantel-Haenszel Chi-Square 1 2.1411 0.1434
Phi Coefficient 1.0000
Contingency Coefficient 0.7071
Cramer's V 1.0000
WARNING: 100% of the cells have expected counts less
than 5. Chi-Square may not be a valid test.
Sample Size = 8
19 Şubat 2010 Cuma
SAS Programlama Genel Yapısı
- Toplanan verinin yazıldığı data basamağı
- Bu verilerin analizinin gerçekleştirildiği proc ( prosedür ) basamağıdır.
Data Basamağının Genel Formu
Data veri setinin ismi;
İnput değişkenler;
Cards;
Veriler
;
Run;
Proc Basamağı
Örneğin Proc Print ifadesinin genel formu
Proc print data = veri setinin ismi;
By değişken isimleri;
Var değişken isimleri;
Run; // Proc print ifadesi bütün değişkenlerin okunduğu gibi yazdırılmasında kullanılır.
Diğer örnek prosedürler; Proc Sort, Proc Univariate, Proc Means, Proc Freq, Proc Chart, Proc Catmod…
16 Şubat 2010 Salı
Sas Temel Bilgiler
SAS / STAT : Bazı istatistiksel analizlerin yanında, Regresyon, Anova, Faktör Analizi ve Loglineer Analiz gibi birçok karmaşık istatistiksel prosedürleri gerçekleştirir. ( İstatistik )
SAS / GRAPH : Çubuk, pasta ve blok şeklindeki grafikleri, iki ve üç boyutlu grafikleri ve haritaları içerir.
SAS / QC ( Quality Control ) : Süreç yetenek analizi, istatistiksel süreç kontrolü deney tasarımı ve örnekleme planı için araçlar içerir.
SAS / OR ( Operations Research ) : Yöneylem araştırmasında üretim sistemleri geliştirilmesinde, proje tamamlama problemleri çözümünde kullanılan programları içerir.
Kaynaklar
Özaydın, 2001
Sas | Başarı Öyküleri
Araştırma
• Nielsen Araştırma Hizmetleri A.Ş.
Kamu
• K.K.T.C. Başbakanlık Devlet Planlama Örgütü
• T.C. Başbakanlık Gümrük Müsteşarlığı
• T.C. Başbakanlık Türkiye İstatistik Kurumu
Perakende
• Boyner Büyük Mağazacılık A.Ş.
Sigorta
• Aviva Sigorta A.Ş.
• AXA Sigorta A.Ş.
• Başak Groupama Emeklilik A.Ş.
• Başak Groupama Sigorta A.Ş
• Ergoİsviçre Sigorta A.Ş.
• Eureko Sigorta A.Ş.
• Fiba Sigorta A.Ş.
• Generali Sigorta A.Ş.
• Koç Allianz Sigorta A.Ş.
• Koç Allianz (Sağlık) Sigorta A.Ş.
• Ray Sigorta A.Ş.
Bankacılık
• Akbank T.A.Ş.
• Citibank A.Ş.
• Garanti Bankası A.Ş.
• HSBC Bank A.Ş.
• Türk Ekonomi Bankası A.Ş.
• Türkiye Halk Bankası A.Ş.
• Türkiye İş Bankası A.Ş.
• Türkiye Sınai Kalkınma Bankası A.Ş.
• Yapı ve Kredi Bankası A.Ş.
Lojistik
• Arıkanlı Holding A.Ş.
Telekomünikasyon
• Avea İletişim Hizmetleri A.Ş.
• Turkcell İletişim Hizmetleri A.Ş.
• Vodafone Telekomünikasyon A.Ş.
Danışmanlık
• Experian Ltd.
• Pharos Strateji Danışmanlık Ltd. Şti.
• Pricewaterhouse Coopers
Medya
• Digital Platform İletişim Hizmetleri A.Ş.
Ulaştırma
• Türk Hava Yolları A.O.
SAS TURKEY