For this program as below:
import numpy as np
import pandas as pd
np.set_printoptions(formatter='float')
np.random.seed(1)
dataset = pd.read_csv("/Users/Akshita/Desktop/EE660/donor_raw_data_medmean.csv",header=None)
print("Number of samples: {0}".format(dataset.shape[0]))
print("Number of features: {0}".format((dataset.shape[1])-1))
# Separate data and label
X_label = dataset[:][0]
feature_number = list(range(1,61))
X_data = dataset[feature_number]
meanVectors = []
for c in list(range(2)):
meanVectors.append(np.mean(X_data[X_label==c], axis=0))
print('Mean Vector class {0}:{1}' .format(c,(meanVectors[c])))
My output is:
Number of samples: 19373
Number of features: 60
Mean Vector class 0:
1 70.719718
2 60.037559
3 0.107512
..
..
58 66.634272
59 13.971254
60 4.748826
dtype: float64
Mean Vector class 1:
1 75.575087
2 60.844005
3 0.145518
..
..
58 71.436554
59 12.092189
60 6.006985
How can I get the output a simple [75.575087, 60.844005, 0.145518...6.006985]
and the same for the next?