Classifying Boston Housing Data based on 50th percentile using python

29 Views Asked by At

I am trying to complete the following problem using python.

The Boston housing dataset comes prepackaged with scikit-learn. The dataset has 506 data points, 13 features, and 1 target (response) variable. You can find more information about the dataset here: https://scikit-learn.org/stable/modules/generated/sklearn. datasets.load_boston.html.

Create the two following data set: Boston50: Let τ50 be the median (50th percentile) over all t (response) values. Create a 2-class classification problem such that one class corresponds to label y=1 if t≥τ50 and the other class corresponds to label y=0 if t<τ50.