2009-12-04 12 views
12

मैं पढ़ रहा हूं कि मैं एक ल्यूसीन इंडेक्स से महॉट वैक्टर बना सकता हूं जिसका उपयोग महोत्सव क्लस्टरिंग एल्गोरिदम लागू करने के लिए किया जा सकता है। http://cwiki.apache.org/confluence/display/MAHOUT/Creating+Vectors+from+Textmahout लुसीन दस्तावेज़ क्लस्टरिंग कैसे?

मैं अपने Lucene सूचकांक में दस्तावेजों में एल्गोरिथ्म क्लस्टरिंग कश्मीर साधन लागू करना चाहते हैं, लेकिन मैं कैसे इस एल्गोरिथ्म (या पदानुक्रमित क्लस्टरिंग) इन दस्तावेजों के साथ सार्थक समूहों को निकालने के लिए आवेदन कर सकते हैं यह स्पष्ट नहीं है।

इस पृष्ठ में http://cwiki.apache.org/confluence/display/MAHOUT/k-Means कहता है कि एल्गोरिदम दो इनपुट निर्देशिका स्वीकार करता है: डेटा बिंदुओं के लिए एक और प्रारंभिक क्लस्टर के लिए एक। मेरे डेटा पॉइंट दस्तावेज हैं? मैं "घोषणा" कैसे कर सकता हूं कि ये मेरे दस्तावेज़ (या उनके वैक्टर) हैं, बस उन्हें ले जाएं और क्लस्टरिंग करें?

अग्रिम में खेद मेरी गरीब व्याकरण

के लिए धन्यवाद आप

उत्तर

3

आप वैक्टर है, तो आप KMeansDriver चला सकते हैं। इसके लिए यहां सहायता है।

Usage: 
[--input <input> --clusters <clusters> --output <output> --distance <distance> 
--convergence <convergence> --max <max> --numReduce <numReduce> --k <k> 
--vectorClass <vectorClass> --overwrite --help] 
Options 
    --input (-i) input    The Path for input Vectors. Must be a 
            SequenceFile of Writable, Vector 
    --clusters (-c) clusters   The input centroids, as Vectors. Must be a 
            SequenceFile of Writable, Cluster/Canopy. 
            If k is also specified, then a random set 
            of vectors will be selected and written out 
            to this path first 
    --output (-o) output    The Path to put the output in 
    --distance (-m) distance   The Distance Measure to use. Default is 
            SquaredEuclidean 
    --convergence (-d) convergence The threshold below which the clusters are 
            considered to be converged. Default is 0.5 
    --max (-x) max     The maximum number of iterations to 
            perform. Default is 20 
    --numReduce (-r) numReduce  The number of reduce tasks 
    --k (-k) k      The k in k-Means. If specified, then a 
            random selection of k Vectors will be 
            chosen as the Centroid and written to the 
            clusters output path. 
    --vectorClass (-v) vectorClass The Vector implementation class name. 
            Default is SparseVector.class 
    --overwrite (-w)     If set, overwrite the output directory 
    --help (-h)      Print out help 

अद्यतन: एचडीएफएस से स्थानीय एफएस तक परिणाम निर्देशिका प्राप्त करें। फिर उस क्लस्टर में क्लस्टर और दस्तावेज़ों की सूची प्राप्त करने के लिए क्लस्टरडम्पर उपयोगिता का उपयोग करें।

+0

हाँ है कि मैं नहीं कर सकते समझते हैं। आउटपुट क्या है? मैं आउटपुट में कैसे देख सकता हूं कि उदाहरण के लिए दस्तावेज़ 5 और 8 एक ही क्लस्टर पर हैं? – maiky

संबंधित मुद्दे