当前位置:网站首页>Make a skylearn high-dimensional dataset_ Circles and make_ moons
Make a skylearn high-dimensional dataset_ Circles and make_ moons
2022-06-25 08:59:00 【Guoqingru】
sklearn High dimensional dataset production make_circles and make_moons
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.datasets import make_circles
from sklearn.datasets import make_moons
# Generate the data make_circles and make_moons, And display X = 400x2, Y = {
0, 1}400 , drawing :
# Return value x:[n_samples, 2] Array of shapes , Generated samples
# y:[n_samples] Array of shapes , Label of each sample (0 or 1)
def draw_circle_and_moon():
X_circle,Y_circle=make_circles(n_samples=400,noise=0.1,factor=0.1)
plt.figure("circle")
plt.scatter(X_circle[:,0],X_circle[:,1],s=100,marker="o",edgecolors='r',c=Y_circle)
#c=Y_circle Color that divides the two label data
plt.title('data by make_circles()')
X_moon,Y_moon=make_moons(n_samples=400,noise=0.1)
plt.figure("moon")
plt.scatter(X_moon[:,0],X_moon[:,1],s=100,marker="o",edgecolors='m',c=Y_moon)
plt.title('data by make_moons()')
plt.show()
draw_circle_and_moon()
边栏推荐
猜你喜欢
View all listening events on the current page by browser
关掉一个线程
四、卷积神经网络(Convolution Neural Networks)
Prepare for the 1000 Android interview questions and answers that golden nine silver ten must ask in 2022, and completely solve the interview problems
高速缓冲存储器Cache的映射方式
Unity--Configurable Joint——简单教程,带你入门可配置关节
二、训练fashion_mnist数据集
Easyplayer streaming media player plays HLS video. Technical optimization of slow starting speed
matplotlib matplotlib中plt.axis()用法
Check whether the point is within the polygon
随机推荐
How to design test cases
IC研发常用英文术语缩写
Are the top ten securities companies at great risk of opening accounts and safe and reliable?
Notes on key vocabulary of the original English work biography of jobs (I) [introduction]
声纹技术(一):声纹技术的前世今生
How to choose an account opening broker? Is it safe to open an account online?
Le labyrinthe des huit diagrammes de la bataille de cazy Chang'an
On which platform is it safe to buy shares and open an account? Ask for sharing
打新债安全性有多高啊
4、 Convolution neural networks
3、 Automatically terminate training
Lvs-dr mode multi segment case
【MYSQL】事务的理解
C language: bubble sort
《乔布斯传》英文原著重点词汇笔记(六)【 chapter three 】
Socket programming -- epoll model
Chinese solution cannot be entered after webgl is published
Oracle-单行函数大全
(翻译)采用字母间距提高全大写文本可读性的方式
Stimulsoft ultimate presents reports and dashboards