Evaluators\MulticlassClassificationEvaluator.cs (16)
78var scoreType = score.Type as VectorDataViewType;
80throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "vector of two or more items of type Single", score.Type.ToString());
82var labelType = schema.Label.Value.Type;
90int numClasses = score.Type.GetVectorSize();
101var mdType = schema.Schema[scoreInfo.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType;
113int numClasses = score[0].Type.GetVectorSize();
124int numClasses = scoreInfo.Type.GetVectorSize();
418Host.Assert(score.Type.GetVectorSize() == _scoresArr.Length);
619_numClasses = scoreColumn.Type.GetVectorSize();
860var scoreType = schema[ScoreIndex].Type as VectorDataViewType;
862throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "Vector of two or more items of type Single", schema[ScoreIndex].Type.ToString());
863var labelType = schema[LabelIndex].Type;
1060var labelType = labelCol.Type;
1064labelName, labelCol.Type, NumberDataViewType.Double,
1071var type = perInstSchema[sortedClassesIndex].Type;
1080var type = perInst.Schema[sortedScoresIndex].Type;
Evaluators\MultiOutputRegressionEvaluator.cs (12)
61var t = score.Type as VectorDataViewType;
63throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", score.Type.ToString());
65t = schema.Label.Value.Type as VectorDataViewType;
67throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "known-size vector of Single or Double", schema.Label.Value.Type.ToString());
73int vectorSize = score.Type.GetVectorSize();
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;
691var type = cursor.Schema[stratCol].Type;
707var type = fold.Schema[i].Type as VectorDataViewType;
Training\TrainerUtils.cs (23)
57if (!(col.Type is VectorDataViewType vecType && vecType.Size > 0 && vecType.ItemType == NumberDataViewType.Single))
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);
73var colType = col.Type as VectorDataViewType;
90if (col.Type != BooleanDataViewType.Instance && col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double && !(col.Type is KeyDataViewType keyType && keyType.Count == 2))
92KeyDataViewType colKeyType = col.Type as KeyDataViewType;
110col.Name, col.Type);
125if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double)
128"Training label column '{0}' type isn't suitable for regression: {1}. Type must be Single or Double.", col.Name, col.Type);
145if (col.Type is KeyDataViewType keyType && keyType.Count > 0)
154if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double)
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);
193if (!(col.Type is VectorDataViewType vectorType
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);
207if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double)
208throw Contracts.ExceptParam(nameof(data), "Training weight column '{0}' must be of floating point numeric type, but has type: {1}.", col.Name, col.Type);
219if (col.Type is KeyDataViewType)
221throw Contracts.ExceptParam(nameof(data), "Training group column '{0}' type is invalid: {1}. Must be Key type.", col.Name, col.Type);
Utilities\ColumnCursor.cs (4)
40var colType = column.Type;
45if (data.Schema[colIndex].Name != colName || data.Schema[colIndex].Type != colType)
74throw Contracts.ExceptParam(nameof(column), string.Format("Cannot load vector type, {0}, specified in {1} to the user-defined type, {2}.", column.Type, nameof(column), typeof(T)));
95column.Name, column.Type, nameof(data), typeof(T)));