Contoh klasifikasi menggunakan naive bayesian 
Untuk melakukan prediksi suatu sample X masuk ke dalam class yang mana kita menggunakan Naive Bayesian Classifier

Teorema Bayes menyatakan
P(C|X) = (P(X|C) * P(C)) / P(X)

Contoh:
kita akan menggolongkan seesseorang ke dalam class: buys_computer=yes atau class: buys_computer=no

ID age income student credit_rating class: buys_computer
1 <=30 high no fair no
2 <=30 high no excellent no
3 31...40 high no fair yes
4 >40 medium no fair yes
5 >40 low yes fair yes
6 >40 low yes excellent no
7 31...40 low yes excellent yes
8 <=30 medium no fair no
9 <=30 low yes fair yes
10 >40 medium yes fair yes
11 <=30 medium yes excellent yes
12 31...40 medium no excellent yes
13 31...40 high yes fair yes
14 >40 medium no excellent no

misalkan kita memiliki sample data
X = age <=30
income medium
student yes
credit_rating fair

berdasarkan data training kita bisa menghitung
P(Ci) untuk i = 1,2
P(C1) = P(buys_computer = yes) = 9/14 = 0.643
P(C2) = P(buys_computer = no) = 5/14 = 0.357

sekarang hitung P(X|Ci) untuk i = 1,2
P(age <=30|buys_computer=yes) = 2/9 = 0.222
P(age <=30|buys_computer=no) = 3/5 = 0.600
P(income medium|buys_computer=yes) = 4/9 = 0.4444
P(income medium|buys_computer=no) = 2/5 = 0.400
P(student yes|buys_computer=yes) = 6/9 = 0.667
P(student yes|buys_computer=no) = 1/5 = 0.200
P(credit_rating fair|buys_computer=yes) = 6/9 = 0.667
P(credit_rating fair|buys_computer=no) = 2/5 = 0.400

berdasarkan hasil peluang di atas kita dapat menghitung
P(X|buys_computer=yes) = 0.222 * 0.444 * 0.667 * 0.667 = 0.044
P(X|buys_computer=no) = 0.600 * 0.400 * 0.200 * 0.400 = 0.019

P(X|buys_computer=yes)P(buys_computer=yes) = 0.044 * 0.643 = 0.028
P(X|buys_computer=no)P(buys_computer=no) = 0.019 * 0.357 = 0.007

sekarang kita bandingkan dan ambil nilai peluang yang terbesar yaitu 0.028 jadi sample X akan masuk kategori buys_computer=yes

Diambil dari buku Jiawei H, Kamber M, 2001. Data Mining Concepts and Techniques

[ 2 comments ] ( 545 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3.1 / 143 )
Klasifikasi RSS Feed Dengan Metoda Naive Bayes (Text Classification) Part #1 
Klasifikasi RSS Feed Dengan Metoda Naive Bayes (Text Classification)

Alhamdulillah sudah hampir 2 tahun gw kuliah malam atau lazim disebut kelas ekstensi. Sekarang sudah sampai dalam tahap pembuatan skripsi, judul yg akan gw ambil yaitu tentant klasifikasi dokumen teks dengan menggunakan metoda Naive Bayes.

harus mulai darimanakah ?

pastinya nanti akan ketemu dengan tf-idf, statistik, peluang, sedikit bumbu matematika, data mining dan temu kembali informasi.

wew...mohon doanya semoga dapat diselesaikan tepat waktu.

:heh:

[ add comment ] ( 235 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.9 / 133 )
SMS Center Version 1.0 
For

15th Years of ICRAF South East Asia Anniversary

I have to build an SMS center, what does this system do?

well...

1. It will collect all the SMS from the audience and put it in the SMS-C (stands for SMS-Center)
2. Display the SMS to the audience

Simple? yes! what about the hardware?

well...

1. you need 1 PC/notebook. I'm using my little netbook as the SMS-C
2. you need GSM Modem. I'm using my Handphone SE W810i
3. you need Bluetooth Dongle, it will be use to connect from PC to your Handphone
4. Gammu run with MYSQL database service gammu.exe -smsd MYSQL smsdrc
5. PHP programming language to create simple script to display the result.
6. Apache web server

CMIIW

I also have to run the web server because the SMS-C will be access from 2 client using WiFi.

and here it is the screenshot...enjoy

Pak Meine said "This is a new system...you have any comments just send it by SMS to this number"


hehey...my system is in action, so many question coming in...


dual screen bow...for panel A and B. Ketik REG[Spasi]A hehehe


[ add comment ] ( 256 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 117 )
eBook Mastering Visual C# .NET 


Mastering Visual C# .NET is the best resource for getting everything you can out of the new C# language and the .NET Framework. You'll master C# language essentials, quickly taking advantage of the many improvements it offers over C++ and see tons of examples that show you all the ways that .NET can make your programming more efficient and your applications more powerful. You'll learn how to create stand-alone applications, as well as build Windows, web, and database applications. You'll even see how to develop web services—a technology that holds great promise for the future of distributed application.

Coverage includes:

* Mastering the fundamentals and advanced aspects of the C# language
* Using Visual Studio .NET for increased coding productivity and debugging
* Creating distributed applications with remoting and web services
* Understanding object-oriented concepts
* Delivering data across the Internet with web services
* Using XML to communicate with other applications
* Accessing databases with ADO.NET
* Building Windows applications
* Creating web applications using ASP.NET
* Reading and writing data from/to files or the Internet
* Using advanced data structures to store and manipulate information
* Using multi-threading for greater application efficiency
* Using reflection to manipulate running code
* Building distributed applications with remoting and web services
* Securing code and authenticating users
* Using built-in encryption facilities
* Making your applications world-ready
* Parsing strings with regular expressions
* Using delegates to handle runtime events
* Programming defensively with exception handling

Get It!!!

[ 1 comment ] ( 337 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3.1 / 100 )
Keymap.xml for XBMC...Skin MC360 
Bingung...bingung dah tuh...baca judulnya...

berhubung gw baru beli DVD Remote Playback Kit (thanks to yosi yang udah beliin). Sekarang saatnya mentest. DVD Remotenya bekerja baik pada dashboard UnleashX tetapi kurang Interaktif pada aplikasi XBMC dengan menggunakan Skin MC360, karena tidak dapat menampilkan menu shutdown.

Ternyata setelah selidik-selidik harus merubah keymap.xml yang terdapat di dalam folder UserData. Dengan Menambahkan script.

<remote>
<zero>XBMC.ActivateWindow(ShutdownMenu)</zero>
.
.
.
<myvideo>XBMC.ActivateWindow(MyVideos)</myvideo>
<mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
<mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
<mytv>XBMC.ActivateWindow(Home)</mytv>
</remote>

disini saya mengaktifkan tombol 0 untuk menampilkan menu shutdown. Dengan menuliskan script.

<zero>XBMC.ActivateWindow(ShutdownMenu)</zero>

[ add comment ] ( 245 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 294 )
MyDBO Code Generator 
Template-Driven PHP Code Generator for Object-Oriented Database Approach



hehe...dapet lagih...database class code generator, untuk melakukan proses CRUD. Simple Clean Cut Code.

MyDBO is a powerfull and open object-oriented code generator for PHP/MySQL web application developers.

The main idea (but not the only) of MyDBO is to take off the hassle of doing the same database operations (select, update, insert ...) over and over again when creating web applications (especially admin sections or CMS).

MyDBO will create all the code you need (a full API) to access your database tables within your applications without having to worry about connections or SQL queries. The real beauty of MyDBO is that it allows you to approach your database in an object-oriented fashion, thus giving you real flexibility.

With MyDBO, you can do things your way, it will not create a big application to which you have to conform and which you can't change. It will create flexible class files that you can use within your own applications, your way!

The second most important feature of MyDBO is that it is open. The code that will be generated for you is actually based on default plug-ins already present with the distribution. But you may create as many new plug-ins as you want! And since MyDBO only generates code, it could as well generate it in any programming language!

MyDBO uses the Smarty template engine to generate code. Smarty allows MyDBO to be very fast and flexible. It is included in the distribution, so there is absolutly no pre-requirements to install MyDBO.
The only thing you will need to run MyDBO is PHP version 4, and of course a MySQL database and a project to work on!
Open-Source

MyDBO is released under the GNU licence LGPL. It means that you may use the software for free personally or commercially.


[ 1 comment ] ( 1112 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3.1 / 316 )
Perbedaan Join, Inner Join, Outer Join, Left Join dan Right Join 
Kadangkala penggunaan query join untuk beberapa orang cukup membuat bingung (termasuk saya, yg punya penyakit pelupa he5x). Kali ini saya coba posting sample penggunaan query join dengan menggunakan database MySQL.

mysql> status
--------------
mysql Ver 14.7 Distrib 4.1.10, for pc-linux-gnu (i686)

Connection id: 15742
Current database: test
Current user: root@172.18.1.122
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 4.1.10-standard
Protocol version: 10
Connection: 172.18.1.122 via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 21 days 57 min 28 sec

di dalam database test, terdapat 2 table EMPLOYEE dan CONTRACT.

berikut hasil query select dari table EMPLOYEE.

mysql> select * from EMPLOYEE;
+----------+-----------------+------------+
| STAFF_ID | NAME | ADDRESS |
+----------+-----------------+------------+
| STAFF001 | Ahmad Taufik | Bogor |
| STAFF002 | Bill Gates | New York |
| STAFF003 | Jodie Foster | California |
| STAFF004 | Kurosaki Ichigo | NULL |
+----------+-----------------+------------+
4 rows in set (0.00 sec)

berikut hasil query select dari table CONTRACT.

mysql> select * from CONTRACT;
+-------------+----------+----------------------+
| CONTRACT_ID | STAFF_ID | JOB_TITLE |
+-------------+----------+----------------------+
| CON001 | STAFF001 | Computer Programmer |
| CON002 | STAFF002 | CEO Microsoft |
| CON003 | STAFF002 | CEO Gates Foundation |
| CON004 | STAFF002 | Software Developer |
| CON005 | STAFF005 | Student |
+-------------+----------+----------------------+
5 rows in set (0.00 sec)

nah, apakah perbedaan dari join, inner join, outer join, left join dan right join.

Join
akan mengquery dua table, dan hasilnya berupa record yg cocok pada kedua table

mysql> select EMPLOYEE.STAFF_ID, NAME, JOB_TITLE from EMPLOYEE join CONTRACT on EMPLOYEE.STAFF_ID = CONTRACT.STAFF_ID;
+----------+--------------+----------------------+
| STAFF_ID | NAME | JOB_TITLE |
+----------+--------------+----------------------+
| STAFF001 | Ahmad Taufik | Computer Programmer |
| STAFF002 | Bill Gates | CEO Microsoft |
| STAFF002 | Bill Gates | CEO Gates Foundation |
| STAFF002 | Bill Gates | Software Developer |
+----------+--------------+----------------------+
4 rows in set (0.00 sec)

Left Join
akan mengquery dua table, dan hasilnya berupa record yg cocok pada kedua table ditambah dengan record yang tidak cocok pada left table (dalam hal ini table EMPLOYEE)

mysql> select EMPLOYEE.STAFF_ID, NAME, JOB_TITLE from EMPLOYEE left join CONTRACT on EMPLOYEE.STAFF_ID = CONTRACT.STAFF_ID;
+----------+-----------------+----------------------+
| STAFF_ID | NAME | JOB_TITLE |
+----------+-----------------+----------------------+
| STAFF001 | Ahmad Taufik | Computer Programmer |
| STAFF002 | Bill Gates | CEO Microsoft |
| STAFF002 | Bill Gates | CEO Gates Foundation |
| STAFF002 | Bill Gates | Software Developer |
| STAFF003 | Jodie Foster | NULL |
| STAFF004 | Kurosaki Ichigo | NULL |
+----------+-----------------+----------------------+
6 rows in set (0.00 sec)

Right Join
akan mengquery dua table, dan hasilnya berupa record yg cocok pada kedua table ditambah dengan record yang tidak cocok pada right table (dalam hal ini table CONTRACT)

mysql> select EMPLOYEE.STAFF_ID, NAME, JOB_TITLE from EMPLOYEE right join CONTRACT on EMPLOYEE.STAFF_ID = CONTRACT.STAFF_ID;
+----------+--------------+----------------------+
| STAFF_ID | NAME | JOB_TITLE |
+----------+--------------+----------------------+
| STAFF001 | Ahmad Taufik | Computer Programmer |
| STAFF002 | Bill Gates | CEO Microsoft |
| STAFF002 | Bill Gates | CEO Gates Foundation |
| STAFF002 | Bill Gates | Software Developer |
| NULL | NULL | Student |
+----------+--------------+----------------------+
5 rows in set (0.00 sec)

untuk Inner Join dan Outer join, akan diposting selanjutnya.

[ 3 comments ] ( 478 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 288 )
.NET Framework 3.0 released! 


The Microsoft .NET Framework 3.0 (formerly WinFX), is the new managed code programming model for Windows. It combines the power of the .NET Framework 2.0 with new technologies for building applications that have visually compelling user experiences, seamless communication across technology boundaries, and the ability to support a wide range of business processes.

sudah siapkah anda beralih ke .NET 3.0 atau anda masih berkutat di .NET 2.0 atau bahkan .NET 1.1 ?

[ add comment ] ( 184 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 278 )
Global Assembly Cache (.NET) 
Mulai saat ini gw mau tulis aja semua yg gw tau tentang apa itu .NET, daripada harus jawab pertanyaan yang sama terus...duhh Cape dehhhh!!!

Global Assembly Cache
GAC adalah suatu direktori yang menyimpan Strong Name Assemblies. Direktori GAC biasanya bisa anda temukan disini C:\WINDOWS\assembly

Apa gunanya GAC
Biasanya saya menggunakan GAC untuk sharing assemblies antar aplikasi dan juga untuk menghindari name collisions

Lalu, apakah Strong Names itu?
Strong Name, hanya suatu file yang memiliki file name, version, culture dan public token

[ add comment ] ( 102 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3.1 / 273 )
Visual Studio - MySQL Integration 
Yup, mungkin salah datu keinginan developer adalah adanya integrasi antara Visual Studio 2005 dengan MySQL, sehingga developer dapat memanipulasi database dari dalam VS.

MySQL Tools for Visual Studio is a package that integrates seamlessly into Visual Studio 2005. This package is currently available under a commercial, no-charge binary license but we are planning to release the source code under an approved open source license within the next few weeks.

The package provides the following features:

1. DDEX capability
2. Database object manipulation (tables, stored procedures, etc)

hebatnya plugin ini gratis (no-charge license). Plugin ini bisa anda download di.

http://dev.mysql.com/downloads/visual-s ... n/1.0.html


[ add comment ] ( 275 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.9 / 311 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>