Browse Source

Improve some English representation

pull/1/MERGE
bushuhui 4 years ago
parent
commit
1efdf82e07
6 changed files with 18 additions and 19 deletions
  1. +1
    -1
      3_kmeans/1-k-means.ipynb
  2. +6
    -7
      3_kmeans/1-k-means_EN.ipynb
  3. +1
    -1
      4_logistic_regression/1-Least_squares.ipynb
  4. +1
    -1
      4_logistic_regression/1-Least_squares_EN.ipynb
  5. +1
    -1
      4_logistic_regression/2-Logistic_regression.ipynb
  6. +8
    -8
      4_logistic_regression/2-Logistic_regression_EN.ipynb

+ 1
- 1
3_kmeans/1-k-means.ipynb View File

@@ -955,7 +955,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.9"
} }
}, },
"nbformat": 4, "nbformat": 4,


+ 6
- 7
3_kmeans/1-k-means_EN.ipynb View File

@@ -25,7 +25,7 @@
"J = \\sum_{k=1}^{K} \\sum_{i \\in C_k} | x_i - u_k|^2\n", "J = \\sum_{k=1}^{K} \\sum_{i \\in C_k} | x_i - u_k|^2\n",
"$$\n", "$$\n",
"\n", "\n",
"$u_k$is the centriod poisition$k$个类的重心位置,定义为:\n",
"$u_k$is the centriod poisition of samples from type $C_k$ with the definition of:\n",
"$$\n", "$$\n",
"u_k = \\frac{1}{|C_k|} \\sum_{x \\in C_k} x\n", "u_k = \\frac{1}{|C_k|} \\sum_{x \\in C_k} x\n",
"$$\n", "$$\n",
@@ -468,7 +468,7 @@
"\n", "\n",
" # step1: Initialize cluster center by the sample point that generate randomly\n", " # step1: Initialize cluster center by the sample point that generate randomly\n",
" centroids = randChosenCent(dataSet, k)\n", " centroids = randChosenCent(dataSet, k)\n",
" print('最初的中心=', centroids)\n",
" print('Original centers=', centroids)\n",
"\n", "\n",
" # Flag bit,if the result of sample classification before and after iteration has changed, the value is True\n", " # Flag bit,if the result of sample classification before and after iteration has changed, the value is True\n",
" clusterChanged = True\n", " clusterChanged = True\n",
@@ -483,7 +483,7 @@
" for i in range(m):\n", " for i in range(m):\n",
" # Initially define distance as infinite\n", " # Initially define distance as infinite\n",
" minDist = inf;\n", " minDist = inf;\n",
" # Initialize index value初始化索引值\n",
" # Initialize index value\n",
" minIndex = -1\n", " minIndex = -1\n",
" # Calculate the distance of each sample and k centriods\n", " # Calculate the distance of each sample and k centriods\n",
" for j in range(k):\n", " for j in range(k):\n",
@@ -491,7 +491,7 @@
" distJI = distEclud(centroids[j, :], dataSet.values[i, :])\n", " distJI = distEclud(centroids[j, :], dataSet.values[i, :])\n",
" # Judeg if the distance if the minimum\n", " # Judeg if the distance if the minimum\n",
" if distJI < minDist:\n", " if distJI < minDist:\n",
" # Update to get the minimum distance更新获取到最小距离\n",
" # Update to get the minimum distance\n",
" minDist = distJI\n", " minDist = distJI\n",
" # Get corresponding cluster numbers\n", " # Get corresponding cluster numbers\n",
" minIndex = j\n", " minIndex = j\n",
@@ -808,8 +808,7 @@
"1. For the ith smapel in the clusterded data$x_i$, calculate the average value between $x_i$ and all the other smaple in the same cluster, written as $a_i$, used to quantify the cohesion within a cluster\n", "1. For the ith smapel in the clusterded data$x_i$, calculate the average value between $x_i$ and all the other smaple in the same cluster, written as $a_i$, used to quantify the cohesion within a cluster\n",
"2. Choose a cluster $b$ outside of $x_i$, calculate the average distance between $x_i$ and all samples in cluster $b$, traverse all other cluster, find the closest average distance and noted as $b_i$, which can be used to quantify the degree of separation between clusters.\n", "2. Choose a cluster $b$ outside of $x_i$, calculate the average distance between $x_i$ and all samples in cluster $b$, traverse all other cluster, find the closest average distance and noted as $b_i$, which can be used to quantify the degree of separation between clusters.\n",
"3. For sample $x_i$, Silhouette Coefficient is $sc_i = \\frac{b_i−a_i}{max(b_i,a_i)}$ \n", "3. For sample $x_i$, Silhouette Coefficient is $sc_i = \\frac{b_i−a_i}{max(b_i,a_i)}$ \n",
"4. Finally, calculate average value for all sample $\\mathbf{X}$, which will be the Silhouette Coefficient for current cluster result.\n",
"4. 最后,对所以样本集合$\\mathbf{X}$求出平均值,即为当前聚类结果的整体轮廓系数。"
"4. Finally, calculate average value for all sample $\\mathbf{X}$, which will be the Silhouette Coefficient for current cluster result."
] ]
}, },
{ {
@@ -1004,7 +1003,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.9"
} }
}, },
"nbformat": 4, "nbformat": 4,


+ 1
- 1
4_logistic_regression/1-Least_squares.ipynb View File

@@ -5146,7 +5146,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.9"
} }
}, },
"nbformat": 4, "nbformat": 4,


+ 1
- 1
4_logistic_regression/1-Least_squares_EN.ipynb View File

@@ -4406,7 +4406,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.9"
} }
}, },
"nbformat": 4, "nbformat": 4,


+ 1
- 1
4_logistic_regression/2-Logistic_regression.ipynb View File

@@ -698,7 +698,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.9"
} }
}, },
"nbformat": 4, "nbformat": 4,


+ 8
- 8
4_logistic_regression/2-Logistic_regression_EN.ipynb
File diff suppressed because it is too large
View File


Loading…
Cancel
Save