But enough with the math, let's do some coding!
In the previous chapter, we learned how to generate a number of Gaussian blobs using scikit-learn. Do you remember how that is done?
But enough with the math, let's do some coding!
In the previous chapter, we learned how to generate a number of Gaussian blobs using scikit-learn. Do you remember how that is done?
The function I'm referring to resides within scikit-learn's datasets module. Let's create 100 data points, each belonging to one of two possible classes, and group them into two Gaussian blobs. To make the experiment reproducible, we specify an integer to pick a seed for the random_state. You can again pick whatever number you prefer. Here I went with Thomas Bayes' year of birth (just for kicks):
In [1]: from sklearn import datasets
... X, y = datasets...