supervised machine learning sigmoid(xis the function - the inverse of sigmoid is the logit function learnlinear py -(continued def sigmoid( )return /( +math exp(- ) def logit( )return -math log( / - sigmoid([ ]returns [ where vi exp(xi exp(xj the inverse of sigmoid is the logit function learnlinear py -(continued def softmax(xs,domain=none)"""xs is list of valuesand domain is the domain ( listor none if the list should be returned returns distribution over the domain ( dict"" max(xsuse of prevents overflow (and all values underflowingexps [math exp( -mfor in xss sum(expsif domainreturn { : / for ( ,vin zip(domain,exps)elsereturn [ / for in exps def indicator(vdomain)return [ if ==dv else for dv in domainthe following tests the learner on data sets uncomment the other data sets for different examples learnlinear py -(continued from learnproblem import data_setdata_from_fileevaluate from learnproblem import evaluate import matplotlib pyplot as plt def test(**args)data data_from_file('data/spect csv'target_index= data data_from_file('data/mail_reading csv'target_index=- data data_from_file('data/carbool csv'target_index=- learner linear_learner(data,**argslearner learn(version june