For example: import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_blobs X, y = make_blob
Posted: Fri Jul 01, 2022 5:37 am
For example: import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_blobs X, y = make_blobs (100, 2, centers=2, random_state=2, cluster_std=1.5) fig, ax = plt.subplots() ax.scatter (X[:, 0], X[:, 1], c=y, s=50, cmap='RdBu') ax.set_title('Naive Bayes Model', size=14) plt.show() How to use argparse to change the value of "cluster_std" in command line?