VirtualBox安装

下载链接:(6.1.14版本)https://download.virtualbox.org/virtualbox/6.1.14/VirtualBox-6.1.14-140239-Win.exe

安装的时候直接默认设置一直下一步就行,但注意VirtualBox6需要开启硬件虚拟化才可以使用(错误提示及解决见 https://blog.csdn.net/haibo0668/article/details/101716875 ),开启硬件虚拟化的方法见 https://jingyan.baidu.com/article/ab0b56305f2882c15afa7dda.htmlhttps://jingyan.baidu.com/article/e2284b2bba4804e2e7118d5f.html 等。

删除mac里面-_开头的文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os

def count_and_print(path, level=0, printable=True, threshold=0):
count = 0
files = os.listdir(path)
for i in files:
file = os.path.join(path, i)
if os.path.isfile(file):
if i.startswith("._"):
os.remove(file)
count += 1
print(file)
elif os.path.isdir(file):
count += count_and_print(file, level+1, printable=printable, threshold=threshold)
if printable and count > threshold:
print('\t' * (level + 1) + path + '\t' + str(count))
return count

半朴素贝叶斯

这几天读论文读到了半朴素贝叶斯分类器,所以搜了一下。

https://blog.csdn.net/uncle_gy/article/details/79107637

朴素贝叶斯可以直接计算每个属性取每个值的概率,认为他们是互相独立的。但半朴素贝叶斯可以让他们之间存在关联,假设每个属性在类别之外最多仅依赖于一个其他属性。

并且贝叶斯如果要处理连续数值的话,可以把连续数值直接用别的分布进行建模,从而方便每一个数字的概率计算。