<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> from sklearn . linear_model import LogisticRegression <EOL> from sklearn . naive_bayes import GaussianNB <EOL> from sklearn . ensemble import RandomForestClassifier <EOL> from sklearn . ensemble import VotingClassifier <EOL> clf1 = LogisticRegression ( random_state = <NUM_LIT> ) <EOL> clf2 = RandomForestClassifier ( random_state = <NUM_LIT> ) <EOL> clf3 = GaussianNB ( ) <EOL> X = np . array ( [ [ - <NUM_LIT:1.0> , - <NUM_LIT:1.0> ] , [ - <NUM_LIT> , - <NUM_LIT> ] , [ - <NUM_LIT> , - <NUM_LIT> ] , [ <NUM_LIT> , <NUM_LIT> ] ] ) <EOL> y = np . array ( [ <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:2> ] ) <EOL> eclf = VotingClassifier ( estimators = [ ( '<STR_LIT>' , clf1 ) , ( '<STR_LIT>' , clf2 ) , ( '<STR_LIT>' , clf3 ) ] , <EOL> voting = '<STR_LIT>' , <EOL> weights = [ <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:5> ] ) <EOL> probas = [ c . fit ( X , y ) . predict_proba ( X ) for c in ( clf1 , clf2 , clf3 , eclf ) ] <EOL> class1_1 = [ pr [ <NUM_LIT:0> , <NUM_LIT:0> ] for pr in probas ] <EOL> class2_1 = [ pr [ <NUM_LIT:0> , <NUM_LIT:1> ] for pr in probas ] <EOL> N = <NUM_LIT:4> <EOL> ind = np . arange ( N ) <EOL> width = <NUM_LIT> <EOL> fig , ax = plt . subplots ( ) <EOL> p1 = ax . bar ( ind , np . hstack ( ( [ class1_1 [ : - <NUM_LIT:1> ] , [ <NUM_LIT:0> ] ] ) ) , width , color = '<STR_LIT>' ) <EOL> p2 = ax . bar ( ind + width , np . hstack ( ( [ class2_1 [ : - <NUM_LIT:1> ] , [ <NUM_LIT:0> ] ] ) ) , width , color = '<STR_LIT>' ) <EOL> p3 = ax . bar ( ind , [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , class1_1 [ - <NUM_LIT:1> ] ] , width , color = '<STR_LIT>' ) <EOL> p4 = ax . bar ( ind + width , [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , class2_1 [ - <NUM_LIT:1> ] ] , width , color = '<STR_LIT>' ) <EOL> plt . axvline ( <NUM_LIT> , color = '<STR_LIT:k>' , linestyle = '<STR_LIT>' ) <EOL> ax . set_xticks ( ind + width ) <EOL> ax . set_xticklabels ( [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] , <EOL> rotation = <NUM_LIT> , <EOL> ha = '<STR_LIT:right>' ) <EOL> plt . ylim ( [ <NUM_LIT:0> , <NUM_LIT:1> ] ) <EOL> plt . title ( '<STR_LIT>' ) <EOL> plt . legend ( [ p1 [ <NUM_LIT:0> ] , p2 [ <NUM_LIT:0> ] ] , [ '<STR_LIT>' , '<STR_LIT>' ] , loc = '<STR_LIT>' ) <EOL> plt . show ( ) </s>
