This is my Code:::
def ML_with_CV_feat(cv_feat_file='../data/cv_feat.csv', n_comp=100,
plotting=False):
# Importing the bottleneck features for each image
feat_df = pd.read_csv(cv_feat_file, index_col=0, dtype='unicode')
##-- Dealing with NaN
feat_df.fillna(0, inplace=True)
feat_df['blob_detected'] = feat_df['blob_detected']*1
#['cell_area', 'cell_eccentricity', 'cell_solidity', 'average_blue', 'average_green', 'average_red', 'blob_detected', 'num_of_blobs', 'average_blob_area']
# feat_df = feat_df.sample(frac=0.01)
feat_df.drop(columns=['cell_area', 'cell_eccentricity', 'cell_solidity',
'average_blue', 'average_green', 'average_red'],
inplace=True)
#Removing features that do not seperate populations of cell class
column_names = feat_names = list(feat_df.columns)
print(column_names)
for X in ['label','fn']:
feat_names.remove(x)
# feat_df = feat_df.iloc[0:300,:]
mask = feat_df.loc[:, 'label'].isin(['Infected', 'Uninfected'])
feat_df = feat_df.loc[mask, :].drop_duplicates()
print('Number of features:', len(feat_names))
y = feat_df.loc[:,['label']].values
print(type(y), y.shape)
print('Number of samples for each label \n', feat_df.groupby('label')['label'].count())
# print(feat_df.head())
X = feat_df.loc[:, feat_names].astype(float).values
print('/nColumn feat names after placing into X',
list(feat_df.loc[:, feat_names].columns))
class_names = set(feat_df.loc[:,'label'])
# Binarize the labels
# print(class_names)
# lb = label_binarize(y = y, classes = list(class_names))
# classes.remove('unknown')
# lb.fit(y) #for LabelBinarizer not lable_binerize()
# lb.classes_ #for LabelBinarizer not lable_binerize
# Split the training data for cross validation
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2,
random_state=0)
df_y_train = pd.DataFrame(y_train, columns=['label']) #,'Date','group_idx'])
print('df_y_train.shape', df_y_train.shape,'X_train', X_train.shape)
##### Dimensionality Reduction ####
Error Message:: File “”, line 10
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2,
^
IndentationError: unexpected indent