types of machine learning there are three broad categories of machine learningas followssupervised learningherean algorithm is fed set of inputs and their corresponding outputs the algorithm then has to figure out what the output will be for an unfamiliar input examples of such algorithms include naive bayeslinear regressionand decision tree algorithms unsupervised learningwithout using the relationship that exists between set of input and output variablesthe unsupervised learning algorithm uses only the inputs to unearth groupspatternsand clusters within the data examples of such algorithms include hierarchical clustering and -means clustering reinforcement learningthe computer in this kind of learning dynamically interacts with its environment in such way as to improve its performance hello classifier to invoke the blessing of the programming gods in our quest to understand machine learningwe begin with an hello world example of text classifier this is meant to be gentle introduction to machine learning this example will predict whether given text carries negative or positive connotation before this can be donewe need to train our algorithm (modelwith some data the naive bayes model is suited for text classification purposes algorithms based on naive bayes models are generally fast and produce accurate results the whole model is based on the assumption that features are independent from each other to accurately predict the occurrence of rainfallthree conditions need to be considered these are wind speedtemperatureand the amount of humidity in the air in realitythese factors do have an influence on each other to tell the likelihood of rainfall but the abstraction in naive bayes is to assume that these features are unrelated in any way and thus independently contribute to chances of rainfall naive bayes is useful in predicting the class of an unknown datasetas we will see soon now back to our hello classifier after we have trained our modeits prediction will fall into either the positive or negative categoryfrom textblob classifiers import naivebayesclassifier train (' love this sandwich ''pos')('this is an amazing shop!''pos')('we feel very good about these beers ''pos')