Skip to content

update chapter 6 index #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 02_TensorFlow_Way/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
creating a simple classifier and then show an example of evaluating regression and
classification algorithms.


下载本章 :download:`Jupyter Notebook <https://github.com/qmlcode/qml/blob/master/qml/wrappers.py>`


计算图
Expand Down
30 changes: 13 additions & 17 deletions 04_Support_Vector_Machines/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
.. toctree::
:maxdepth: 3

/03_Linear_Regression/01_Using_the_Matrix_Inverse_Method/index
/04_Support_Vector_Machines/01_Introduction/index


We introduce the concept of SVMs and how we will go about implementing them in the TensorFlow
framework.

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/01_Using_the_Matrix_Inverse_Method/01_lin_reg_inverse.ipynb>`
We introduce the concept of SVMs and how we will go about implementing them in the TensorFlow framework.

------------

Expand All @@ -26,14 +23,14 @@ framework.
.. toctree::
:maxdepth: 3

/03_Linear_Regression/02_Implementing_a_Decomposition_Method/index
/04_Support_Vector_Machines/02_Working_with_Linear_SVMs/index

We create a linear SVM to separate I. setosa based on sepal length and pedal width in the Iris
data set.

.. image::

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/02_Implementing_a_Decomposition_Method/02_lin_reg_decomposition.ipynb>`
下载本章 :download:`Jupyter Notebook </04_Support_Vector_Machines/02_Working_with_Linear_SVMs/02_linear_svm.ipynb>`

-----

Expand All @@ -42,14 +39,13 @@ data set.
.. toctree::
:maxdepth: 3

/03_Linear_Regression/03_TensorFlow_Way_of_Linear_Regression/index
/04_Support_Vector_Machines/03_Reduction_to_Linear_Regression/index

The heart of SVMs is separating classes with a line. We change tweek the algorithm slightly
to perform SVM regression.
The heart of SVMs is separating classes with a line. We change tweek the algorithm slightly to perform SVM regression.

.. image::

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/03_TensorFlow_Way_of_Linear_Regression/03_lin_reg_tensorflow_way.ipynb>`
下载本章 :download:`Jupyter Notebook </04_Support_Vector_Machines/03_Reduction_to_Linear_Regression/03_support_vector_regression.ipynb>`

-----------

Expand All @@ -58,12 +54,12 @@ TensorFlow中的核
.. toctree::
:maxdepth: 3

/03_Linear_Regression/04_Loss_Functions_in_Linear_Regressions/index
/04_Support_Vector_Machines/04_Working_with_Kernels/index

In order to extend SVMs into non-linear data, we explain and show how to implement different kernels
in TensorFlow.

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/04_Loss_Functions_in_Linear_Regressions/04_lin_reg_l1_vs_l2.ipynb>`
下载本章 :download:`Jupyter Notebook </04_Support_Vector_Machines/04_Working_with_Kernels/04_svm_kernels.ipynb>`

-----------

Expand All @@ -72,11 +68,11 @@ in TensorFlow.
.. toctree::
:maxdepth: 3

/03_Linear_Regression/05_Implementing_Deming_Regression/index
/04_Support_Vector_Machines/05_Implementing_Nonlinear_SVMs/index

We use the Gaussian kernel (RBF) to separate non-linear classes.

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/05_Implementing_Deming_Regression/05_deming_regression.ipynb>`
下载本章 :download:`Jupyter Notebook </04_Support_Vector_Machines/05_Implementing_Nonlinear_SVMs/05_nonlinear_svm.ipynb>`

-------------

Expand All @@ -86,14 +82,14 @@ We use the Gaussian kernel (RBF) to separate non-linear classes.
.. toctree::
:maxdepth: 3

/03_Linear_Regression/06_Implementing_Lasso_and_Ridge_Regression/index
/04_Support_Vector_Machines/06_Implementing_Multiclass_SVMs/index

SVMs are inherently binary predictors. We show how to extend them in a one-vs-all strategy in
TensorFlow.

.. image::

下载本章 :download:`Jupyter Notebook </03_Linear_Regression/06_Implementing_Lasso_and_Ridge_Regression/06_lasso_and_ridge_regression.ipynb>`
下载本章 :download:`Jupyter Notebook </04_Support_Vector_Machines/06_Implementing_Multiclass_SVMs/06_multiclass_svm.ipynb>`

-----------

Expand Down
111 changes: 98 additions & 13 deletions 05_Nearest_Neighbor_Methods/index.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,124 @@
Nearest Neighbor methods are a very popular ML algorithm. We show how to implement k-Nearest
Neighbors, weighted k-Nearest Neighbors, and k-Nearest Neighbors with mixed distance functions.
In this chapter we also show how to use the Levenshtein distance (edit distance) in TensorFlow,
and use it to calculate the distance between strings. We end this chapter with showing how to
use k-Nearest Neighbors for categorical prediction with the MNIST handwritten digit recognition.
.. note::

引言
=====
Nearest Neighbor methods are a very popular ML algorithm. We show how to implement k-Nearest
Neighbors, weighted k-Nearest Neighbors, and k-Nearest Neighbors with mixed distance functions.
In this chapter we also show how to use the Levenshtein distance (edit distance) in TensorFlow,
and use it to calculate the distance between strings. We end this chapter with showing how to
use k-Nearest Neighbors for categorical prediction with the MNIST handwritten digit recognition.

引言
----------------
.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/01_Introduction/index

We introduce the concepts and methods needed for performing k-Nearest Neighbors in TensorFlow.

------------

最近邻法的使用
=============
---------------
.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/02_Working_with_Nearest_Neighbors/index

We create a nearest neighbor algorithm that tries to predict housing worth (regression).


.. image::

下载本章 :download:`Jupyter Notebook </05_Nearest_Neighbor_Methods/02_Working_with_Nearest_Neighbors/02_nearest_neighbor.ipynb>`

-----

文本距离函数
============
--------------
.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/03_Working_with_Text_Distances/index

In order to use a distance function on text, we show how to use edit distances in TensorFlow.

.. image::

下载本章 :download:`Jupyter Notebook </05_Nearest_Neighbor_Methods/03_Working_with_Text_Distances/03_text_distances.ipynb>`

-----------

计算混合距离函数
===============
----------
.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/04_Computing_with_Mixed_Distance_Functions/index

Here we implement scaling of the distance function by the standard deviation of the input
feature for k-Nearest Neighbors.


下载本章 :download:`Jupyter Notebook </05_Nearest_Neighbor_Methods/04_Computing_with_Mixed_Distance_Functions/04_mixed_distance_functions_knn.ipynb>`

-----------

地址匹配
========
-------------
.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/05_An_Address_Matching_Example/index


We use a mixed distance function to match addresses. We use numerical distance for zip codes,
and string edit distance for street names. The street names are allowed to have typos.


下载本章 :download:`Jupyter Notebook </05_Nearest_Neighbor_Methods/05_An_Address_Matching_Example/05_address_matching.ipynb>`

-------------

图像处理的近邻法
==============

-----------

.. toctree::
:maxdepth: 3

/05_Nearest_Neighbor_Methods/06_Nearest_Neighbors_for_Image_Recognition/index


The MNIST digit image collection is a great data set for illustration of how to perform
k-Nearest Neighbors for an image classification task.

.. image::

下载本章 :download:`Jupyter Notebook </05_Nearest_Neighbor_Methods/06_Nearest_Neighbors_for_Image_Recognition/06_image_recognition.ipynb>`

-----------

本章学习模块
-----------

.. Submodules
.. ----------

*tensorflow\.zeros*
^^^^^^^^^^^^^^^^^^^

.. automodule:: tensorflow.zeros
:members:
:undoc-members:
:show-inheritance:

------

*tensorflow\.ones*
^^^^^^^^^^^^^^^^^^

.. automodule:: tensorflow.ones
:members:
:undoc-members:
:show-inheritance:

-------------