Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Birthday problem - Wikipedia, the free encyclopedia



Birthday problem - Wikipedia, the free encyclopedia
In probability theory, the birthday problem or birthday paradox[1] concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 367 (since there are 366 possible birthdays, including February 29). However, 99.9% probability is reached with just 70 people, and 50% probability with 23 people. These conclusions include the assumption that each day of the year (except February 29) is equally probable for a birthday.

The mathematics behind this problem led to a well-known cryptographic attack called the birthday attack, which uses this probabilistic model to reduce the complexity of cracking a hash function.

In the example given earlier, a list of 23 people, comparing the birthday of the first person on the list to the others allows 22 chances for a matching birthday, the second person on the list to the others allows 21 chances for a matching birthday (in fact the 'second' person also has total 22 chances of matching birthday with the others but his/her chance of matching birthday with the 'first' person, one chance, has already been counted with the first person's 22 chances and shall not be duplicated), third person has 20 chances, and so on. Hence total chances are: 22+21+20+⋯+1=253, so comparing every person to all of the others allows 253 distinct chances (combinations): in a group of 23 people there are (232)=23⋅222=253 distinct possible combinations of pairing.
Presuming all birthdays are equally probable,[4] the probability of a given birthday for a person chosen from the entire population at random is 1/365 (ignoring February 29). Although the number of pairings in a group of 23 people is not statistically equivalent to 253 pairs chosen independently, the birthday paradox becomes less surprising if a group is thought of in terms of the number of possible pairs, rather than as the number of individuals.
Read full article from Birthday problem - Wikipedia, the free encyclopedia

Logistic function - Wikipedia, the free encyclopedia



Logistic function - Wikipedia, the free encyclopedia
A logistic function or logistic curve is a common "S" shape (sigmoid curve), with equation:
f(x) = \frac{1}{1 + \mathrm e^{-x}}
where e is the natural logarithm base (also known as Euler's number).[1] For values of x in the range of real numbers from −∞ to +∞, the S-curve shown on the right is obtained.

The function was named in 1844-1845 by Pierre François Verhulst, who studied it in relation to population growth.[2] The initial stage of growth is approximately exponential; then, as saturation begins, the growth slows, and at maturity, growth stops.
In practice, due to the nature of the exponential function e−x, it is often sufficient to compute x over a small range of real numbers such as [−6, +6].
It has an easily calculated derivative:
\frac{d}{dx}f(x) = f(x)\cdot(1-f(x)).\,
It also has the property that
1-f(x) = f(-x).\,
Thus, x \mapsto f(x) - 1/2 is an odd function.

逻辑函数或逻辑曲线是一种常见的S形函数,它是皮埃尔·弗朗索瓦·韦吕勒在1844或1845年在研究它与人口增长的关系时命名的。广义Logistic曲线可以模仿一些情况人口增长(P)的S形曲线。起初阶段大致是指数增长;然后随着开始变得饱和,增加变慢;最后,达到成熟时增加停止。
一个简单的Logistic函数可用下式表示:
P(t) = \frac{1}{1 + e^{-t}}
Read full article from Logistic function - Wikipedia, the free encyclopedia

Standard Deviation and Variance



Standard Deviation and Variance
Standard DeviationThe Standard Deviation is a measure of how spread out numbers are.
Its symbol is σ (the greek letter sigma)
The formula is easy: it is the square root of the Variance. So now you ask, "What is the Variance?"
Variance
The average of the squared differences from the Mean.
  •  for each number: subtract the Mean and square the result (the squared difference).
  • Then work out the average of those squared differences.
  • Now we calculate each dog's difference from the Mean:
    To calculate the Variance, take each difference, square it, and then average the result:
    So, the Variance is 21,704.
    And the Standard Deviation is just the square root of Variance, so:
    Standard Deviation: σ = √21,704 = 147.32... = 147 (to the nearest mm)
    And the good thing about the Standard Deviation is that it is useful. Now we can show which heights are within one Standard Deviation (147mm) of the Mean:
    So, using the Standard Deviation we have a "standard" way of knowing what is normal, and what is extra large or extra small.
    But if the data is a Sample (a selection taken from a bigger Population), then the calculation changes!
    When you have "N" data values that are:
    • The Population: divide by N when calculating Variance (like we did)
    • A Sample: divide by N-1 when calculating Variance
    All other calculations stay the same, including how we calculated the mean.
    Example: if our 5 dogs were just a sample of a bigger population of dogs, we would divide by 4 instead of 5 like this:
    Sample Variance = 108,520 / 4 = 27,130
    Sample Standard Deviation = √27,130 = 164 (to the nearest mm)
    Think of it as a "correction" when your data is only a sample.
    That is nice! The Standard Deviation is bigger when the differences are more spread out ... just what we want!
    Read full article from Standard Deviation and Variance

    Pearson r-correlation Coefficient - University of Strathclyde



    Pearson r-correlation Coefficient - University of Strathclyde
    For example, we might want to know whether the relationship between maths achievement and parental social background is stronger or weaker than that between maths achievement and cognitive ability. Graphs could give us an indication, but will not give us an exact indication of the strength of the relationship. To do that, we need to calculate the correlation coefficient, which is a numerical indicator of the strength and direction (positive or negative) of the linear relationship between two variables. When working with continuous variables, as we have so far in this chapter, the correlation coefficient to use is Pearson’s r.

    What does Pearson’s r do? The formula for Pearson’s correlation coefficient for two variables, x and y is computed as:
     (1)
    where:
     and  are individual observations (e.g. the grade of a child in English () and the grade of the same child in maths ();
     and  are the means for variables X and Y (e.g. the mean grades in English and maths);
     is the number of cases
    and  and  are the standard deviations of the two variables (English and Maths) respectively. 
    Looking at formula (1), we see that what is actually happening is that the difference between the individual response and the mean for each variable is calculated. 

    These are then multiplied for each individual case. This will give us a positive score if both are positive, so if the respondent scores above the mean on both variables the outcome will be positive. The same is true if the score on both is negative. 
    If the respondent scores below the mean on both variables, the outcome will also be positive. If the respondent has a positive score on variable X, and a negative score on variable Y, the outcome will be negative. All these individual scores are then summed to get a total, which is then divided by the product of the standard deviations of both variables to scale it. This will give us the Pearson r correlation coefficient. 
    Pearson r coefficient varies between –1 and +1, with +1 indicating a perfect positive relationship (a high score on variable X = a high score on variable Y), -1 a perfect negative relationship (a high score on X = a low score on Y), and 0 no relationship. 
    • The direction of the relationship: a positive sign indicates a positive direction (high scores on X means high scores on Y), a negative sign a negative direction (high score on X means low scores on Y)
    • The strength of the relationship: The closer to 1 (+ or -) the stronger the relationship.
    When we want to make inferences from a sample to a population, we obviously want to calculate the statistical significance of the correlation coefficient as well as the effect size, as discussed in previous units. To do this, we use a test called the F-test. Fortunately, we do not need to do this by hand, as Pearson’s r correlation coefficients, and the associated test of statistical significance, can easily be calculated in SPSS.

    Plea
    Correlation and Variance

    The amount of dispersion or spread in a set of scores can be described as Variance (the standard deviation squared) and is expressed in percentage terms. If one set of scores (X, e.g. Intelligence quotients) is correlated with another set (Y, maths scores), the correlation can be expressed as the percentage of variance in Y which is predicted by the variance in X. For example:
    • A correlation of 0.7 means that the variance in X predicts 49% of the variance in Y. [(0.7 x 0.7) /100]
    • A correlation of 0.5 means that the variance in X predicts 25% of the variance in Y. [(0.5 x 0.5) /100]
    • A correlation of 0.3 means that the variance in X predicts 9% of the variance in Y. [(0.3 x 0.3) /100] 
     For a sample
    Pearson's correlation coefficient when applied to a sample is commonly represented by the letter r and may be referred to as the sample correlation coefficient or the sample Pearson correlation coefficient. We can obtain a formula for r by substituting estimates of the covariances and variances based on a sample into the formula above. That formula for r is:
    r = \frac{\sum ^n _{i=1}(X_i - \bar{X})(Y_i - \bar{Y})}{\sqrt{\sum ^n _{i=1}(X_i - \bar{X})^2} \sqrt{\sum ^n _{i=1}(Y_i - \bar{Y})^2}}
    An equivalent expression gives the correlation coefficient as the mean of the products of the standard scores. Based on a sample of paired data (Xi, Yi), the sample Pearson correlation coefficient is
    r = \frac{1}{n-1} \sum ^n _{i=1} \left( \frac{X_i - \bar{X}}{s_X} \right) \left( \frac{Y_i - \bar{Y}}{s_Y} \right)
    where
    \bar{X}=\frac{1}{n}\sum_{i=1}^n X_i, \text{ and } s_X=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2}
    are the standard score, sample mean, and sample standard deviation, respectively.
    Please read full article from Pearson r-correlation Coefficient - University of Strathclyde

    Read full article from Pearson r-correlation Coefficient - University of Strathclyde

    Relationship Between Two Continuous Variables - University of Strathclyde



    Relationship Between Two Continuous Variables - University of Strathclyde
    While a categorical variable is essentially a non-numerical factor that has been assigned a number (e.g. gender, if boys are given the number 2 and girls 1, these numbers don’t signify any kind of order between the two), continuous variables are ordered and the distance between the numbers is fixed (in contrast to ordinal variables where the distance between the numbers is not fixed). A typical example of a continuous variable is weight. Five kilos are more than 4 kilos, and the difference between 4 and 5 kilos is the same as that between 2 and 3 kilos, i.e. 1 kilo



    Correlation is the concept of association between one measure and another. It requires a population, e.g., of pupils and two scores from each member, e.g., maths and English score.
    The correlation basically tells us the extent to which the two variables co-vary or move in tandem with one another.
    Perfect Linear Relationships Between Variables

    In statistical terms the relationship between variables is denoted by the correlation coefficient, which is a number between 0 and 1.0.   Pearson’s r is the most common; the main ideas discussed here are similar for all correlation coefficients.
    • If there is no relationship between the variables under investigation (or between the predicted values and the actual values), then the correlation coefficient is 0, or non-existent.
    • As the strength of the relationship between the variables increases, so does the value of the correlation coefficient, with a value of 1 showing a perfect relationship. (As mentioned, in variables studied in educational research, or generally in social sciences, it is highly unlikely that such perfect correlations are found.)
    Correlation and Causation

    Causation or causality in statistical terms means that variable A isn’t just correlated with variable B, but that it actually produces a change in B.
    When conducting a correlation analysis, it is important to remember that we cannot claim that a relationship between variables is a “cause and effect” one. All we can say is that the two variables occur together, that changes in one is accompanied by systematic changes in the other. Causal inferences are made based on underlying theories and knowledge.
    Read full article from Relationship Between Two Continuous Variables - University of Strathclyde

    Covariance - Wikipedia, the free encyclopedia



    Covariance - Wikipedia, the free encyclopedia
    In probability theory and statistics, covariance is a measure of how much two random variables change together. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the smaller values, i.e., the variables tend to show similar behavior, the covariance is positive.[1] In the opposite case, when the greater values of one variable mainly correspond to the smaller values of the other, i.e., the variables tend to show opposite behavior, the covariance is negative. The sign of the covariance therefore shows the tendency in the linear relationship between the variables. The magnitude of the covariance is not easy to interpret. The normalized version of the covariance, the correlation coefficient, however, shows by its magnitude the strength of the linear relation.

    Read full article from Covariance - Wikipedia, the free encyclopedia

    Pearson product-moment correlation coefficient - Wikipedia



    Pearson product-moment correlation coefficient - Wikipedia, the free encyclopedia
    The Pearson product-moment correlation coefficient (/ˈpɪərsɨn/) (sometimes referred to as the PPMCC or PCC or Pearson's r) is a measure of the linear correlation (dependence) between two variables X and Y, giving a value between +1 and −1 inclusive, where 1 is total positive correlation, 0 is no correlation, and −1 is total negative correlation. It is widely used in the sciences as a measure of the degree of linear dependence between two variables.

    Read full article from Pearson product-moment correlation coefficient - Wikipedia, the free encyclopedia

    Using the Mahout Naive Bayes Classifier to automatically classify Twitter messages | Chimpler



    Using the Mahout Naive Bayes Classifier to automatically classify Twitter messages | Chimpler
    lassification algorithms can be used to automatically classify documents, images, implement spam filters and in many other domains.

    In this tutorial we are going to use Mahout to classify tweets using the Naive Bayes Classifier. The algorithm works by using a training set which is a set of documents already associated to a category. Using this set, the classifier determines for each word, the probability that it makes a document belong to each of the considered categories. To compute the probability that a document belongs to a category, it multiplies together the individual probability of each of its word in this category.  The category with the highest probability is the one the document is most likely to belong to.

    In our tutorial, we will limit the tweets to deals by getting the tweets containing the hashtags #deal, #deals and #discount. We will classify them in the following categories:
    • apparel (clothes, shoes, watches, …)
    • art (Book, DVD, Music, …)
    • camera
    • event (travel, concert, …)
    • health (beauty, spa, …)
    • home (kitchen, furniture, garden, …)
    tech (computer, laptop, tablet, …)
    mvn clean package assembly:single
    To transform this into a training set, you can use your favorite editor and add the category of the tweet at the beginning of the line followed by a tab character:

    tech    308215054011194110      Limited 3-Box $20 BOGO, Supreme $9 BOGO, PTC Basketball $10 BOGO, Sterling Baseball $20 BOGO, Bowman Chrome $7 http://t.co/WMdbNFLvVZ #deals
    
    Make sure to use tab between the category and the tweet id and between the tweet id and the tweet message.
    For the classifier to work properly, this set must have at least 50 tweets messages in each category.

    Training the model with Mahout

    $ java -cp target/twitter-naive-bayes-example-1.0-jar-with-dependencies.jar com.chimpler.example.bayes.TweetTSVToSeq data/tweets-train.tsv tweets-seq
    Code to convert tweet tsv to sequence file
    hadoop fs -put tweets-seq tweets-seq
    We can run mahout to transform the training sets into vectors using tfidf weights(term frequency x document frequency):
    mahout seq2sparse -i tweets-seq -o tweets-vectors
    It will generate the following files in HDFS in the directory tweets-vectors:
    • df-count: sequence file with association word id => number of document containing this word
    • dictionary.file-0: sequence file with association word => word id
    • frequency.file-0: sequence file with association word id => word count
    • tf-vectors: sequence file with the term frequency for each document
    • tfidf-vectors: sequence file with association document id => tfidf weight for each word in the document
    • tokenized-documents: sequence file with association document id => list of words
    • wordcount: sequence file with association word => word count
    In order to do the training and check that the classification works fine, Mahout splits the set into two sets: a training set and a testing set:
    mahout split -i tweets-vectors/tfidf-vectors --trainingOutput train-vectors --testOutput test-vectors --randomSelectionPct 40 --overwrite --sequenceFiles -xm sequential
    We use the training set to train the classifier:
    $ mahout trainnb -i train-vectors -el -li labelindex -o model -ow -c
    It creates the model(matrix word id x label id) and a label index(association label and label id).
    To test that the classifier is working properly on the training set:
    mahout testnb -i train-vectors -m model -l labelindex -ow -o tweets-testing -c
    mahout testnb -i test-vectors -m model -l labelindex -ow -o tweets-testing -c
    If the percentage of correctly classified instance is too low, you might need to improve your training set by adding more tweets or by changing your categories to not have too many similar categories or by removing categories that are used very rarely. After you are done with your changes, you would need to restart the training process.

    To use the classifier to classify new documents, we would need to copy several files from HDFS:
    • model (matrix word id x label id)
    • labelindex (mapping between a label and its id)
    • dictionary.file-0 (mapping between a word and its id)
    • df-count (document frequency: number of documents each word is appearing in)
    $ hadoop fs -get labelindex labelindex
    $ hadoop fs -get model model
    $ hadoop fs -get tweets-vectors/dictionary.file-0 dictionary.file-0
    $ hadoop fs -getmerge tweets-vectors/df-count df-count
    java -cp target/twitter-naive-bayes-example-1.0-jar-with-dependencies.jar com.chimpler.example.bayes.Classifier model labelindex dictionary.file-0 df-count data/tweets-to-classify.tsv
    public class Classifier {
     
        public static Map<String, Integer> readDictionnary(Configuration conf, Path dictionnaryPath) {
            Map<String, Integer> dictionnary = new HashMap<String, Integer>();
            for (Pair<Text, IntWritable> pair : new SequenceFileIterable<Text, IntWritable>(dictionnaryPath, true, conf)) {
                dictionnary.put(pair.getFirst().toString(), pair.getSecond().get());
            }
            return dictionnary;
        }
     
        public static Map<Integer, Long> readDocumentFrequency(Configuration conf, Path documentFrequencyPath) {
            Map<Integer, Long> documentFrequency = new HashMap<Integer, Long>();
            for (Pair<IntWritable, LongWritable> pair : new SequenceFileIterable<IntWritable, LongWritable>(documentFrequencyPath, true, conf)) {
                documentFrequency.put(pair.getFirst().get(), pair.getSecond().get());
            }
            return documentFrequency;
        }
     
        public static void main(String[] args) throws Exception {
            if (args.length < 5) {           System.out.println("Arguments: [model] [label index] [dictionnary] [document frequency] ");             return;         }       String modelPath = args[0];         String labelIndexPath = args[1];        String dictionaryPath = args[2];        String documentFrequencyPath = args[3];         String tweetsPath = args[4];                Configuration configuration = new Configuration();      // model is a matrix (wordId, labelId) => probability score
            NaiveBayesModel model = NaiveBayesModel.materialize(new Path(modelPath), configuration);
     
            StandardNaiveBayesClassifier classifier = new StandardNaiveBayesClassifier(model);
     
            // labels is a map label => classId
            Map<Integer, String> labels = BayesUtils.readLabelIndex(configuration, new Path(labelIndexPath));
            Map<String, Integer> dictionary = readDictionnary(configuration, new Path(dictionaryPath));
            Map<Integer, Long> documentFrequency = readDocumentFrequency(configuration, new Path(documentFrequencyPath));
     
            // analyzer used to extract word from tweet
            Analyzer analyzer = new DefaultAnalyzer();
     
            int labelCount = labels.size();
            int documentCount = documentFrequency.get(-1).intValue();
     
            System.out.println("Number of labels: " + labelCount);
            System.out.println("Number of documents in training set: " + documentCount);
            BufferedReader reader = new BufferedReader(new FileReader(tweetsPath));
            while(true) {
                String line = reader.readLine();
                if (line == null) {
                    break;
                }
     
                String[] tokens = line.split("\t", 2);
                String tweetId = tokens[0];
                String tweet = tokens[1];
     
                System.out.println("Tweet: " + tweetId + "\t" + tweet);
     
                Multiset words = ConcurrentHashMultiset.create();
     
                // extract words from tweet
                TokenStream ts = analyzer.reusableTokenStream("text", new StringReader(tweet));
                CharTermAttribute termAtt = ts.addAttribute(CharTermAttribute.class);
                ts.reset();
                int wordCount = 0;
                while (ts.incrementToken()) {
                    if (termAtt.length() > 0) {
                        String word = ts.getAttribute(CharTermAttribute.class).toString();
                        Integer wordId = dictionary.get(word);
                        // if the word is not in the dictionary, skip it
                        if (wordId != null) {
                            words.add(word);
                            wordCount++;
                        }
                    }
                }
     
                // create vector wordId => weight using tfidf
                Vector vector = new RandomAccessSparseVector(10000);
                TFIDF tfidf = new TFIDF();
                for (Multiset.Entry entry:words.entrySet()) {
                    String word = entry.getElement();
                    int count = entry.getCount();
                    Integer wordId = dictionary.get(word);
                    Long freq = documentFrequency.get(wordId);
                    double tfIdfValue = tfidf.calculate(count, freq.intValue(), wordCount, documentCount);
                    vector.setQuick(wordId, tfIdfValue);
                }
                // With the classifier, we get one score for each label
                // The label with the highest score is the one the tweet is more likely to
                // be associated to
                Vector resultVector = classifier.classifyFull(vector);
                double bestScore = -Double.MAX_VALUE;
                int bestCategoryId = -1;
                for(Element element: resultVector) {
                    int categoryId = element.index();
                    double score = element.get();
                    if (score > bestScore) {
                        bestScore = score;
                        bestCategoryId = categoryId;
                    }
                    System.out.print("  " + labels.get(categoryId) + ": " + score);
                }
                System.out.println(" => " + labels.get(bestCategoryId));
            }
        }
    }
    In this post, we only study one Mahout classifier among many others: SGD, SVM, Neural Network, Random Forests, 

    $ hadoop fs -text [FILE_NAME]
    export HADOOP_CLASSPATH=[MAHOUT_DIR]/mahout-math-0.7.jar:[MAHOUT_DIR]/mahout-examples-0.7-job.jar
    mahout seqdumper -i [FILE_NAME]

    View words which are the most representative of each categories

    You can use the class TopCategoryWords that shows the top 10 words of each category.
    public class TopCategoryWords {
     
        public static Map<Integer, String> readInverseDictionnary(Configuration conf, Path dictionnaryPath) {
            Map<Integer, String> inverseDictionnary = new HashMap<Integer, String>();
            for (Pair<Text, IntWritable> pair : new SequenceFileIterable<Text, IntWritable>(dictionnaryPath, true, conf)) {
                inverseDictionnary.put(pair.getSecond().get(), pair.getFirst().toString());
            }
            return inverseDictionnary;
        }
     
        public static Map<Integer, Long> readDocumentFrequency(Configuration conf, Path documentFrequencyPath) {
            Map<Integer, Long> documentFrequency = new HashMap<Integer, Long>();
            for (Pair<IntWritable, LongWritable> pair : new SequenceFileIterable<IntWritable, LongWritable>(documentFrequencyPath, true, conf)) {
                documentFrequency.put(pair.getFirst().get(), pair.getSecond().get());
            }
            return documentFrequency;
        }
     
        public static class WordWeight implements Comparable {
            private int wordId;
            private double weight;
     
            public WordWeight(int wordId, double weight) {
                this.wordId = wordId;
                this.weight = weight;
            }
     
            public int getWordId() {
                return wordId;
            }
     
            public Double getWeight() {
                return weight;
            }
     
            @Override
            public int compareTo(WordWeight w) {
                return -getWeight().compareTo(w.getWeight());
            }
        }
     
        public static void main(String[] args) throws Exception {
            if (args.length < 4) {           System.out.println("Arguments: [model] [label index] [dictionnary] [document frequency]");          return;         }       String modelPath = args[0];         String labelIndexPath = args[1];        String dictionaryPath = args[2];        String documentFrequencyPath = args[3];                 Configuration configuration = new Configuration();      // model is a matrix (wordId, labelId) => probability score
            NaiveBayesModel model = NaiveBayesModel.materialize(new Path(modelPath), configuration);
     
            StandardNaiveBayesClassifier classifier = new StandardNaiveBayesClassifier(model);
     
            // labels is a map label => classId
            Map<Integer, String> labels = BayesUtils.readLabelIndex(configuration, new Path(labelIndexPath));
            Map<Integer, String> inverseDictionary = readInverseDictionnary(configuration, new Path(dictionaryPath));
            Map<Integer, Long> documentFrequency = readDocumentFrequency(configuration, new Path(documentFrequencyPath));
     
            int labelCount = labels.size();
            int documentCount = documentFrequency.get(-1).intValue();
     
            System.out.println("Number of labels: " + labelCount);
            System.out.println("Number of documents in training set: " + documentCount);
     
            for(int labelId = 0 ; labelId < model.numLabels() ; labelId++) {
                SortedSet wordWeights = new TreeSet();
                for(int wordId = 0 ; wordId < model.numFeatures() ; wordId++) {              WordWeight w = new WordWeight(wordId, model.weight(labelId, wordId));               wordWeights.add(w);             }           System.out.println("Top 10 words for label " + labels.get(labelId));            int i = 0;          for(WordWeight w: wordWeights) {                System.out.println(" - " + inverseDictionary.get(w.getWordId())                         + ": " + w.getWeight());                i++;                if (i >= 10) {
                        break;
                    }
                }
            }
        }
    }
    hadoop fs -rmr \*

    Errors

    When running the script to convert the tweet TSV message, I got the following errors:
    Skip line: tech 309167277155168257      Easy web hosting. $4.95 -  http://t.co/0oUGS6Oj0e  - Review/Coupon- http://t.co/zdgH4kv5sv  #wordpress #deal #bluehost #blue host
    Skip line: art 309167270989541376      Beautiful Jan Royce Conant Drawing of Jamaica - 1982 - Rare CT Artist - Animals #CPTV #EBAY #FineArt #Deals http://t.co/MUZf5aixMz
    Make sure that the category and the tweet id are followed by a tab character and not spaces.
    Read full article from Using the Mahout Naive Bayes Classifier to automatically classify Twitter messages | Chimpler

    Labels

    Algorithm (219) Lucene (130) LeetCode (97) Database (36) Data Structure (33) text mining (28) Solr (27) java (27) Mathematical Algorithm (26) Difficult Algorithm (25) Logic Thinking (23) Puzzles (23) Bit Algorithms (22) Math (21) List (20) Dynamic Programming (19) Linux (19) Tree (18) Machine Learning (15) EPI (11) Queue (11) Smart Algorithm (11) Operating System (9) Java Basic (8) Recursive Algorithm (8) Stack (8) Eclipse (7) Scala (7) Tika (7) J2EE (6) Monitoring (6) Trie (6) Concurrency (5) Geometry Algorithm (5) Greedy Algorithm (5) Mahout (5) MySQL (5) xpost (5) C (4) Interview (4) Vi (4) regular expression (4) to-do (4) C++ (3) Chrome (3) Divide and Conquer (3) Graph Algorithm (3) Permutation (3) Powershell (3) Random (3) Segment Tree (3) UIMA (3) Union-Find (3) Video (3) Virtualization (3) Windows (3) XML (3) Advanced Data Structure (2) Android (2) Bash (2) Classic Algorithm (2) Debugging (2) Design Pattern (2) Google (2) Hadoop (2) Java Collections (2) Markov Chains (2) Probabilities (2) Shell (2) Site (2) Web Development (2) Workplace (2) angularjs (2) .Net (1) Amazon Interview (1) Android Studio (1) Array (1) Boilerpipe (1) Book Notes (1) ChromeOS (1) Chromebook (1) Codility (1) Desgin (1) Design (1) Divide and Conqure (1) GAE (1) Google Interview (1) Great Stuff (1) Hash (1) High Tech Companies (1) Improving (1) LifeTips (1) Maven (1) Network (1) Performance (1) Programming (1) Resources (1) Sampling (1) Sed (1) Smart Thinking (1) Sort (1) Spark (1) Stanford NLP (1) System Design (1) Trove (1) VIP (1) tools (1)

    Popular Posts