val = val + "\t" + item + " = " + str(self.info[item]) + "\n"
val = val + "data:\n"
val = val + "\tX_train = array" + str(self.data["X_train"].shape) + "\n"
val = val + "\tY_train = array" + str(self.data["Y_train"].shape) + "\n"
val = val + "\tX_valid = array" + str(self.data["X_valid"].shape) + "\n"
val = val + "\tX_test = array" + str(self.data["X_test"].shape) + "\n"
val = val + "feat_type:\tarray" + str(self.feat_type.shape) + "\n"
val = val + "feat_idx:\tarray" + str(self.feat_idx.shape) + "\n"
return val
def loadData (self, filename, verbose=True, replace_missing=True):
""" Get the data from a text file in one of 3 formats: matrix, sparse, binary_sparse"""
After Change
for subset in ["X_train", "Y_train", "X_valid", "X_test"]:
val = val + "\t%s = %s" % (subset, type(self.data[subset])) \
+ str(self.data[subset].shape) + "\n"
if isinstance(self.data[subset], scipy.sparse.spmatrix):
val = val + "\tdensity: %f\n" % \
(float(len(self.data[subset].data)) /