Skip to content

Commit 1b4dc0d

Browse files
committed
fix format errors
1 parent f4c8e63 commit 1b4dc0d

File tree

6 files changed

+31
-15
lines changed

6 files changed

+31
-15
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
* [Python](python/python-basic)
1616
* [Pandas](python/pandas)
1717
* [NumPy](python/numpy)
18-
* [Matplotlib](python/matplotlib)
19-
* [Sklearn](python/sklearn)
18+
* [Matplotlib](python/Mtplotlib)
19+
* [Sklearn](python/Sklearn)
2020

2121
## 机器学习算法
2222
主要基于Machine Learning (Coursera, Andrew Ng) 的课程内容。

python/Matplotlib/README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
_Matplotlib_ 是一个 _Python_ 2D绘图库,可以生成各种硬拷贝格式和跨平台交互式环境的出版物质量数据。Matplotlib可用于 _Python_ 脚本,_Python__IPython_ shell,_Jupyter_ 笔记本,Web应用程序服务器和四个图形用户界面工具包。
44

5+
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
56

7+
- [Matplotlib](#matplotlib)
8+
- [画图基本说明](#画图基本说明)
9+
- [简单的例子](#简单的例子)
10+
- [多个子图](#多个子图)
11+
- [关于画图的一点意见](#关于画图的一点意见)
12+
- [Reference](#reference)
13+
14+
<!-- /TOC -->
615

716
## 画图基本说明
817
这张图说明了图的各个部分
@@ -29,7 +38,7 @@ plt.legend()
2938
plt.show()
3039
```
3140
<p align="center">
32-
<img src="https://www.matplotlib.org.cn/static/images/tutorials/sphx_glr_usage_003.png" />
41+
<img src="https://matplotlib.org/_images/sphx_glr_usage_003.png" />
3342
</p>
3443

3544
## 多个子图
@@ -44,13 +53,14 @@ my_plotter(ax2, data3, data4, {'marker': 'o'})
4453
```
4554

4655
<p align="center">
47-
<img src="https://www.matplotlib.org.cn/static/images/tutorials/sphx_glr_usage_006.png" />
56+
<img src="https://matplotlib.org/_images/sphx_glr_usage_006.png" />
4857
</p>
4958

5059
## 关于画图的一点意见
5160
这里并未总结很多画图的知识点,因为对于画图,个人认为初期不用花时间系统的学习所有画图技巧。只用对各种图的类型有一个概念或印象,在有需求的时候再查资料学习不迟。结合我自身的经验,几年前因为发论文的需要,有大量各种的图需要制作,而彼时我对MATLAB画图是一点不懂,也是遇到问题就Google、查资料各个击破。当然最终论文发表是没问题的,甚至被同学讲画的很Fancy。
5261

5362
## Reference
54-
* ![Matplotlib中文文档](https://www.matplotlib.org.cn/)
63+
* [Matplotlib官方文档](https://matplotlib.org/tutorials/index.html)
64+
* [Matplotlib中文文档](https://www.matplotlib.org.cn/)
5565

5666
[回到目录](#matplotlib)

python/Sklearn/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ digits = datasets.load_digits()
5555

5656
看看数据的大小:共1797行,每个数字图片是8*8的,所以有64列:
5757
``` python
58-
print(digits.data.shape) # => (1797, 64)
58+
print(digits.data.shape) # => (1797, 64)
5959
print(digits.target.shape) # => (1797,)
6060
```
6161

@@ -99,9 +99,9 @@ plt.show()
9999
Python 的内置的持久化模块joblib将模型保存:
100100
``` python
101101
from joblib import dump, load
102-
s = dumps(clf, "filename.joblib") # 保持此前fit的模型
103-
clf2 = load(s) # 加载之前存的模型
104-
clf2.predict(X[0:1]) # 做预测
102+
s = dumps(clf, "filename.joblib") # 保持此前fit的模型
103+
clf2 = load(s) # 加载之前存的模型
104+
clf2.predict(X[0:1]) # 做预测
105105
```
106106

107107
### 约定
@@ -154,4 +154,5 @@ print(classif.fit(X, y).predict(X))
154154
* [Scikit-learn官方文档(英文)](https://scikit-learn.org/stable/documentation.html)
155155
* [Scikit-learn中文文档](https://www.kancloud.cn/luponu/sklearn-doc-zh/889724)
156156
* [Scikit-learn与TensorFlow机器学习实战](https://hand2st.apachecn.org/)
157+
157158
[回到目录](#scikit-learn)

python/numpy/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,23 @@ array([[ 9., 5., 6., 3., 6., 8., 0., 7., 9., 7., 2., 7.],
167167
>>> c = a.view()
168168
>>> c is a
169169
False
170-
>>> c.base is a # c is a view of the data owned by a
170+
>>> c.base is a # c is a view of the data owned by a
171171
True
172172
>>> c.flags.owndata
173173
False
174174
>>>
175-
>>> c.shape = 2,6 # a's shape doesn't change
175+
>>> c.shape = 2,6 # a's shape doesn't change
176176
>>> a.shape
177177
(3, 4)
178-
>>> c[0,4] = 1234 # a's data changes
178+
>>> c[0,4] = 1234 # a's data changes
179179
```
180180
* 深拷贝 (Deep Copy)
181181
* `copy` 方法完全拷贝数组。
182182
``` python
183-
>>> d = a.copy() # a new array object with new data is created
183+
>>> d = a.copy() # a new array object with new data is created
184184
>>> d is a
185185
False
186-
>>> d.base is a # d doesn't share anything with a
186+
>>> d.base is a # d doesn't share anything with a
187187
False
188188
```
189189

python/pandas/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Pandas
22

33
Pandas是Python中用于数据处理和分析的库,尤其对于大数据行业的数据清洗很有帮助。
4-
> 通过带有标签的列和索引,Pandas 使我们可以以一种所有人都能理解的方式来处理数据。它可以让我们毫不费力地从诸如 csv 类型的文件中导入数据。我们可以用它快速地对数据进行复杂的转换和过滤等操作。
4+
5+
通过带有标签的列和索引,Pandas 使我们可以以一种所有人都能理解的方式来处理数据。它可以让我们毫不费力地从诸如 csv 类型的文件中导入数据。我们可以用它快速地对数据进行复杂的转换和过滤等操作。
56

67
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
78

python/python-basic/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- [Collecting arguments 多参数](#collecting-arguments-多参数)
3939
- [Scope 作用域](#scope-作用域)
4040
- [Objects and Classes 对象和类](#objects-and-classes-对象和类)
41+
- [Reference](#reference)
4142

4243
<!-- /TOC -->
4344

@@ -332,4 +333,7 @@ with open("example.txt", "w") as file:
332333
* 删除一个文件或目录:
333334
* `os.remove("filename_or_foldername")`
334335

336+
## Reference
337+
* [Python 3 官方文档](https://docs.python.org/zh-cn/3/)
338+
335339
[回到目录](#python基础)

0 commit comments

Comments
 (0)