• Charlie258
    了解作者
  • Python
    开发工具
  • 13MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2018-03-02 22:53
    上传日期
Hands-On.Machine.Learning.with.Scikit-Learn.and.TensorFlow
handson-ml-master.zip
  • handson-ml-master
  • datasets
  • lifesat
  • README.md
    4.2KB
  • gdp_per_capita.csv
    35.5KB
  • oecd_bli_2015.csv
    396KB
  • inception
  • imagenet_class_names.txt
    30.9KB
  • housing
  • housing.csv
    1.4MB
  • README.md
    3.6KB
  • housing.tgz
    399.9KB
  • images
  • cnn
  • test_image.png
    177.6KB
  • README
    34B
  • rl
  • README
    34B
  • svm
  • README
    34B
  • tensorflow
  • README
    34B
  • autoencoders
  • README
    34B
  • ensembles
  • README
    34B
  • distributed
  • README
    34B
  • training_linear_models
  • README
    34B
  • decision_trees
  • README
    34B
  • classification
  • README
    34B
  • rnn
  • README
    34B
  • fundamentals
  • README
    34B
  • deep
  • README
    34B
  • end_to_end_project
  • california.png
    9.8KB
  • README
    34B
  • dim_reduction
  • README
    34B
  • ann
  • README
    34B
  • 14_recurrent_neural_networks.ipynb
    668.5KB
  • .gitignore
    112B
  • 08_dimensionality_reduction.ipynb
    3.6MB
  • README.md
    7.8KB
  • 04_training_linear_models.ipynb
    881.2KB
  • 06_decision_trees.ipynb
    208.4KB
  • tools_numpy.ipynb
    620.2KB
  • tools_pandas.ipynb
    395.5KB
  • 02_end_to_end_machine_learning_project.ipynb
    1.3MB
  • 05_support_vector_machines.ipynb
    897KB
  • 09_up_and_running_with_tensorflow.ipynb
    230.4KB
  • LICENSE
    9.9KB
  • 01_the_machine_learning_landscape.ipynb
    256.9KB
  • index.ipynb
    4.3KB
  • 16_reinforcement_learning.ipynb
    1.2MB
  • 03_classification.ipynb
    443.4KB
  • 12_distributed_tensorflow.ipynb
    16.7KB
  • tools_matplotlib.ipynb
    1.1MB
  • 07_ensemble_learning_and_random_forests.ipynb
    526.9KB
  • 11_deep_learning.ipynb
    505.1KB
  • 13_convolutional_neural_networks.ipynb
    4.8MB
  • requirements.txt
    1.4KB
  • 15_autoencoders.ipynb
    341.3KB
  • 10_introduction_to_artificial_neural_networks.ipynb
    321.3KB
  • math_linear_algebra.ipynb
    657.7KB
  • book_equations.ipynb
    47.9KB
内容介绍
Machine Learning Notebooks ========================== This project aims at teaching you the fundamentals of Machine Learning in python. It contains the example code and solutions to the exercises in my O'Reilly book [Hands-on Machine Learning with Scikit-Learn and TensorFlow](http://shop.oreilly.com/product/0636920052289.do): [![book](http://akamaicovers.oreilly.com/images/0636920052289/cat.gif)](http://shop.oreilly.com/product/0636920052289.do) Simply open the [Jupyter](http://jupyter.org/) notebooks you are interested in: * Using [jupyter.org's notebook viewer](http://nbviewer.jupyter.org/github/ageron/handson-ml/blob/master/index.ipynb) * note: [github.com's notebook viewer](https://github.com/ageron/handson-ml/blob/master/index.ipynb) also works but it is slower and the math formulas are not displayed correctly, * or by cloning this repository and running Jupyter locally. This option lets you play around with the code. In this case, follow the installation instructions below. # Installation First, you will need to install [git](https://git-scm.com/), if you don't have it already. Next, clone this repository by opening a terminal and typing the following commands: $ cd $HOME # or any other development directory you prefer $ git clone https://github.com/ageron/handson-ml.git $ cd handson-ml If you want to go through chapter 16 on Reinforcement Learning, you will need to [install OpenAI gym](https://gym.openai.com/docs) and its dependencies for Atari simulations. If you are familiar with Python and you know how to install Python libraries, go ahead and install the libraries listed in `requirements.txt` and jump to the [Starting Jupyter](#starting-jupyter) section. If you need detailed instructions, please read on. ## Python & Required Libraries Of course, you obviously need Python. Python 2 is already preinstalled on most systems nowadays, and sometimes even Python 3. You can check which version(s) you have by typing the following commands: $ python --version # for Python 2 $ python3 --version # for Python 3 Any Python 3 version should be fine, preferably ≥3.5. If you don't have Python 3, I recommend installing it (Python ≥2.6 should work, but it is deprecated so Python 3 is preferable). To do so, you have several options: on Windows or MacOSX, you can just download it from [python.org](https://www.python.org/downloads/). On MacOSX, you can alternatively use [MacPorts](https://www.macports.org/) or [Homebrew](https://brew.sh/). On Linux, unless you know what you are doing, you should use your system's packaging system. For example, on Debian or Ubuntu, type: $ sudo apt-get update $ sudo apt-get install python3 Another option is to download and install [Anaconda](https://www.continuum.io/downloads). This is a package that includes both Python and many scientific libraries. You should prefer the Python 3 version. If you choose to use Anaconda, read the next section, or else jump to the [Using pip](#using-pip) section. ## Using Anaconda When using Anaconda, you can optionally create an isolated Python environment dedicated to this project. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially different libraries and library versions: $ conda create -n mlbook python=3.5 anaconda $ source activate mlbook This creates a fresh Python 3.5 environment called `mlbook` (you can change the name if you want to), and it activates it. This environment contains all the scientific libraries that come with Anaconda. This includes all the libraries we will need (NumPy, Matplotlib, Pandas, Jupyter and a few others), except for TensorFlow, so let's install it: $ conda install -n mlbook -c conda-forge tensorflow=1.0.0 This installs TensorFlow 1.0.0 in the `mlbook` environment (fetching it from the `conda-forge` repository). If you chose not to create an `mlbook` environment, then just remove the `-n mlbook` option. Next, you can optionally install Jupyter extensions. These are useful to have nice tables of contents in the notebooks, but they are not required. $ conda install -n mlbook -c conda-forge jupyter_contrib_nbextensions You are all set! Next, jump to the [Starting Jupyter](#starting-jupyter) section. ## Using pip If you are not using Anaconda, you need to install several scientific Python libraries that are necessary for this project, in particular NumPy, Matplotlib, Pandas, Jupyter and TensorFlow (and a few others). For this, you can either use Python's integrated packaging system, pip, or you may prefer to use your system's own packaging system (if available, e.g. on Linux, or on MacOSX when using MacPorts or Homebrew). The advantage of using pip is that it is easy to create multiple isolated Python environments with different libraries and different library versions (e.g. one environment for each project). The advantage of using your system's packaging system is that there is less risk of having conflicts between your Python libraries and your system's other packages. Since I have many projects with different library requirements, I prefer to use pip with isolated environments. These are the commands you need to type in a terminal if you want to use pip to install the required libraries. Note: in all the following commands, if you chose to use Python 2 rather than Python 3, you must replace `pip3` with `pip`, and `python3` with `python`. First you need to make sure you have the latest version of pip installed: $ pip3 install --user --upgrade pip The `--user` option will install the latest version of pip only for the current user. If you prefer to install it system wide (i.e. for all users), you must have administrator rights (e.g. use `sudo pip3` instead of `pip3` on Linux), and you should remove the `--user` option. The same is true of the command below that uses the `--user` option. Next, you can optionally create an isolated environment. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially very different libraries, and different versions: $ pip3 install --user --upgrade virtualenv $ virtualenv -p `which python3` env This creates a new directory called `env` in the current directory, containing an isolated Python environment based on Python 3. If you installed multiple versions of Python 3 on your system, you can replace `` `which python3` `` with the path to the Python executable you prefer to use. Now you must activate this environment. You will need to run this command every time you want to use this environment. $ source ./env/bin/activate Next, use pip to install the required python packages. If you are not using virtualenv, you should add the `--user` option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using `sudo pip3` instead of `pip3` on Linux). $ pip3 install --upgrade -r requirements.txt Great! You're all set, you just need to start Jupyter now. ## Starting Jupyter If you want to use the Jupyter extensions (optional, they are mainly useful to have nice tables of contents), you first need to install them: $ jupyter contrib nbextension install --user Then you can activate an extension, such as the Table of Contents (2) extension: $ jupyter nbextension enable toc2/main Okay! You can now start Jupyter, simply type: $ jupyter notebook This should open up your browser, and you should see Jupyter's tree view, with the contents of the current directory. If your browser does not open automatically, visit [localhost:8888](http://localhost:8888/tree). Click on `index.ipynb` to get started! Note: you can also visit [http://localhost:8888/nbextensions](http://localhost:8888/nbextensions) to activate and configure Jupyter extensions. Congrats! You are ready to learn Machine Learning, hand
评论
    相关推荐