def __repr__(self): """ Return a string description of the model, including a description of the training data, training statistics, and model hyper-parameters. Returns ------- out : string A description of the model. """ model_fields = [ ('Number of coefficients', 'num_coefficients'), ('Number of examples', 'num_examples'), ('Number of feature columns', 'num_features'), ('Number of unpacked features', 'num_unpacked_features')] hyperparam_fields = [ ("L1 penalty", 'l1_penalty'), ("L2 penalty", 'l2_penalty') ] solver_fields = [ ("Solver", 'solver'), ("Solver iterations", 'training_iterations'), ("Solver status", 'training_solver_status'), ("Training time (sec)", 'training_time')] training_fields = [ ("Residual sum of squares", 'training_loss'), ("Training RMSE", 'training_rmse')] return _toolkit_repr_print(self, [model_fields, hyperparam_fields, solver_fields, training_fields], width=30)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ (sections, section_titles) = self._get_summary_struct() return _toolkit_repr_print(self, sections, section_titles, width=30)
def __repr__(self): """ Print a string description of the model, when the model name is entered in the terminal. """ model_fields = [ ('Number of coefficients', 'num_coefficients'), ('Number of examples', 'num_examples'), ('Number of classes', 'num_classes'), ('Number of feature columns', 'num_features'), ('Number of unpacked features', 'num_unpacked_features')] hyperparam_fields = [ ("Mis-classification penalty", 'penalty'), ] solver_fields = [ ("Solver", 'solver'), ("Solver iterations", 'training_iterations'), ("Solver status", 'training_solver_status'), ("Training time (sec)", 'training_time')] training_fields = [ ("Train Loss", 'training_loss')] return _toolkit_repr_print(self, [model_fields, hyperparam_fields, solver_fields, training_fields], width=30)
def __repr__(steps): for name, tr in self._transformers: model_fields.append( (name, _precomputed_field(self._compact_class_repr(tr)))) return _toolkit_repr_print(steps, [model_fields], width=8, section_titles=['Steps'])
def __repr__(self): """ Print a string description of the model, when the model name is entered in the terminal. """ model_fields = [ ("Number of coefficients", "num_coefficients"), ("Number of examples", "num_examples"), ("Number of feature columns", "num_features"), ("Number of unpacked features", "num_unpacked_features"), ] hyperparam_fields = [("L1 penalty", "l1_penalty"), ("L2 penalty", "l2_penalty")] solver_fields = [ ("Solver", "solver"), ("Solver iterations", "training_iterations"), ("Solver status", "training_solver_status"), ("Training time (sec)", "training_time"), ] training_fields = [("Log-likelihood", "training_loss")] return _toolkit_repr_print(self, [model_fields, hyperparam_fields, solver_fields, training_fields], width=30)
def __repr__(self): descriptions = [(k, _precomputed_field(v)) for k, v in self._describe_fields().iteritems()] (sections, section_titles) = self._get_summary_struct() non_empty_sections = [s for s in sections if len(s) > 0] non_empty_section_titles = [section_titles[i] for i in range(len(sections)) if len(sections[i]) > 0] non_empty_section_titles.append('Queryable Fields') non_empty_sections.append(descriptions) return _toolkit_repr_print(self, non_empty_sections, non_empty_section_titles, width=40)
def __repr__(self): """ Return a string description of the model, including a description of the training data, training statistics, and model hyper-parameters. Returns ------- out : string A description of the model. """ (sections, section_titles) = self._get_summary_struct() return _toolkit_repr_print(self, sections, section_titles, width=30)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 40 sections, section_titles = self._get_summary_struct() accessible_fields = { "cluster_id": "Cluster label for each row in the input dataset." } out = _toolkit_repr_print(self, sections, section_titles, width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 36 key_str = "{:<{}}: {}" (sections, section_titles) = self._get_summary_struct() accessible_fields = { "entities": "Consolidated input records plus entity labels."} out = _toolkit_repr_print(self, sections, section_titles, \ width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 40 key_str = "{:<{}}: {}" sections, section_titles = self._get_summary_struct() accessible_fields = { "scores": "Anomaly score for each instance in the current dataset."} out = _tkutl._toolkit_repr_print(self, sections, section_titles, width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Return a string description of the model, including a description of the training data, training statistics, and model hyper-parameters. Returns ------- out : string A description of the model. """ accessible_fields = { "vocabulary": "The vocabulary of the trimmed input." } (sections, section_titles) = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, width=30) out2 = _summarize_accessible_fields(accessible_fields, width=30) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 40 key_str = "{:<{}}: {}" sections, section_titles = self._get_summary_struct() accessible_fields = { "scores": "Local outlier factor for each row in the input dataset.", "nearest_neighbors_model": "Model used internally to compute nearest neighbors."} out = _tkutl._toolkit_repr_print(self, sections, section_titles, width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 36 sections, section_titles = self._get_summary_struct() accessible_fields = { "nearest_neighbors_model": "Model used internally to compute nearest neighbors." } out = _tkutl._toolkit_repr_print(self, sections, section_titles, width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 36 key_str = "{:<{}}: {}" (sections, section_titles) = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, \ width=width) extra = [] extra.append(key_str.format("Accessible fields", width, "")) extra.append(key_str.format(" entities", width, "Consolidated input records plus entity labels.")) return out + '\n' + '\n'.join(extra)
def __repr__(self): descriptions = [(k, _precomputed_field(v)) for k, v in six.iteritems(self._describe_fields())] (sections, section_titles) = self._get_summary_struct() non_empty_sections = [s for s in sections if len(s) > 0] non_empty_section_titles = [ section_titles[i] for i in range(len(sections)) if len(sections[i]) > 0 ] non_empty_section_titles.append('Queryable Fields') non_empty_sections.append(descriptions) return _toolkit_repr_print(self, non_empty_sections, non_empty_section_titles, width=40)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 32 key_str = "{:<{}}: {}" (sections, section_titles) = self._get_summary_struct() accessible_fields = { "cluster_id": "An SFrame containing the cluster assignments.", "cluster_info": "An SFrame containing the cluster centers."} out = _tkutl._toolkit_repr_print(self, sections, section_titles, width=width) out2 = _summarize_accessible_fields(accessible_fields, width=width) return out + "\n" + out2
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 32 key_str = "{:<{}}: {}" (sections, section_titles) = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, width=width) extra = [] extra.append(key_str.format("Accessible fields", width, "")) extra.append(key_str.format(" cluster_id", width, "An SFrame containing the cluster assignments.")) extra.append(key_str.format(" cluster_info", width, "An SFrame containing the cluster centers.")) return out + '\n' + '\n'.join(extra)
def __repr__(self): """ Print a string description of the model, when the model name is entered in the terminal. """ data_fields = [ ('Number of examples', 'num_examples'), ('Number of feature columns', 'num_features'), ('Number of unpacked features', 'num_unpacked_features')] training_fields = [ ("Number of trees", 'num_trees'), ("Max tree depth", 'max_depth'), ("Train RMSE", 'training_rmse'), ("Validation RMSE", 'validation_rmse'), ("Training time (sec)", 'training_time')] return _toolkit_repr_print(self, [data_fields, training_fields], width=30)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ key_str = "{:<{}}: {}" width = 30 (sections, section_titles) = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, width=width) extra = [] extra.append(key_str.format("Accessible fields", width, "")) extra.append(key_str.format("m['topics']",width,"An SFrame containing the topics.")) extra.append(key_str.format("m['vocabulary']",width,"An SArray containing the words in the vocabulary.")) extra.append(key_str.format("Useful methods", width, "")) extra.append(key_str.format("m.get_topics()",width,"Get the most probable words per topic.")) extra.append(key_str.format("m.predict(new_docs)",width,"Make predictions for new documents.")) return out + '\n' + '\n'.join(extra)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 40 key_str = "{:<{}}: {}" sections, section_titles = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, width=width) extra = [] extra.append("Accessible fields") extra.append("-" * len("Accessible fields")) extra.append(key_str.format(" cluster_id", width, "Cluster label for each row in the input dataset.")) return out + "\n" + "\n".join(extra)
def __repr__(self): """ Print a string description of the model, when the model name is entered in the terminal. """ data_fields = [ ("Examples", 'num_examples'), ("Features", 'num_features'), ("Target column", 'target')] metric_key = 'metric' if not metric_key in self.list_fields(): metric_key = 'metrics' metrics = self.get(metric_key).split(',') training_fields = [] for m in metrics: training_fields.append(('Training %s' % m, 'training_%s' % m)) training_fields.append(('Validation %s' % m, 'validation_%s' % m)) training_fields.append(("Training time (sec)", 'training_time')) return _toolkit_repr_print(self, [data_fields, training_fields])
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ model_fields = [ ("Distance", 'distance'), ("Method", 'method'), ("Number of examples", 'num_examples'), ("Number of feature columns", 'num_features'), ("Number of unpacked features", 'num_unpacked_features'), ("Total training time (seconds)", 'training_time')] ball_tree_fields = [ ("Tree depth", 'tree_depth'), ("Leaf size", 'leaf_size')] out = [model_fields] if self.get('method') == 'ball tree': out += [ball_tree_fields] return _tkutl._toolkit_repr_print(self, out, width=30)
def __repr__(self): """ Print a string description of the model when the model name is entered in the terminal. """ width = 30 key_str = "{:<{}}: {}" model_fields = [ ('Total training time (seconds)', 'training_time'), ('Number of clusters', 'num_clusters'), ('Number of training iterations', 'training_iterations'), ('Number of examples', 'num_examples'), ('Number of feature columns', 'num_features'), ('Number of unpacked features', 'num_unpacked_features')] out = [_toolkit_repr_print(self, [model_fields], width=width)] out.append(key_str.format("Accessible fields", width, "")) out.append(key_str.format(" cluster_id", width, "An SFrame containing the cluster assignments.")) out.append(key_str.format(" cluster_info", width, "An SFrame containing the cluster centers.")) return '\n'.join(out)
def __repr__(self): (sections, section_titles) = self._get_summary_struct() return _toolkit_repr_print(self, sections, section_titles, width=30)
def __repr__(self): width = 32 key_str = "{:<{}}: {}" (sections, section_titles) = self._get_summary_struct() out = _toolkit_repr_print(self, sections, section_titles, width=width) return out
def __repr__(self): (sections, section_titles) = self._get_summary_struct() return _toolkit_repr_print(self, sections, section_titles, width= 30)
def __repr__(self): """ Return a string description of the transform. """ (sections, section_titles) = self._get_summary_struct() return _toolkit_repr_print(self, sections, section_titles)
def __repr__(steps): for name, tr in self._transformers: model_fields.append((name, _precomputed_field(self._compact_class_repr(tr)))) return _toolkit_repr_print(steps, [model_fields], width=8, section_titles = ['Steps'])