Git Product home page Git Product logo

Comments (3)

ageron avatar ageron commented on May 3, 2024 2

@dpnolan I'm really glad you enjoy the book, thanks for your feedback and good luck with your installation.

from handson-ml.

ageron avatar ageron commented on May 3, 2024

Hi @dpnolan ,

That's odd, I just tried it and everything worked fine. Perhaps it's a temporary connectivity issue or server error? Could you please retry?

Here's my output:

Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sklearn.datasets import fetch_california_housing
>>> housing = fetch_california_housing()
downloading Cal. housing from http://www.dcc.fc.up.pt/~ltorgo/Regression/cal_housing.tgz to /home/ageron/scikit_learn_data
>>> m,n=housing.data.shape
>>> housing_data_plus_bias = np.c_[np.ones((m,1)), housing.data]
>>> housing_data_plus_bias
array([[   1.        ,    8.3252    ,   41.        , ...,    2.55555556,
          37.88      , -122.23      ],
       [   1.        ,    8.3014    ,   21.        , ...,    2.10984183,
          37.86      , -122.22      ],
       [   1.        ,    7.2574    ,   52.        , ...,    2.80225989,
          37.85      , -122.24      ],
       ..., 
       [   1.        ,    1.7       ,   17.        , ...,    2.3256351 ,
          39.43      , -121.22      ],
       [   1.        ,    1.8672    ,   18.        , ...,    2.12320917,
          39.43      , -121.32      ],
       [   1.        ,    2.3886    ,   16.        , ...,    2.61698113,
          39.37      , -121.24      ]])

Notice the URL where Scikit-Learn fetches the data. By default, this tgz file is saved to ~/scikit_learn_data:

$ ls -l ~/scikit_learn_data/
total 372
-rw-r--r-- 1 ageron ageron 366877 avril 16 22:37 cal_housing_py3.pkz
drwxr-xr-x 2 ageron ageron   4096 avril  8 14:21 mldata

Perhaps this file exists on your machine, but it is corrupted? If so, try deleting it, then try again.

from handson-ml.

dpnolan avatar dpnolan commented on May 3, 2024

Hi Aurélien, I have this working on the Python 2 version when I run that. There seem to be some problems with my Anaconda setup, so I will re-install. I should perhaps not start off with chapter 9. Thanks. It's a great book. Peter

from handson-ml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.