def train_size(self):
train_set = self.train_set()<EOL>if isinstance(train_set, collections.Iterable):<EOL><INDENT>return len(list(train_set))<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Return size of training data. (optional)
:rtype: number