Data\RowCursorUtils.cs (26)
37Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
39return Utils.MarshalInvoke(_getGetterAsDelegateCoreMethodInfo, row.Schema[col].Type.RawType, row, col);
44return row.GetGetter<TValue>(row.Schema[col]);
59Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
61var typeSrc = row.Schema[col].Type;
80Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
82var typeSrc = row.Schema[col].Type;
95var getter = row.GetGetter<TSrc>(row.Schema[col]);
125Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
127var typeSrc = row.Schema[col].Type;
136var getter = row.GetGetter<TSrc>(row.Schema[col]);
158Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
160var typeSrc = row.Schema[col].Type as VectorDataViewType;
178Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active");
180var typeSrc = row.Schema[col].Type as VectorDataViewType;
235return _row.GetGetter<TValue>(_row.Schema[_col]);
308DataViewType type = cursor.Schema[col].Type;
315var getter = cursor.GetGetter<T>(cursor.Schema[col]);
354var type = cursor.Schema[labelIndex].Type;
357return cursor.GetGetter<Single>(cursor.Schema[labelIndex]);
361var getSingleSrc = cursor.GetGetter<Double>(cursor.Schema[labelIndex]);
376var type = cursor.Schema[labelIndex].Type;
383var getBoolSrc = cursor.GetGetter<bool>(cursor.Schema[labelIndex]);
458row.GetGetter<T>(row.Schema[col])(ref val);
477env.CheckParam(Enumerable.Range(0, row.Schema.Count).All(c => row.IsColumnActive(row.Schema[c])), nameof(row), "Some columns were inactive");
520_host.Assert(Enumerable.Range(0, row.Schema.Count).All(c => row.IsColumnActive(row.Schema[c])));
Evaluators\EvaluatorUtils.cs (64)
66schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp);
77schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp);
87var columnType = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type;
91schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp);
99var columnType = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type;
186var type = schema[colScore].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnSetId)?.Type;
193schema[colScore].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnSetId, ref setId);
222var type = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type;
226schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp);
281isWeightedGetter = cursor.GetGetter<bool>(schema[isWeightedCol]);
288var type = cursor.Schema[stratCol].Type;
301var column = schema[i];
306var type = schema[i].Type;
343yield return new KeyValuePair<string, double>(schema[i].Name, metricVal);
352var size = schema[i].Type.GetVectorSize();
353var slotNamesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType;
355schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref names);
363var colName = schema[i].Name;
399while (inputCol < input.Schema.Count && input.Schema[inputCol].IsHidden)
441while (inputCol < input.Schema.Count && input.Schema[inputCol].IsHidden)
445var inputColName = input.Schema[inputCol].Name;
446var inputColType = input.Schema[inputCol].Type;
478var type = typeSrc[i] = idv.Schema[col].Type;
479if (!idv.Schema[col].HasSlotNames(type.GetVectorSize()))
481idv.Schema[col].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref slotNamesCur);
568var type = schema[indices[i]].Type;
569var keyValueType = schema[indices[i]].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type;
581schema[indices[i]].GetKeyValues(ref keyNamesCur);
633views[i].Schema[indices[i]].Type, keyType, mapper, keyValueGetter);
725var type = views[i].Schema[columnIndices[i]].Type;
726if (views[i].Schema[columnIndices[i]].HasSlotNames(type.GetVectorSize()))
731(ref VBuffer<ReadOnlyMemory<char>> dst) => schema[index].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref dst);
827if (dv.Schema[i].IsHidden)
833var type = dv.Schema[i].Type;
834var name = dv.Schema[i].Name;
840if (dv.Schema[i].HasKeyValues())
843if (dv.Schema[i].HasSlotNames(vectorType.Size))
846dv.Schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref slotNames);
867labelColKeyValuesType = dv.Schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type;
869else if (dvNumber == 0 && dv.Schema[i].HasKeyValues())
871else if (type.GetKeyCount() > 0 && name != labelColName && !dv.Schema[i].HasKeyValues())
930var vectorType = idv.Schema[index].Type as VectorDataViewType;
949if (schema[i].IsHidden && schema[i].Name == colName)
961if (dv.Schema[col].HasSlotNames(type.Size))
965dv.Schema[col].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref currSlotNames);
1006if (schema[i].IsHidden || ignoreCol(i))
1009var type = schema[i].Type;
1010var metricName = row.Schema[i].Name;
1025vBufferGetters[i] = row.GetGetter<VBuffer<double>>(schema[i]);
1027var slotNamesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType;
1029schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref names);
1115var type = cursor.Schema[stratCol].Type;
1227if (schema[i].IsHidden)
1230var type = schema[i].Type;
1231var name = schema[i].Name;
1236var keyValuesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType;
1247schema[stratCol].GetKeyValues(ref dst);
1478var type = cursor.Schema[countIndex].Type as VectorDataViewType;
1480var countGetter = cursor.GetGetter<VBuffer<double>>(cursor.Schema[countIndex]);
1484var stratType = cursor.Schema[stratCol].Type;
1775var type = data.Schema[stratCol].Type;
1786data = ColumnSelectingTransformer.CreateDrop(env, data, data.Schema[stratCol].Name, data.Schema[stratVal].Name);
Evaluators\MultiOutputRegressionEvaluator.cs (11)
476? input.GetGetter<VBuffer<float>>(input.Schema[ScoreIndex])
549var t = schema[LabelIndex].Type as VectorDataViewType;
551throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "known-size vector of Single or Double", schema[LabelIndex].Type.ToString());
558t = schema[ScoreIndex].Type as VectorDataViewType;
560throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "known-size vector of Single", schema[ScoreIndex].Type.ToString());
595var type = schema[column].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type;
599(ref VBuffer<ReadOnlyMemory<char>> dst) => schema[column].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref dst);
691var type = cursor.Schema[stratCol].Type;
700var currentColumn = fold.Schema[i];
707var type = fold.Schema[i].Type as VectorDataViewType;
756sb.AppendFormat("{0}{1,12}:", isWeighted ? "Weighted " : "", fold.Schema[i].Name);