Jovian
⭐️
Sign In
In [1]:
import matplotlib.pyplot as plt
import pandas
data=pandas.read_csv('Advertising_data.csv')
data.head()
Out[1]:
In [97]:
#Age
#Purchased
#EstimatedSalary
X1=data['EstimatedSalary']
X2=data['Age']
y=data['Purchased']
In [98]:
plt.scatter(X1,X2,c=y)
plt.show()
Notebook Image
In [ ]:
 
In [75]:
import matplotlib.pyplot as plt
import pandas as pd

from sklearn.decomposition import PCA as sklearnPCA
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.datasets.samples_generator import make_blobs

from pandas.tools.plotting import parallel_coordinates
In [76]:

X, y = make_blobs(n_samples=200, centers=3, n_features=3, random_state=0)
X[:,0]

Out[76]:
array([ 0.31516585,  1.88178095, -0.84444675, -0.49352946, -0.27461614,
        0.20050773, -2.4363981 ,  0.64321268,  0.26802175,  1.6904939 ,
        1.02616849,  1.94129325,  1.92980864,  2.08493453, -1.30118956,
       -0.19811382, -1.04964926, -2.17839577,  0.97052064,  1.62747942,
       -0.55709073,  2.09220853,  0.29221083, -1.94613952,  0.40957246,
        0.11599596,  1.81398984,  0.41198749,  1.60847149, -2.40005384,
        1.91616706,  1.81136947,  1.90373658, -1.00960179, -2.40116503,
        1.839498  ,  1.59503648,  2.42110579,  1.13692862,  1.00970901,
       -0.30052305, -3.5358957 ,  0.04811089,  0.03787294, -0.76985089,
        1.90690819, -2.60795281, -1.49675174,  0.68977921, -0.20453243,
        0.30124825,  1.02317454,  0.15804912, -2.99059289,  1.26331511,
        1.46469655,  2.17004979,  0.78276481,  1.32574461,  0.10770002,
       -1.23031732,  0.54605398, -1.02592163, -0.59375765,  1.33669735,
       -1.15479631,  0.51517745, -0.54141339,  2.45225991,  0.49685028,
       -3.71777886,  1.32455968,  0.50466574,  1.71713027,  2.81901062,
        1.39017006,  0.7927672 , -1.18271996,  0.74913678,  1.44841908,
       -3.06502844, -0.38851046, -1.05404913, -0.39597062,  1.96549724,
        0.514242  ,  2.81996161, -1.34568581,  2.03549053,  1.73718012,
        0.32411974, -1.12370913,  0.63599159,  1.10267675,  1.08020599,
        0.79468751,  2.05708199,  0.7856141 ,  0.64423968,  0.66890527,
       -0.0146332 ,  1.08461963, -1.38527578,  1.47746246, -0.1632272 ,
       -0.44549307,  1.09112396, -3.1626634 , -0.35497942, -1.2334963 ,
       -1.32023781, -2.60145572,  1.02961499,  1.25146839, -1.16211747,
        1.05965318,  0.98777645, -0.42982027, -3.05856275, -2.79131221,
       -2.63368589,  0.75033042, -0.03516817,  2.71652354,  0.01220672,
        0.29749269,  0.61613731,  1.94986879, -2.85364968, -1.38260202,
        0.83903766, -0.82772206,  1.22480071,  0.39459708,  0.40675281,
        1.58737379,  1.34638254,  0.76714146, -0.52529231,  2.00528834,
        2.50049689,  0.77904754, -1.52559872,  0.4253917 ,  1.10473923,
       -0.33292946,  0.68764686,  0.99585035,  0.89189476,  2.24238861,
        1.19852998,  0.6399999 , -1.212813  , -1.37757259,  2.51129921,
        1.83450786, -1.16927747,  2.98210535,  0.56264262,  0.32656157,
       -0.3963238 , -0.45254962,  1.40068254, -0.10200792,  1.96191334,
        0.10147782,  0.39959056,  0.92180523,  1.35343069, -1.76270127,
        2.27696635,  0.70224646,  0.40366931,  1.82725799, -0.01389006,
       -1.59187303,  1.29624939,  3.99919424,  2.18363622, -2.18806121,
       -1.66996165,  2.40553958, -1.55435561, -0.10953052,  0.51834766,
       -0.36955718, -1.12195202,  1.72723475,  2.76743854,  0.04407919,
       -1.37554022,  1.945249  , -1.05283555, -2.76327092, -0.92431418,
       -2.02184254, -1.65048059,  0.66647695,  0.78008887,  0.3904472 ])
In [77]:
#plt.scatter(X[:,0], X[:,1], c=y)
plt.scatter(X[:,2],X[:,0],c=y)
plt.show()
Notebook Image
In [ ]:
import jovian
jovian.commit()
[jovian] Saving notebook..
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]: