clusters.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:extract 作者: dblalock 项目源码 文件源码
def makeSimpleDatasets(n_samples=1500): # from sklearn example
    np.random.seed(0)
    # Generate datasets. We choose the size big enough to see the scalability
    # of the algorithms, but not too big to avoid too long running times
    n_samples = 1500
    noisy_circles = datasets.make_circles(n_samples=n_samples, factor=.5,
                                          noise=.05)
    noisy_moons = datasets.make_moons(n_samples=n_samples, noise=.05)
    blobs = datasets.make_blobs(n_samples=n_samples, random_state=8)
    no_structure = np.random.rand(n_samples, 2), None

    return [noisy_circles, noisy_moons, blobs, no_structure]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号