Commands\ShowSchemaCommand.cs (5)
139var name = schema[col].Name;
191foreach (var metaColumn in schema[col].Annotations.Schema.OrderBy(mcol => mcol.Name))
194itw.Write("Metadata '{0}': {1}", metaColumn.Name, type);
198ShowMetadataValue(itw, schema, col, metaColumn.Name, type);
200ShowMetadataValueVec(itw, schema, col, metaColumn.Name, vectorType);
DataLoadSave\Binary\BinarySaver.cs (10)
283_host.Check(!string.IsNullOrEmpty(metaColumn.Name), "Metadata with null or empty kind detected, disallowed");
285if (!kinds.Add(metaColumn.Name))
286throw _host.Except("Metadata with duplicate kind '{0}' encountered, disallowed", metaColumn.Name, schema[col].Name);
287args[3] = metaColumn.Name;
294metaColumn.Type, schema[col].Name, col, metaColumn.Name);
299metadataInfos.Add(Tuple.Create(metaColumn.Name, codec, (CompressionKind)args[5]));
515string name = sourceSchema[active.SourceIndex].Name;
721throw _host.Except("Could not get codec for requested column {0} of type {1}", schema[c].Name, type);
DataView\Transposer.cs (10)
114_nameToICol[(_cols[c] = schema[columns[c]]).Name] = c;
141throw ch.ExceptParam(nameof(view), "Column named '{0}' is not serializable by the transposer", _cols[c].Name);
143throw ch.ExceptParam(nameof(view), "Column named '{0}' is vector, but not of known size, and so cannot be transposed", _cols[c].Name);
242throw _host.ExceptParam(nameof(col), "Bad call to GetSlotCursor on untransposable column '{0}'", _tview.Schema[col].Name);
766nameToCol[_input.Schema[toSlice[c]].Name] = outputColumnCount - 1;
1018schemaBuilder.AddColumn(selectedColumn.Name, selectedColumn.Type, selectedColumn.Annotations);
1112schemaBuilder.AddColumn(selectedColumn.Name, _types[c]);
1348throw Contracts.Except("Could not get single value on column '{0}' because there are no slots", view.Schema[col].Name);
1351throw Contracts.Except("Could not get single value on column '{0}' because there is more than one slot", view.Schema[col].Name);
1437builder.AddColumn(_data.Schema[_col].Name, _type);
Evaluators\BinaryClassifierEvaluator.cs (10)
132throw host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString());
136throw host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single, Double, Boolean, or a Key with cardinality 2", t.ToString());
148throw host.ExceptSchemaMismatch(nameof(schema), "probability", prob[0].Name, "Single", probType.ToString());
198var probCol = Utils.Size(probInfos) > 0 ? probInfos[0].Name : null;
199return new BinaryPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, probCol, schema.Label.Value.Name, _threshold, _useRaw);
1351cols = AnnotationUtils.Prepend(cols, RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Probability, probCol.Value.Name));
1478yield return schema.Label.Value.Name;
1481yield return scoreCol.Name;
1487yield return probCol.Value.Name;
Evaluators\ClusteringEvaluator.cs (5)
102throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name,
109throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", type.ToString());
120throw Host.ExceptSchemaMismatch(nameof(schema), "features", schema.Feature.Value.Name,
149return new ClusteringPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, numClusters);
827yield return schema.Label.Value.Name;
Evaluators\MulticlassClassificationEvaluator.cs (7)
80throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "vector of two or more items of type Single", score.Type.ToString());
84throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single or Key", labelType.ToString());
125return new MulticlassPerInstanceEvaluator(Host, schema.Schema, scoreInfo, schema.Label.Value.Name);
615: base(env, schema, scoreColumn.Name, labelCol)
986idv.Schema[col].Name.Equals(MulticlassClassificationEvaluator.PerClassLogLoss))
1042yield return schema.Label.Value.Name;
1056string labelName = schema.Label.Value.Name;
Evaluators\MultiOutputRegressionEvaluator.cs (7)
55return new MultiOutputRegressionPerInstanceEvaluator(Host, schema.Schema, scoreCol.Name, schema.Label.Value.Name);
63throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", score.Type.ToString());
67throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "known-size vector of Single or Double", schema.Label.Value.Type.ToString());
648yield return schema.Label.Value.Name;
652yield return scoreCol.Name;
756sb.AppendFormat("{0}{1,12}:", isWeighted ? "Weighted " : "", fold.Schema[i].Name);
Evaluators\QuantileRegressionEvaluator.cs (7)
53return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Value.Name, scoreSize, quantiles);
61throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Vector of Single or Double", score.Type.ToString());
65throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single", t.ToString());
519var name = data.Schema[i].Name;
545yield return schema.Label.Value.Name;
548yield return scoreCol.Name;
Evaluators\RankingEvaluator.cs (9)
102"label", schema.Label.Value.Name, "Single or a Key", t.ToString());
108"score", scoreCol.Name, "Single", t.ToString());
118"group", schema.Group.Value.Name, "Key", t.ToString());
142data.Schema.Label.Value.Name, scoreInfo.Name, data.Schema.Group.Value.Name, _truncationLevel, _labelGains);
947yield return schema.Group.Value.Name;
948yield return schema.Label.Value.Name;
951yield return scoreCol.Name;
Evaluators\RegressionEvaluator.cs (6)
60throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString());
64throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single", t.ToString());
77return new RegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Value.Name);
367yield return schema.Label.Value.Name;
370yield return scoreCol.Name;
Training\TrainerUtils.cs (17)
58throw Contracts.ExceptParam(nameof(data), "Training feature column '{0}' must be a known-size vector of R4, but has type: {1}.", col.Name, col.Type);
99col.Name);
105col.Name);
110col.Name, col.Type);
128"Training label column '{0}' type isn't suitable for regression: {1}. Type must be Single or Double.", col.Name, col.Type);
155throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' type is not valid for multi-class: {1}. Type must be Single or Double.", col.Name, col.Type);
166"Training label column '{0}' contains invalid values for multi-class: {1}.", col.Name, cursor.Label);
174throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' contains no valid values for multi-class.", col.Name);
196throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' must be a known-size vector of Single, but has type: {1}.", col.Name, col.Type);
208throw Contracts.ExceptParam(nameof(data), "Training weight column '{0}' must be of floating point numeric type, but has type: {1}.", col.Name, col.Type);
221throw Contracts.ExceptParam(nameof(data), "Training group column '{0}' type is invalid: {1}. Must be Key type.", col.Name, col.Type);
429if (tschema.Feature?.Name is string fname && fname != DefaultColumnNames.Features)
431if (tschema.Label?.Name is string lname && lname != DefaultColumnNames.Label)
433if (tschema.Weight?.Name is string wname && wname != DefaultColumnNames.Weight)
435if (tschema.Group?.Name is string gname && gname != DefaultColumnNames.GroupId)
437if (tschema.Group?.Name is string iname && iname != DefaultColumnNames.Item)
439if (tschema.Group?.Name is string uname && uname != DefaultColumnNames.User)