def rmean(datadomain=[ , ]mean = pseudo_count= )"regularized meanreturns real number mean is the mean to be used for data points with mean = pseudo_count= same as laplace for [ , data this works for enumerations as well as lists sum mean pseudo_count count pseudo_count for in datasum + count + return sum/count def mode(datadomain=[ , ])"mode return statistics mode(data def median(datadomain=[ , ])"median return statistics median(data all [empiricalmeanrmeanbounded_empiricallaplacecmodemodemedian,cmedian the following suggests appropriate predictions as function of the target type select {"boolean"[empiricalbounded_empiricallaplacecmodecmedian]"categorical"[empiricalbounded_empiricallaplacecmodecmedian]"numeric"[meanrmeanmodemedian]evaluation to evaluate point predictionwe first generate some data from simple (bernoullidistributionwhere there are two possible values and for the target feature given proba number in the range [ ]this generate some training and test data where prob is the probability of each example being to generate with probability probwe generate random number in range [ , and return if that number is less than prob prediction is computed by applying the predictor to the training datawhich is evaluated on the test set this is repeated num_samples times let' evaluate the predictions of the possible selections according to the different evaluation criteriafor various training sizes learnnoinputs py -(continued def test_no_inputs(error_measures evaluate all_criterianum_samples= test_size= )for train_size in [ , , , , , , , , ]version june