<div dir="ltr">Se encuentra nuevo error en guia de models linear:<div><br></div><div>from sklearn.compose import make_column_transformer<br>from sklearn.preprocessing import OneHotEncoder<br><br>categorical_columns = ["RACE", "OCCUPATION", "SECTOR", "MARR", "UNION", "SEX", "SOUTH"]<br>numerical_columns = ["EDUCATION", "EXPERIENCE", "AGE"]<br><br>preprocessor = make_column_transformer(<br>    (OneHotEncoder(drop="if_binary"), categorical_columns),<br>    remainder="passthrough",<br>    verbose_feature_names_out=False,  # avoid to prepend the preprocessor names<br>)</div><div>------------------------------------------------------------------------------</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:monospace,Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(130,198,255)">!</span>pip install scipy</div><div><span style="color:rgb(197,134,192)">import</span> scipy <span style="color:rgb(197,134,192)">as</span> sp</div><br><div><span style="color:rgb(197,134,192)">from</span> sklearn.compose <span style="color:rgb(197,134,192)">import</span> make_column_transformer</div><div><span style="color:rgb(197,134,192)">from</span> sklearn.preprocessing <span style="color:rgb(197,134,192)">import</span> OneHotEncoder</div><br><div>categorical_columns = <span style="color:rgb(220,220,220)">[</span><span style="color:rgb(206,145,120)">"RACE"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"OCCUPATION"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"SECTOR"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"MARR"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"UNION"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"SEX"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"SOUTH"</span><span style="color:rgb(220,220,220)">]</span></div><div>numerical_columns = <span style="color:rgb(220,220,220)">[</span><span style="color:rgb(206,145,120)">"EDUCATION"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"EXPERIENCE"</span><span style="color:rgb(220,220,220)">,</span> <span style="color:rgb(206,145,120)">"AGE"</span><span style="color:rgb(220,220,220)">]</span></div><br><div>preprocessor = make_column_transformer<span style="color:rgb(220,220,220)">(</span></div><div>    <span style="color:rgb(220,220,220)">(</span>OneHotEncoder<span style="color:rgb(220,220,220)">(</span>drop=<span style="color:rgb(206,145,120)">"if_binary"</span><span style="color:rgb(220,220,220)">),</span> categorical_columns<span style="color:rgb(220,220,220)">),</span></div><div>    remainder=<span style="color:rgb(206,145,120)">"passthrough"</span><span style="color:rgb(220,220,220)">,</span></div><div>    verbose_feature_names_out=<span style="color:rgb(86,156,214)">False</span><span style="color:rgb(220,220,220)">,</span>  <span style="color:rgb(106,169,79)"># avoid to prepend the preprocessor names</span></div><div><span style="color:rgb(220,220,220)">)</span></div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:427.5px;vertical-align:-webkit-baseline-middle;font-size:medium;font-family:Arial"><tbody><tr style="border:0px;margin:0px;padding:0px;color:rgb(255,255,255)"><td style="border:0px;padding:0px"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:427.5px;vertical-align:-webkit-baseline-middle"><tbody><tr style="border:0px;margin:0px;padding:0px"><td style="border:0px;padding:0px;vertical-align:middle"><h2 color="#000000" style="line-height:1.38;margin:0px"><span style="color:rgb(0,0,0);font-size:18px">Carlos</span><span style="color:rgb(0,0,0);font-size:18px"> </span><font color="#000000"><span style="font-size:18px">González T.</span></font></h2><p color="#000000" style="font-size:14px;line-height:22px;margin:0px;color:rgb(0,0,0)"><span>Ing. Informático.</span></p></td><td width="30" style="border:0px;padding:0px"><div style="width:30px"></div></td><td color="#f2547d" width="1" height="auto" style="border-top:0px;border-right:0px;border-bottom:none;border-left:1px solid rgb(242,84,125);padding:0px;width:1px"></td><td width="30" style="border:0px;padding:0px"><div style="width:30px"></div></td><td style="border:0px;padding:0px;vertical-align:middle"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:206.938px;vertical-align:-webkit-baseline-middle"><tbody><tr height="25" style="border:0px;margin:0px;padding:0px;vertical-align:middle"><td width="30" style="border:0px;padding:0px;vertical-align:middle"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:30px;vertical-align:-webkit-baseline-middle"><tbody><tr style="border:0px;margin:0px;padding:0px"><td style="border:0px;padding:0px;vertical-align:bottom"><span color="#f2547d" width="11" style="display:inline-block;background-color:rgb(242,84,125)"><img src="https://cdn2.hubspot.net/hubfs/53/tools/email-signature-generator/icons/phone-icon-2x.png" color="#f2547d" alt="mobilePhone" width="13" style="border-style:none;display:block"></span></td></tr></tbody></table></td><td style="border:0px;padding:0px;color:rgb(0,0,0)"><a href="tel:+56977542105" color="#000000" style="background-color:rgba(0,0,0,0);color:rgb(0,0,0);font-size:12px" target="_blank">+56977542105</a></td></tr><tr height="25" style="border:0px;margin:0px;padding:0px;vertical-align:middle"><td width="30" style="border:0px;padding:0px;vertical-align:middle"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:30px;vertical-align:-webkit-baseline-middle"><tbody><tr style="border:0px;margin:0px;padding:0px"><td style="border:0px;padding:0px;vertical-align:bottom"><span color="#f2547d" width="11" style="display:inline-block;background-color:rgb(242,84,125)"><img src="https://cdn2.hubspot.net/hubfs/53/tools/email-signature-generator/icons/email-icon-2x.png" color="#f2547d" alt="emailAddress" width="13" style="border-style:none;display:block"></span></td></tr></tbody></table></td><td style="border:0px;padding:0px"><a href="mailto:carlos.gonzalez1006@gmail.com" color="#000000" style="background-color:rgba(0,0,0,0);color:rgb(0,0,0);font-size:12px" target="_blank">carlos.gonzalez1006@gmail.com</a></td></tr><tr height="25" style="border:0px;margin:0px;padding:0px;vertical-align:middle"><td width="30" style="border:0px;padding:0px;vertical-align:middle"><table cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;width:30px;vertical-align:-webkit-baseline-middle"><tbody><tr style="border:0px;margin:0px;padding:0px"><td style="border:0px;padding:0px;vertical-align:bottom"><span color="#f2547d" width="11" style="display:inline-block;background-color:rgb(242,84,125)"><img src="https://cdn2.hubspot.net/hubfs/53/tools/email-signature-generator/icons/address-icon-2x.png" color="#f2547d" alt="address" width="13" style="border-style:none;display:block"></span></td></tr></tbody></table></td><td style="border:0px;padding:0px"><span color="#000000" style="font-size:12px;color:rgb(0,0,0)">Maipú, Santiago</span></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="border:0px;margin:0px;padding:0px;color:rgb(255,255,255)"><td style="border:0px;padding:0px"></td></tr><tr style="border:0px;margin:0px;padding:0px;color:rgb(255,255,255)"></tr></tbody></table></div></div></div></div>