Beispiel #1
0
        private protected override DataViewSchema.DetachedColumn[] GetOutputColumnsCore()
        {
            var infos = new DataViewSchema.DetachedColumn[3];

            infos[ClusterIdCol] = new DataViewSchema.DetachedColumn(ClusterId, _types[ClusterIdCol], null);

            var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _numClusters);

            var sortedClusters = new DataViewSchema.Annotations.Builder();
            int vectorSize     = slotNamesType.GetVectorSize();

            sortedClusters.AddSlotNames(vectorSize, CreateSlotNamesGetter(_numClusters, "Cluster"));

            var builder = new DataViewSchema.Annotations.Builder();

            builder.AddSlotNames(vectorSize, CreateSlotNamesGetter(_numClusters, "Score"));

            infos[SortedClusterCol]      = new DataViewSchema.DetachedColumn(SortedClusters, _types[SortedClusterCol], sortedClusters.ToAnnotations());
            infos[SortedClusterScoreCol] = new DataViewSchema.DetachedColumn(SortedClusterScores, _types[SortedClusterScoreCol], builder.ToAnnotations());
            return(infos);
        }