clustering people based on income and age let' see just how easy it is to do -means clustering using scikit-learn and python the first thing we're going to do is create some random data that we want to try to cluster just to make it easierwe'll actually build some clusters into our fake test data so let' pretend there' some real fundamental relationship between these dataand there are some real natural clusters that exist in it so to do thatwe can work with this little dsfbuf$mvtufsfe%bub function in pythongspnovnqzjnqpsusboepnbssbz $sfbufgblfjodpnfbhfdmvtufstgps/qfpqmfjoldmvtufst efgdsfbuf$mvtufsfe%bub / sboepntffe qpjout fs$mvtufs gmpbu  gpsjjosbohf jodpnf$fouspje sboepnvojgpsn bhf$fouspje sboepnvojgpsn gpskjosbohf jou qpjout fs$mvtufs bqqfoe <sboepnopsnbm jodpnf$fouspjesboepnopsnbm bhf$fouspje bssbz sfuvso the function starts off with consistent random seed so you'll get the same result every time we want to create clusters of people in clusters so we pass and to dsfbuf$mvtufsfe%bub our code figures out how many points per cluster that works out to first and stores it in qpjout fs$mvtufs thenit builds up list that starts off empty for each clusterwe're going to create some random centroid of income (jodpnf$fouspjebetween , and , dollars and some random centroid of age (bhf$fouspjebetween the age of and