复习
# 1 机器学习基础 ## 1.1 机器学习分类 ### 1.1.1 监督学习(Supervised Learning) 使用带有标签的数据集训练,常见算法包括: - 回归(Regression) - 分类(Classification) ### 1.1.2 无监督学习(Unsupervised Learning) 使用没有标签的数据集训练,常见算法包括: - 降维(Dimension Reduction) - 聚类(Clustering) ## 1.2 模型评估指标 ### 1.2.1 回归指标 这些指标用于衡量回归模型预测值与实际值之间的差异: - 均方误差(Mean Square Error):$MSE = \frac{1}{n}\sum_{i=1}^{n} (y_i - \hat{y_i})^2$ - 均方根误差(Root Mean Squared Error):$RMSE = \sqrt{MSE}$ - 平均绝对误差(Mean Absolute Error, MAE):$MAE = \frac{1}{n}\sum_{i=1}^{n}...
排序算法
十大经典排序算法 冒泡排序 111111 1111111111111 111111111111 11111111111111 选择排序 1 冒泡排序(Bubble Sort)算法步骤 比较相邻的元素。如果第一个比第二个大,就交换他们两个。 对每一对相邻元素作同样的工作,从开始第一对到结尾的最后一对。这步做完后,最后的元素会是最大的数。 针对所有的元素重复以上的步骤,除了最后一个。 持续每次对越来越少的元素重复上面的步骤,直到没有任何一对数字需要比较。 代码实现123456def bubbleSort(arr): for i in range(len(arr) - 1): for j in range(len(arr) - 1 - i): if arr[j] > arr[j+1]: arr[j], arr[j+1] = arr[j+1], arr[j] ...
Python数据类型
Python内置数据类型(Built-in Types)1.文本类型(Text Type) 字符串(str) 2.数值类型(Numeric Types) 整数(int) 浮点数(float) 复数(complex) 3.序列类型(Sequence Types)列表(list) 元组(tuple) (range) 4.映射类型(Mapping Type)字典(dict) 5.集合类型(Set Types)(set) (frozenset) 6.(Boolean Type)(bool) 7.二进制类型(Binary Types)(bytes) (bytearray) () 8.空类型(None Type)
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment