PyMining
PyMining-開源中文文本數(shù)據(jù)挖掘平臺 Ver 0.1發(fā)布
項目首頁:
http://code.google.com/p/python-data-mining-platform/?(可能需翻墻)
目前已經(jīng)在該googlecode中加入了Tutorial等內(nèi)容,可以在wiki中查看
?
項目介紹(復(fù)制自項目首頁的說明):
這是一個能夠根據(jù)源數(shù)據(jù)(比如說用csv格式表示的矩陣,或者中文文檔)使用多種多樣的算法去得到結(jié)果的一個平臺。
算法能夠通過xml配置文件去一個一個的運行,比如在開始的時候,我們可以先運行一下主成分分析算法去做特種選擇,然后我們再運行隨機森林算法來做分類。
目前算法主要是針對那些單機能夠完成的任務(wù),該架構(gòu)良好的擴展性能夠讓你在很短的時間內(nèi)完成自己想要的算法,并且用于工程之中(相信我,肯定比Weka更快更好)。該項目的另一個特色是能夠很好的支持中文文本的分類、聚類等操作。
只需要寫下下面的程序,就能夠得到神奇的結(jié)果(對文本進行特征選擇、得到naive bayes分類模型,并且預(yù)測):
1: #load config 2: config = Configuration.FromFile("conf/test.xml") 3: PyMining.Init(config, "__global__") 4: 5: #get matrix from source text 6: matCreater = ClassifierMatrix(config, "__matrix__") 7: [trainx, trainy] = matCreater.CreateTrainMatrix("data/train.txt") 8: 9: #get chi square filter 10: chiFilter = ChiSquareFilter(config, "__filter__") 11: chiFilter.TrainFilter(trainx, trainy) 12: 13: #runs naive-bayes model to get model 14: nbModel = TwcNaiveBayes(config, "twc_naive_bayes") 15: nbModel.Train(trainx, trainy) 16:? 17: #using the model to predict an unseen doc to target class 18: [testx, testy] = matCreater.CreatePredictMatrix("data/test.txt") 19: [testx, testy] = chiFilter.MatrixFilter(testx, testy) 20: retY = nbModel.TestMatrix(testx, testy) ?目前的版本:
Ver 0.1(第二個開發(fā)版)
?
Features:
??? 上一版的Feature:
- 能夠支持中文文本輸入,并且對其進行分詞等操作,作為分類的源數(shù)據(jù)
- 帶有卡方檢測(chi square test)的特征詞選擇器(feature selector)
- 參數(shù)的調(diào)整(parameter tuning)支持通過xml配置文件進行
?
???? 新增Feature:
- 加入了K-Means算法,能夠?qū)ξ谋具M行聚類
- 加入了基于補集的樸素貝葉斯算法,大大提升了分類的準(zhǔn)確率,目前該算法在搜狗實驗室文本分類數(shù)據(jù)中,對20000篇、8分類左右的數(shù)據(jù)的預(yù)測準(zhǔn)確率在90%左右
- 加入了Sogou實驗室文本分類數(shù)據(jù)的導(dǎo)入器,可以進行更多的實驗
?
獲取PyMining:
???? 于http://code.google.com/p/python-data-mining-platform/downloads/detail?name=pymining_0_1.zip&can=2&q=#makechanges,可獲取目前最新的ver 0.1版(可能需要翻墻)
???? 不用翻墻的版本:http://files.cnblogs.com/LeftNotEasy/pymining_0_1.zip
分類:?機器學(xué)習(xí) 標(biāo)簽:?機器學(xué)習(xí),?pymining,?數(shù)據(jù)挖掘,?人工智能,?開源平臺總結(jié)
- 上一篇: python No-ASCII char
- 下一篇: EasyToLife的博客