How to load sklearn Boston Housing data?

How to load sklearn Boston Housing data?

This recipe helps you load sklearn Boston Housing data
In [1]:
## How to load sklearn Boston Housing data 
def Kickstarter_Example_21():
    print()
    print(format('How to load sklearn Boston housing data', '*^72'))

    # Load libraries
    from sklearn import datasets

    # Load Boston Housing Dataset
    boston = datasets.load_boston()

    # Create feature matrix
    X = boston.data
    print(); print(X.shape);

    #print(X)
    # Create target vector
    y = boston.target
    print(); print(y.shape);
    #print(y)

Kickstarter_Example_21()
****************How to load sklearn Boston housing data*****************

(506, 13)

(506,)


Stuck at work?
Can't find the recipe you are looking for. Let us know and we will find an expert to create the recipe for you. Click here
Companies using this Recipe
2 developers from Tata Consultancy Services
1 developer from KPMG
1 developer from Vodafone
1 developer from Altimetrik
1 developer from LTI
1 developer from YASH Technologies
1 developer from Embicon
1 developer from MudraCircle
1 developer from HvH