Exemplo n.º 1
0
        public override RowMapperColumnInfo[] GetOutputColumns()
        {
            var infos = new RowMapperColumnInfo[2];

            infos[L1Col] = new RowMapperColumnInfo(L1, NumberType.R8, null);
            infos[L2Col] = new RowMapperColumnInfo(L2, NumberType.R8, null);
            return(infos);
        }
        public override RowMapperColumnInfo[] GetOutputColumns()
        {
            var infos = new RowMapperColumnInfo[5];

            infos[LabelOutput] = new RowMapperColumnInfo(LabelCol, _labelType, _labelMetadata);
            infos[ScoreOutput] = new RowMapperColumnInfo(ScoreCol, _scoreType, _scoreMetadata);
            infos[L1Output]    = new RowMapperColumnInfo(L1, NumberType.R8, null);
            infos[L2Output]    = new RowMapperColumnInfo(L2, NumberType.R8, null);
            infos[DistCol]     = new RowMapperColumnInfo(Dist, NumberType.R8, null);
            return(infos);
        }
        public override RowMapperColumnInfo[] GetOutputColumns()
        {
            var infos = new RowMapperColumnInfo[2];

            var slotNamesType = new VectorType(TextType.Instance, _scoreSize);
            var l1Metadata    = new ColumnMetadataInfo(L1);

            l1Metadata.Add(MetadataUtils.Kinds.SlotNames, new MetadataInfo <VBuffer <DvText> >(slotNamesType, CreateSlotNamesGetter(L1)));
            var l2Metadata = new ColumnMetadataInfo(L2);

            l2Metadata.Add(MetadataUtils.Kinds.SlotNames, new MetadataInfo <VBuffer <DvText> >(slotNamesType, CreateSlotNamesGetter(L2)));

            infos[L1Col] = new RowMapperColumnInfo(L1, _outputType, l1Metadata);
            infos[L2Col] = new RowMapperColumnInfo(L2, _outputType, l2Metadata);
            return(infos);
        }
Exemplo n.º 4
0
        public override RowMapperColumnInfo[] GetOutputColumns()
        {
            var infos = new RowMapperColumnInfo[3];

            infos[ClusterIdCol] = new RowMapperColumnInfo(ClusterId, _types[ClusterIdCol], null);

            var slotNamesType = new VectorType(TextType.Instance, _numClusters);

            var sortedClusters = new ColumnMetadataInfo(SortedClusters);

            sortedClusters.Add(MetadataUtils.Kinds.SlotNames, new MetadataInfo <VBuffer <DvText> >(slotNamesType,
                                                                                                   CreateSlotNamesGetter(_numClusters, "Cluster")));
            var sortedClusterScores = new ColumnMetadataInfo(SortedClusterScores);

            sortedClusterScores.Add(MetadataUtils.Kinds.SlotNames, new MetadataInfo <VBuffer <DvText> >(slotNamesType,
                                                                                                        CreateSlotNamesGetter(_numClusters, "Score")));

            infos[SortedClusterCol]      = new RowMapperColumnInfo(SortedClusters, _types[SortedClusterCol], sortedClusters);
            infos[SortedClusterScoreCol] = new RowMapperColumnInfo(SortedClusterScores,
                                                                   _types[SortedClusterScoreCol], sortedClusterScores);
            return(infos);
        }