diff --git a/src/Microsoft.ML.Api/GenerateCodeCommand.cs b/src/Microsoft.ML.Api/GenerateCodeCommand.cs index 4855a94219..44fe07479e 100644 --- a/src/Microsoft.ML.Api/GenerateCodeCommand.cs +++ b/src/Microsoft.ML.Api/GenerateCodeCommand.cs @@ -121,7 +121,6 @@ public void Run() bool isScoreColumn = scorer.Schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.ScoreColumnSetId, i) != null; var sb = isScoreColumn ? scoreSb : nonScoreSb; - if (sb.Length > 0) sb.AppendLine(); diff --git a/src/Microsoft.ML.Api/GeneratedCodeTemplate.csresource b/src/Microsoft.ML.Api/GeneratedCodeTemplate.csresource index c75126e377..b550860bdc 100644 --- a/src/Microsoft.ML.Api/GeneratedCodeTemplate.csresource +++ b/src/Microsoft.ML.Api/GeneratedCodeTemplate.csresource @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; -using Microsoft.ML; +using Microsoft.ML.Legacy; +using Microsoft.ML.Runtime.Api; namespace MLGeneratedCode { @@ -31,6 +32,14 @@ public class ScoredOutput { /*#SCORE_CLASS_DECL#*/ /*#/SCORE_CLASS_DECL#*/ + + // These are all remaining available columns, either supplied as the input, or intermediate + // columns generated by the transforms. Materializing these columns has a performance cost, + // so they are commented out. Feel free to uncomment any column that is useful for your scenario. +#if false +/*#SCORED_EXAMPLE_CLASS_DECL#*/ +/*#/SCORED_EXAMPLE_CLASS_DECL#*/ +#endif } /*public static void Main(string[] args) @@ -45,7 +54,7 @@ PredictAsync(modelPath); /// This method demonstrates how to run prediction. /// /// -public static void Predict(string modelPath) +public static async void PredictAsync(string modelPath) { var model = await PredictionModel.ReadAsync(modelPath); diff --git a/test/BaselineOutput/Common/Command/CommandShowSchemaModel-out.txt b/test/BaselineOutput/Common/Command/CommandShowSchemaModel-out.txt new file mode 100644 index 0000000000..fcb90ce80c --- /dev/null +++ b/test/BaselineOutput/Common/Command/CommandShowSchemaModel-out.txt @@ -0,0 +1,273 @@ +---- BoundLoader ---- +3 columns: + NumFeatures: Vec + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + CatFeaturesText: Vec + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + Label: R4 +---- RowToRowMapperTransform ---- +4 columns: + NumFeatures: Vec + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + CatFeaturesText: Vec + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + Label: R4 + CatFeatures: Vec, 8> + Metadata 'KeyValues': Vec: Length=76, Count=76 + [0] 'Private', [1] '11th', [2] 'Never-married', [3] 'Machine-op-inspct', [4] 'Own-child', [5] 'Black', [6] 'Male', [7] 'United-States', [8] 'HS-grad', [9] 'Married-civ-spouse' + [10] 'Farming-fishing', [11] 'Husband', [12] 'White', [13] 'Local-gov', [14] 'Assoc-acdm', [15] 'Protective-serv', [16] 'Some-college', [17] '?', [18] 'Female', [19] '10th' + [20] 'Other-service', [21] 'Not-in-family', [22] 'Unmarried', [23] 'Self-emp-not-inc', [24] 'Prof-school', [25] 'Prof-specialty', [26] '7th-8th', [27] 'Craft-repair', [28] 'Federal-gov', [29] 'Bachelors' + [30] 'Adm-clerical', [31] 'Masters', [32] 'Exec-managerial', [33] 'State-gov', [34] 'Wife', [35] 'Widowed', [36] 'Doctorate', [37] 'Asian-Pac-Islander', [38] 'Tech-support', [39] 'Divorced' + [40] 'Peru', [41] 'Separated', [42] 'Sales', [43] '5th-6th', [44] 'Priv-house-serv', [45] 'Guatemala', [46] 'Self-emp-inc', [47] 'Assoc-voc', [48] 'Mexico', [49] 'Transport-moving' + [50] 'Handlers-cleaners', [51] '9th', [52] 'Married-spouse-absent', [53] 'Other', [54] 'Dominican-Republic', [55] 'Armed-Forces', [56] 'Amer-Indian-Inuit', [57] 'Ireland', [58] 'Germany', [59] '12th' + [60] 'Other-relative', [61] 'Philippines', [62] 'Thailand', [63] 'Haiti', [64] 'El-Salvador', [65] 'Puerto-Rico', [66] 'Vietnam', [67] '1st-4th', [68] 'South', [69] 'Married-AF-spouse' + [70] 'Columbia', [71] 'Japan', [72] 'India', [73] 'Cambodia', [74] 'Poland', [75] 'Laos' + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' +---- RowToRowMapperTransform ---- +5 columns: + NumFeatures: Vec + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + CatFeaturesText: Vec + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + Label: R4 + CatFeatures: Vec, 8> + Metadata 'KeyValues': Vec: Length=76, Count=76 + [0] 'Private', [1] '11th', [2] 'Never-married', [3] 'Machine-op-inspct', [4] 'Own-child', [5] 'Black', [6] 'Male', [7] 'United-States', [8] 'HS-grad', [9] 'Married-civ-spouse' + [10] 'Farming-fishing', [11] 'Husband', [12] 'White', [13] 'Local-gov', [14] 'Assoc-acdm', [15] 'Protective-serv', [16] 'Some-college', [17] '?', [18] 'Female', [19] '10th' + [20] 'Other-service', [21] 'Not-in-family', [22] 'Unmarried', [23] 'Self-emp-not-inc', [24] 'Prof-school', [25] 'Prof-specialty', [26] '7th-8th', [27] 'Craft-repair', [28] 'Federal-gov', [29] 'Bachelors' + [30] 'Adm-clerical', [31] 'Masters', [32] 'Exec-managerial', [33] 'State-gov', [34] 'Wife', [35] 'Widowed', [36] 'Doctorate', [37] 'Asian-Pac-Islander', [38] 'Tech-support', [39] 'Divorced' + [40] 'Peru', [41] 'Separated', [42] 'Sales', [43] '5th-6th', [44] 'Priv-house-serv', [45] 'Guatemala', [46] 'Self-emp-inc', [47] 'Assoc-voc', [48] 'Mexico', [49] 'Transport-moving' + [50] 'Handlers-cleaners', [51] '9th', [52] 'Married-spouse-absent', [53] 'Other', [54] 'Dominican-Republic', [55] 'Armed-Forces', [56] 'Amer-Indian-Inuit', [57] 'Ireland', [58] 'Germany', [59] '12th' + [60] 'Other-relative', [61] 'Philippines', [62] 'Thailand', [63] 'Haiti', [64] 'El-Salvador', [65] 'Puerto-Rico', [66] 'Vietnam', [67] '1st-4th', [68] 'South', [69] 'Married-AF-spouse' + [70] 'Columbia', [71] 'Japan', [72] 'India', [73] 'Cambodia', [74] 'Poland', [75] 'Laos' + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + CatFeatures: Vec + Metadata 'CategoricalSlotRanges': Vec: Length=16, Count=16 + [0] '0', [1] '75', [2] '76', [3] '151', [4] '152', [5] '227', [6] '228', [7] '303', [8] '304', [9] '379' + [10] '380', [11] '455', [12] '456', [13] '531', [14] '532', [15] '607' + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=608, Count=608 + [0] 'Workclass.Private', [1] 'Workclass.11th', [2] 'Workclass.Never-married', [3] 'Workclass.Machine-op-inspct', [4] 'Workclass.Own-child', [5] 'Workclass.Black', [6] 'Workclass.Male', [7] 'Workclass.United-States', [8] 'Workclass.HS-grad', [9] 'Workclass.Married-civ-spouse' + [10] 'Workclass.Farming-fishing', [11] 'Workclass.Husband', [12] 'Workclass.White', [13] 'Workclass.Local-gov', [14] 'Workclass.Assoc-acdm', [15] 'Workclass.Protective-serv', [16] 'Workclass.Some-college', [17] 'Workclass.?', [18] 'Workclass.Female', [19] 'Workclass.10th' + [20] 'Workclass.Other-service', [21] 'Workclass.Not-in-family', [22] 'Workclass.Unmarried', [23] 'Workclass.Self-emp-not-inc', [24] 'Workclass.Prof-school', [25] 'Workclass.Prof-specialty', [26] 'Workclass.7th-8th', [27] 'Workclass.Craft-repair', [28] 'Workclass.Federal-gov', [29] 'Workclass.Bachelors' + [30] 'Workclass.Adm-clerical', [31] 'Workclass.Masters', [32] 'Workclass.Exec-managerial', [33] 'Workclass.State-gov', [34] 'Workclass.Wife', [35] 'Workclass.Widowed', [36] 'Workclass.Doctorate', [37] 'Workclass.Asian-Pac-Islander', [38] 'Workclass.Tech-support', [39] 'Workclass.Divorced' + [40] 'Workclass.Peru', [41] 'Workclass.Separated', [42] 'Workclass.Sales', [43] 'Workclass.5th-6th', [44] 'Workclass.Priv-house-serv', [45] 'Workclass.Guatemala', [46] 'Workclass.Self-emp-inc', [47] 'Workclass.Assoc-voc', [48] 'Workclass.Mexico', [49] 'Workclass.Transport-moving' + [50] 'Workclass.Handlers-cleaners', [51] 'Workclass.9th', [52] 'Workclass.Married-spouse-absent', [53] 'Workclass.Other', [54] 'Workclass.Dominican-Republic', [55] 'Workclass.Armed-Forces', [56] 'Workclass.Amer-Indian-Inuit', [57] 'Workclass.Ireland', [58] 'Workclass.Germany', [59] 'Workclass.12th' + [60] 'Workclass.Other-relative', [61] 'Workclass.Philippines', [62] 'Workclass.Thailand', [63] 'Workclass.Haiti', [64] 'Workclass.El-Salvador', [65] 'Workclass.Puerto-Rico', [66] 'Workclass.Vietnam', [67] 'Workclass.1st-4th', [68] 'Workclass.South', [69] 'Workclass.Married-AF-spouse' + [70] 'Workclass.Columbia', [71] 'Workclass.Japan', [72] 'Workclass.India', [73] 'Workclass.Cambodia', [74] 'Workclass.Poland', [75] 'Workclass.Laos', [76] 'education.Private', [77] 'education.11th', [78] 'education.Never-married', [79] 'education.Machine-op-inspct' + [80] 'education.Own-child', [81] 'education.Black', [82] 'education.Male', [83] 'education.United-States', [84] 'education.HS-grad', [85] 'education.Married-civ-spouse', [86] 'education.Farming-fishing', [87] 'education.Husband', [88] 'education.White', [89] 'education.Local-gov' + [90] 'education.Assoc-acdm', [91] 'education.Protective-serv', [92] 'education.Some-college', [93] 'education.?', [94] 'education.Female', [95] 'education.10th', [96] 'education.Other-service', [97] 'education.Not-in-family', [98] 'education.Unmarried', [99] 'education.Self-emp-not-inc' + [100] 'education.Prof-school', [101] 'education.Prof-specialty', [102] 'education.7th-8th', [103] 'education.Craft-repair', [104] 'education.Federal-gov', [105] 'education.Bachelors', [106] 'education.Adm-clerical', [107] 'education.Masters', [108] 'education.Exec-managerial', [109] 'education.State-gov' + [110] 'education.Wife', [111] 'education.Widowed', [112] 'education.Doctorate', [113] 'education.Asian-Pac-Islander', [114] 'education.Tech-support', [115] 'education.Divorced', [116] 'education.Peru', [117] 'education.Separated', [118] 'education.Sales', [119] 'education.5th-6th' + [120] 'education.Priv-house-serv', [121] 'education.Guatemala', [122] 'education.Self-emp-inc', [123] 'education.Assoc-voc', [124] 'education.Mexico', [125] 'education.Transport-moving', [126] 'education.Handlers-cleaners', [127] 'education.9th', [128] 'education.Married-spouse-absent', [129] 'education.Other' + [130] 'education.Dominican-Republic', [131] 'education.Armed-Forces', [132] 'education.Amer-Indian-Inuit', [133] 'education.Ireland', [134] 'education.Germany', [135] 'education.12th', [136] 'education.Other-relative', [137] 'education.Philippines', [138] 'education.Thailand', [139] 'education.Haiti' + [140] 'education.El-Salvador', [141] 'education.Puerto-Rico', [142] 'education.Vietnam', [143] 'education.1st-4th', [144] 'education.South', [145] 'education.Married-AF-spouse', [146] 'education.Columbia', [147] 'education.Japan', [148] 'education.India', [149] 'education.Cambodia' + [150] 'education.Poland', [151] 'education.Laos', [152] 'marital-status.Private', [153] 'marital-status.11th', [154] 'marital-status.Never-married', [155] 'marital-status.Machine-op-inspct', [156] 'marital-status.Own-child', [157] 'marital-status.Black', [158] 'marital-status.Male', [159] 'marital-status.United-States' + [160] 'marital-status.HS-grad', [161] 'marital-status.Married-civ-spouse', [162] 'marital-status.Farming-fishing', [163] 'marital-status.Husband', [164] 'marital-status.White', [165] 'marital-status.Local-gov', [166] 'marital-status.Assoc-acdm', [167] 'marital-status.Protective-serv', [168] 'marital-status.Some-college', [169] 'marital-status.?' + [170] 'marital-status.Female', [171] 'marital-status.10th', [172] 'marital-status.Other-service', [173] 'marital-status.Not-in-family', [174] 'marital-status.Unmarried', [175] 'marital-status.Self-emp-not-inc', [176] 'marital-status.Prof-school', [177] 'marital-status.Prof-specialty', [178] 'marital-status.7th-8th', [179] 'marital-status.Craft-repair' + [180] 'marital-status.Federal-gov', [181] 'marital-status.Bachelors', [182] 'marital-status.Adm-clerical', [183] 'marital-status.Masters', [184] 'marital-status.Exec-managerial', [185] 'marital-status.State-gov', [186] 'marital-status.Wife', [187] 'marital-status.Widowed', [188] 'marital-status.Doctorate', [189] 'marital-status.Asian-Pac-Islander' + [190] 'marital-status.Tech-support', [191] 'marital-status.Divorced', [192] 'marital-status.Peru', [193] 'marital-status.Separated', [194] 'marital-status.Sales', [195] 'marital-status.5th-6th', [196] 'marital-status.Priv-house-serv', [197] 'marital-status.Guatemala', [198] 'marital-status.Self-emp-inc', [199] 'marital-status.Assoc-voc' + [200] 'marital-status.Mexico', [201] 'marital-status.Transport-moving', [202] 'marital-status.Handlers-cleaners', [203] 'marital-status.9th', [204] 'marital-status.Married-spouse-absent', [205] 'marital-status.Other', [206] 'marital-status.Dominican-Republic', [207] 'marital-status.Armed-Forces', [208] 'marital-status.Amer-Indian-Inuit', [209] 'marital-status.Ireland' + [210] 'marital-status.Germany', [211] 'marital-status.12th', [212] 'marital-status.Other-relative', [213] 'marital-status.Philippines', [214] 'marital-status.Thailand', [215] 'marital-status.Haiti', [216] 'marital-status.El-Salvador', [217] 'marital-status.Puerto-Rico', [218] 'marital-status.Vietnam', [219] 'marital-status.1st-4th' + [220] 'marital-status.South', [221] 'marital-status.Married-AF-spouse', [222] 'marital-status.Columbia', [223] 'marital-status.Japan', [224] 'marital-status.India', [225] 'marital-status.Cambodia', [226] 'marital-status.Poland', [227] 'marital-status.Laos', [228] 'occupation.Private', [229] 'occupation.11th' + [230] 'occupation.Never-married', [231] 'occupation.Machine-op-inspct', [232] 'occupation.Own-child', [233] 'occupation.Black', [234] 'occupation.Male', [235] 'occupation.United-States', [236] 'occupation.HS-grad', [237] 'occupation.Married-civ-spouse', [238] 'occupation.Farming-fishing', [239] 'occupation.Husband' + [240] 'occupation.White', [241] 'occupation.Local-gov', [242] 'occupation.Assoc-acdm', [243] 'occupation.Protective-serv', [244] 'occupation.Some-college', [245] 'occupation.?', [246] 'occupation.Female', [247] 'occupation.10th', [248] 'occupation.Other-service', [249] 'occupation.Not-in-family' + [250] 'occupation.Unmarried', [251] 'occupation.Self-emp-not-inc', [252] 'occupation.Prof-school', [253] 'occupation.Prof-specialty', [254] 'occupation.7th-8th', [255] 'occupation.Craft-repair', [256] 'occupation.Federal-gov', [257] 'occupation.Bachelors', [258] 'occupation.Adm-clerical', [259] 'occupation.Masters' + [260] 'occupation.Exec-managerial', [261] 'occupation.State-gov', [262] 'occupation.Wife', [263] 'occupation.Widowed', [264] 'occupation.Doctorate', [265] 'occupation.Asian-Pac-Islander', [266] 'occupation.Tech-support', [267] 'occupation.Divorced', [268] 'occupation.Peru', [269] 'occupation.Separated' + [270] 'occupation.Sales', [271] 'occupation.5th-6th', [272] 'occupation.Priv-house-serv', [273] 'occupation.Guatemala', [274] 'occupation.Self-emp-inc', [275] 'occupation.Assoc-voc', [276] 'occupation.Mexico', [277] 'occupation.Transport-moving', [278] 'occupation.Handlers-cleaners', [279] 'occupation.9th' + [280] 'occupation.Married-spouse-absent', [281] 'occupation.Other', [282] 'occupation.Dominican-Republic', [283] 'occupation.Armed-Forces', [284] 'occupation.Amer-Indian-Inuit', [285] 'occupation.Ireland', [286] 'occupation.Germany', [287] 'occupation.12th', [288] 'occupation.Other-relative', [289] 'occupation.Philippines' + [290] 'occupation.Thailand', [291] 'occupation.Haiti', [292] 'occupation.El-Salvador', [293] 'occupation.Puerto-Rico', [294] 'occupation.Vietnam', [295] 'occupation.1st-4th', [296] 'occupation.South', [297] 'occupation.Married-AF-spouse', [298] 'occupation.Columbia', [299] 'occupation.Japan' + [300] 'occupation.India', [301] 'occupation.Cambodia', [302] 'occupation.Poland', [303] 'occupation.Laos', [304] 'relationship.Private', [305] 'relationship.11th', [306] 'relationship.Never-married', [307] 'relationship.Machine-op-inspct', [308] 'relationship.Own-child', [309] 'relationship.Black' + [310] 'relationship.Male', [311] 'relationship.United-States', [312] 'relationship.HS-grad', [313] 'relationship.Married-civ-spouse', [314] 'relationship.Farming-fishing', [315] 'relationship.Husband', [316] 'relationship.White', [317] 'relationship.Local-gov', [318] 'relationship.Assoc-acdm', [319] 'relationship.Protective-serv' + [320] 'relationship.Some-college', [321] 'relationship.?', [322] 'relationship.Female', [323] 'relationship.10th', [324] 'relationship.Other-service', [325] 'relationship.Not-in-family', [326] 'relationship.Unmarried', [327] 'relationship.Self-emp-not-inc', [328] 'relationship.Prof-school', [329] 'relationship.Prof-specialty' + [330] 'relationship.7th-8th', [331] 'relationship.Craft-repair', [332] 'relationship.Federal-gov', [333] 'relationship.Bachelors', [334] 'relationship.Adm-clerical', [335] 'relationship.Masters', [336] 'relationship.Exec-managerial', [337] 'relationship.State-gov', [338] 'relationship.Wife', [339] 'relationship.Widowed' + [340] 'relationship.Doctorate', [341] 'relationship.Asian-Pac-Islander', [342] 'relationship.Tech-support', [343] 'relationship.Divorced', [344] 'relationship.Peru', [345] 'relationship.Separated', [346] 'relationship.Sales', [347] 'relationship.5th-6th', [348] 'relationship.Priv-house-serv', [349] 'relationship.Guatemala' + [350] 'relationship.Self-emp-inc', [351] 'relationship.Assoc-voc', [352] 'relationship.Mexico', [353] 'relationship.Transport-moving', [354] 'relationship.Handlers-cleaners', [355] 'relationship.9th', [356] 'relationship.Married-spouse-absent', [357] 'relationship.Other', [358] 'relationship.Dominican-Republic', [359] 'relationship.Armed-Forces' + [360] 'relationship.Amer-Indian-Inuit', [361] 'relationship.Ireland', [362] 'relationship.Germany', [363] 'relationship.12th', [364] 'relationship.Other-relative', [365] 'relationship.Philippines', [366] 'relationship.Thailand', [367] 'relationship.Haiti', [368] 'relationship.El-Salvador', [369] 'relationship.Puerto-Rico' + [370] 'relationship.Vietnam', [371] 'relationship.1st-4th', [372] 'relationship.South', [373] 'relationship.Married-AF-spouse', [374] 'relationship.Columbia', [375] 'relationship.Japan', [376] 'relationship.India', [377] 'relationship.Cambodia', [378] 'relationship.Poland', [379] 'relationship.Laos' + [380] 'ethnicity.Private', [381] 'ethnicity.11th', [382] 'ethnicity.Never-married', [383] 'ethnicity.Machine-op-inspct', [384] 'ethnicity.Own-child', [385] 'ethnicity.Black', [386] 'ethnicity.Male', [387] 'ethnicity.United-States', [388] 'ethnicity.HS-grad', [389] 'ethnicity.Married-civ-spouse' + [390] 'ethnicity.Farming-fishing', [391] 'ethnicity.Husband', [392] 'ethnicity.White', [393] 'ethnicity.Local-gov', [394] 'ethnicity.Assoc-acdm', [395] 'ethnicity.Protective-serv', [396] 'ethnicity.Some-college', [397] 'ethnicity.?', [398] 'ethnicity.Female', [399] 'ethnicity.10th' + [400] 'ethnicity.Other-service', [401] 'ethnicity.Not-in-family', [402] 'ethnicity.Unmarried', [403] 'ethnicity.Self-emp-not-inc', [404] 'ethnicity.Prof-school', [405] 'ethnicity.Prof-specialty', [406] 'ethnicity.7th-8th', [407] 'ethnicity.Craft-repair', [408] 'ethnicity.Federal-gov', [409] 'ethnicity.Bachelors' + [410] 'ethnicity.Adm-clerical', [411] 'ethnicity.Masters', [412] 'ethnicity.Exec-managerial', [413] 'ethnicity.State-gov', [414] 'ethnicity.Wife', [415] 'ethnicity.Widowed', [416] 'ethnicity.Doctorate', [417] 'ethnicity.Asian-Pac-Islander', [418] 'ethnicity.Tech-support', [419] 'ethnicity.Divorced' + [420] 'ethnicity.Peru', [421] 'ethnicity.Separated', [422] 'ethnicity.Sales', [423] 'ethnicity.5th-6th', [424] 'ethnicity.Priv-house-serv', [425] 'ethnicity.Guatemala', [426] 'ethnicity.Self-emp-inc', [427] 'ethnicity.Assoc-voc', [428] 'ethnicity.Mexico', [429] 'ethnicity.Transport-moving' + [430] 'ethnicity.Handlers-cleaners', [431] 'ethnicity.9th', [432] 'ethnicity.Married-spouse-absent', [433] 'ethnicity.Other', [434] 'ethnicity.Dominican-Republic', [435] 'ethnicity.Armed-Forces', [436] 'ethnicity.Amer-Indian-Inuit', [437] 'ethnicity.Ireland', [438] 'ethnicity.Germany', [439] 'ethnicity.12th' + [440] 'ethnicity.Other-relative', [441] 'ethnicity.Philippines', [442] 'ethnicity.Thailand', [443] 'ethnicity.Haiti', [444] 'ethnicity.El-Salvador', [445] 'ethnicity.Puerto-Rico', [446] 'ethnicity.Vietnam', [447] 'ethnicity.1st-4th', [448] 'ethnicity.South', [449] 'ethnicity.Married-AF-spouse' + [450] 'ethnicity.Columbia', [451] 'ethnicity.Japan', [452] 'ethnicity.India', [453] 'ethnicity.Cambodia', [454] 'ethnicity.Poland', [455] 'ethnicity.Laos', [456] 'sex.Private', [457] 'sex.11th', [458] 'sex.Never-married', [459] 'sex.Machine-op-inspct' + [460] 'sex.Own-child', [461] 'sex.Black', [462] 'sex.Male', [463] 'sex.United-States', [464] 'sex.HS-grad', [465] 'sex.Married-civ-spouse', [466] 'sex.Farming-fishing', [467] 'sex.Husband', [468] 'sex.White', [469] 'sex.Local-gov' + [470] 'sex.Assoc-acdm', [471] 'sex.Protective-serv', [472] 'sex.Some-college', [473] 'sex.?', [474] 'sex.Female', [475] 'sex.10th', [476] 'sex.Other-service', [477] 'sex.Not-in-family', [478] 'sex.Unmarried', [479] 'sex.Self-emp-not-inc' + [480] 'sex.Prof-school', [481] 'sex.Prof-specialty', [482] 'sex.7th-8th', [483] 'sex.Craft-repair', [484] 'sex.Federal-gov', [485] 'sex.Bachelors', [486] 'sex.Adm-clerical', [487] 'sex.Masters', [488] 'sex.Exec-managerial', [489] 'sex.State-gov' + [490] 'sex.Wife', [491] 'sex.Widowed', [492] 'sex.Doctorate', [493] 'sex.Asian-Pac-Islander', [494] 'sex.Tech-support', [495] 'sex.Divorced', [496] 'sex.Peru', [497] 'sex.Separated', [498] 'sex.Sales', [499] 'sex.5th-6th' + [500] 'sex.Priv-house-serv', [501] 'sex.Guatemala', [502] 'sex.Self-emp-inc', [503] 'sex.Assoc-voc', [504] 'sex.Mexico', [505] 'sex.Transport-moving', [506] 'sex.Handlers-cleaners', [507] 'sex.9th', [508] 'sex.Married-spouse-absent', [509] 'sex.Other' + [510] 'sex.Dominican-Republic', [511] 'sex.Armed-Forces', [512] 'sex.Amer-Indian-Inuit', [513] 'sex.Ireland', [514] 'sex.Germany', [515] 'sex.12th', [516] 'sex.Other-relative', [517] 'sex.Philippines', [518] 'sex.Thailand', [519] 'sex.Haiti' + [520] 'sex.El-Salvador', [521] 'sex.Puerto-Rico', [522] 'sex.Vietnam', [523] 'sex.1st-4th', [524] 'sex.South', [525] 'sex.Married-AF-spouse', [526] 'sex.Columbia', [527] 'sex.Japan', [528] 'sex.India', [529] 'sex.Cambodia' + [530] 'sex.Poland', [531] 'sex.Laos', [532] 'native-country-region.Private', [533] 'native-country-region.11th', [534] 'native-country-region.Never-married', [535] 'native-country-region.Machine-op-inspct', [536] 'native-country-region.Own-child', [537] 'native-country-region.Black', [538] 'native-country-region.Male', [539] 'native-country-region.United-States' + [540] 'native-country-region.HS-grad', [541] 'native-country-region.Married-civ-spouse', [542] 'native-country-region.Farming-fishing', [543] 'native-country-region.Husband', [544] 'native-country-region.White', [545] 'native-country-region.Local-gov', [546] 'native-country-region.Assoc-acdm', [547] 'native-country-region.Protective-serv', [548] 'native-country-region.Some-college', [549] 'native-country-region.?' + [550] 'native-country-region.Female', [551] 'native-country-region.10th', [552] 'native-country-region.Other-service', [553] 'native-country-region.Not-in-family', [554] 'native-country-region.Unmarried', [555] 'native-country-region.Self-emp-not-inc', [556] 'native-country-region.Prof-school', [557] 'native-country-region.Prof-specialty', [558] 'native-country-region.7th-8th', [559] 'native-country-region.Craft-repair' + [560] 'native-country-region.Federal-gov', [561] 'native-country-region.Bachelors', [562] 'native-country-region.Adm-clerical', [563] 'native-country-region.Masters', [564] 'native-country-region.Exec-managerial', [565] 'native-country-region.State-gov', [566] 'native-country-region.Wife', [567] 'native-country-region.Widowed', [568] 'native-country-region.Doctorate', [569] 'native-country-region.Asian-Pac-Islander' + [570] 'native-country-region.Tech-support', [571] 'native-country-region.Divorced', [572] 'native-country-region.Peru', [573] 'native-country-region.Separated', [574] 'native-country-region.Sales', [575] 'native-country-region.5th-6th', [576] 'native-country-region.Priv-house-serv', [577] 'native-country-region.Guatemala', [578] 'native-country-region.Self-emp-inc', [579] 'native-country-region.Assoc-voc' + [580] 'native-country-region.Mexico', [581] 'native-country-region.Transport-moving', [582] 'native-country-region.Handlers-cleaners', [583] 'native-country-region.9th', [584] 'native-country-region.Married-spouse-absent', [585] 'native-country-region.Other', [586] 'native-country-region.Dominican-Republic', [587] 'native-country-region.Armed-Forces', [588] 'native-country-region.Amer-Indian-Inuit', [589] 'native-country-region.Ireland' + [590] 'native-country-region.Germany', [591] 'native-country-region.12th', [592] 'native-country-region.Other-relative', [593] 'native-country-region.Philippines', [594] 'native-country-region.Thailand', [595] 'native-country-region.Haiti', [596] 'native-country-region.El-Salvador', [597] 'native-country-region.Puerto-Rico', [598] 'native-country-region.Vietnam', [599] 'native-country-region.1st-4th' + [600] 'native-country-region.South', [601] 'native-country-region.Married-AF-spouse', [602] 'native-country-region.Columbia', [603] 'native-country-region.Japan', [604] 'native-country-region.India', [605] 'native-country-region.Cambodia', [606] 'native-country-region.Poland', [607] 'native-country-region.Laos' +---- RowToRowMapperTransform ---- +6 columns: + NumFeatures: Vec + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + CatFeaturesText: Vec + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + Label: R4 + CatFeatures: Vec, 8> + Metadata 'KeyValues': Vec: Length=76, Count=76 + [0] 'Private', [1] '11th', [2] 'Never-married', [3] 'Machine-op-inspct', [4] 'Own-child', [5] 'Black', [6] 'Male', [7] 'United-States', [8] 'HS-grad', [9] 'Married-civ-spouse' + [10] 'Farming-fishing', [11] 'Husband', [12] 'White', [13] 'Local-gov', [14] 'Assoc-acdm', [15] 'Protective-serv', [16] 'Some-college', [17] '?', [18] 'Female', [19] '10th' + [20] 'Other-service', [21] 'Not-in-family', [22] 'Unmarried', [23] 'Self-emp-not-inc', [24] 'Prof-school', [25] 'Prof-specialty', [26] '7th-8th', [27] 'Craft-repair', [28] 'Federal-gov', [29] 'Bachelors' + [30] 'Adm-clerical', [31] 'Masters', [32] 'Exec-managerial', [33] 'State-gov', [34] 'Wife', [35] 'Widowed', [36] 'Doctorate', [37] 'Asian-Pac-Islander', [38] 'Tech-support', [39] 'Divorced' + [40] 'Peru', [41] 'Separated', [42] 'Sales', [43] '5th-6th', [44] 'Priv-house-serv', [45] 'Guatemala', [46] 'Self-emp-inc', [47] 'Assoc-voc', [48] 'Mexico', [49] 'Transport-moving' + [50] 'Handlers-cleaners', [51] '9th', [52] 'Married-spouse-absent', [53] 'Other', [54] 'Dominican-Republic', [55] 'Armed-Forces', [56] 'Amer-Indian-Inuit', [57] 'Ireland', [58] 'Germany', [59] '12th' + [60] 'Other-relative', [61] 'Philippines', [62] 'Thailand', [63] 'Haiti', [64] 'El-Salvador', [65] 'Puerto-Rico', [66] 'Vietnam', [67] '1st-4th', [68] 'South', [69] 'Married-AF-spouse' + [70] 'Columbia', [71] 'Japan', [72] 'India', [73] 'Cambodia', [74] 'Poland', [75] 'Laos' + Metadata 'SlotNames': Vec: Length=8, Count=8 + [0] 'Workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country-region' + CatFeatures: Vec + Metadata 'CategoricalSlotRanges': Vec: Length=16, Count=16 + [0] '0', [1] '75', [2] '76', [3] '151', [4] '152', [5] '227', [6] '228', [7] '303', [8] '304', [9] '379' + [10] '380', [11] '455', [12] '456', [13] '531', [14] '532', [15] '607' + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=608, Count=608 + [0] 'Workclass.Private', [1] 'Workclass.11th', [2] 'Workclass.Never-married', [3] 'Workclass.Machine-op-inspct', [4] 'Workclass.Own-child', [5] 'Workclass.Black', [6] 'Workclass.Male', [7] 'Workclass.United-States', [8] 'Workclass.HS-grad', [9] 'Workclass.Married-civ-spouse' + [10] 'Workclass.Farming-fishing', [11] 'Workclass.Husband', [12] 'Workclass.White', [13] 'Workclass.Local-gov', [14] 'Workclass.Assoc-acdm', [15] 'Workclass.Protective-serv', [16] 'Workclass.Some-college', [17] 'Workclass.?', [18] 'Workclass.Female', [19] 'Workclass.10th' + [20] 'Workclass.Other-service', [21] 'Workclass.Not-in-family', [22] 'Workclass.Unmarried', [23] 'Workclass.Self-emp-not-inc', [24] 'Workclass.Prof-school', [25] 'Workclass.Prof-specialty', [26] 'Workclass.7th-8th', [27] 'Workclass.Craft-repair', [28] 'Workclass.Federal-gov', [29] 'Workclass.Bachelors' + [30] 'Workclass.Adm-clerical', [31] 'Workclass.Masters', [32] 'Workclass.Exec-managerial', [33] 'Workclass.State-gov', [34] 'Workclass.Wife', [35] 'Workclass.Widowed', [36] 'Workclass.Doctorate', [37] 'Workclass.Asian-Pac-Islander', [38] 'Workclass.Tech-support', [39] 'Workclass.Divorced' + [40] 'Workclass.Peru', [41] 'Workclass.Separated', [42] 'Workclass.Sales', [43] 'Workclass.5th-6th', [44] 'Workclass.Priv-house-serv', [45] 'Workclass.Guatemala', [46] 'Workclass.Self-emp-inc', [47] 'Workclass.Assoc-voc', [48] 'Workclass.Mexico', [49] 'Workclass.Transport-moving' + [50] 'Workclass.Handlers-cleaners', [51] 'Workclass.9th', [52] 'Workclass.Married-spouse-absent', [53] 'Workclass.Other', [54] 'Workclass.Dominican-Republic', [55] 'Workclass.Armed-Forces', [56] 'Workclass.Amer-Indian-Inuit', [57] 'Workclass.Ireland', [58] 'Workclass.Germany', [59] 'Workclass.12th' + [60] 'Workclass.Other-relative', [61] 'Workclass.Philippines', [62] 'Workclass.Thailand', [63] 'Workclass.Haiti', [64] 'Workclass.El-Salvador', [65] 'Workclass.Puerto-Rico', [66] 'Workclass.Vietnam', [67] 'Workclass.1st-4th', [68] 'Workclass.South', [69] 'Workclass.Married-AF-spouse' + [70] 'Workclass.Columbia', [71] 'Workclass.Japan', [72] 'Workclass.India', [73] 'Workclass.Cambodia', [74] 'Workclass.Poland', [75] 'Workclass.Laos', [76] 'education.Private', [77] 'education.11th', [78] 'education.Never-married', [79] 'education.Machine-op-inspct' + [80] 'education.Own-child', [81] 'education.Black', [82] 'education.Male', [83] 'education.United-States', [84] 'education.HS-grad', [85] 'education.Married-civ-spouse', [86] 'education.Farming-fishing', [87] 'education.Husband', [88] 'education.White', [89] 'education.Local-gov' + [90] 'education.Assoc-acdm', [91] 'education.Protective-serv', [92] 'education.Some-college', [93] 'education.?', [94] 'education.Female', [95] 'education.10th', [96] 'education.Other-service', [97] 'education.Not-in-family', [98] 'education.Unmarried', [99] 'education.Self-emp-not-inc' + [100] 'education.Prof-school', [101] 'education.Prof-specialty', [102] 'education.7th-8th', [103] 'education.Craft-repair', [104] 'education.Federal-gov', [105] 'education.Bachelors', [106] 'education.Adm-clerical', [107] 'education.Masters', [108] 'education.Exec-managerial', [109] 'education.State-gov' + [110] 'education.Wife', [111] 'education.Widowed', [112] 'education.Doctorate', [113] 'education.Asian-Pac-Islander', [114] 'education.Tech-support', [115] 'education.Divorced', [116] 'education.Peru', [117] 'education.Separated', [118] 'education.Sales', [119] 'education.5th-6th' + [120] 'education.Priv-house-serv', [121] 'education.Guatemala', [122] 'education.Self-emp-inc', [123] 'education.Assoc-voc', [124] 'education.Mexico', [125] 'education.Transport-moving', [126] 'education.Handlers-cleaners', [127] 'education.9th', [128] 'education.Married-spouse-absent', [129] 'education.Other' + [130] 'education.Dominican-Republic', [131] 'education.Armed-Forces', [132] 'education.Amer-Indian-Inuit', [133] 'education.Ireland', [134] 'education.Germany', [135] 'education.12th', [136] 'education.Other-relative', [137] 'education.Philippines', [138] 'education.Thailand', [139] 'education.Haiti' + [140] 'education.El-Salvador', [141] 'education.Puerto-Rico', [142] 'education.Vietnam', [143] 'education.1st-4th', [144] 'education.South', [145] 'education.Married-AF-spouse', [146] 'education.Columbia', [147] 'education.Japan', [148] 'education.India', [149] 'education.Cambodia' + [150] 'education.Poland', [151] 'education.Laos', [152] 'marital-status.Private', [153] 'marital-status.11th', [154] 'marital-status.Never-married', [155] 'marital-status.Machine-op-inspct', [156] 'marital-status.Own-child', [157] 'marital-status.Black', [158] 'marital-status.Male', [159] 'marital-status.United-States' + [160] 'marital-status.HS-grad', [161] 'marital-status.Married-civ-spouse', [162] 'marital-status.Farming-fishing', [163] 'marital-status.Husband', [164] 'marital-status.White', [165] 'marital-status.Local-gov', [166] 'marital-status.Assoc-acdm', [167] 'marital-status.Protective-serv', [168] 'marital-status.Some-college', [169] 'marital-status.?' + [170] 'marital-status.Female', [171] 'marital-status.10th', [172] 'marital-status.Other-service', [173] 'marital-status.Not-in-family', [174] 'marital-status.Unmarried', [175] 'marital-status.Self-emp-not-inc', [176] 'marital-status.Prof-school', [177] 'marital-status.Prof-specialty', [178] 'marital-status.7th-8th', [179] 'marital-status.Craft-repair' + [180] 'marital-status.Federal-gov', [181] 'marital-status.Bachelors', [182] 'marital-status.Adm-clerical', [183] 'marital-status.Masters', [184] 'marital-status.Exec-managerial', [185] 'marital-status.State-gov', [186] 'marital-status.Wife', [187] 'marital-status.Widowed', [188] 'marital-status.Doctorate', [189] 'marital-status.Asian-Pac-Islander' + [190] 'marital-status.Tech-support', [191] 'marital-status.Divorced', [192] 'marital-status.Peru', [193] 'marital-status.Separated', [194] 'marital-status.Sales', [195] 'marital-status.5th-6th', [196] 'marital-status.Priv-house-serv', [197] 'marital-status.Guatemala', [198] 'marital-status.Self-emp-inc', [199] 'marital-status.Assoc-voc' + [200] 'marital-status.Mexico', [201] 'marital-status.Transport-moving', [202] 'marital-status.Handlers-cleaners', [203] 'marital-status.9th', [204] 'marital-status.Married-spouse-absent', [205] 'marital-status.Other', [206] 'marital-status.Dominican-Republic', [207] 'marital-status.Armed-Forces', [208] 'marital-status.Amer-Indian-Inuit', [209] 'marital-status.Ireland' + [210] 'marital-status.Germany', [211] 'marital-status.12th', [212] 'marital-status.Other-relative', [213] 'marital-status.Philippines', [214] 'marital-status.Thailand', [215] 'marital-status.Haiti', [216] 'marital-status.El-Salvador', [217] 'marital-status.Puerto-Rico', [218] 'marital-status.Vietnam', [219] 'marital-status.1st-4th' + [220] 'marital-status.South', [221] 'marital-status.Married-AF-spouse', [222] 'marital-status.Columbia', [223] 'marital-status.Japan', [224] 'marital-status.India', [225] 'marital-status.Cambodia', [226] 'marital-status.Poland', [227] 'marital-status.Laos', [228] 'occupation.Private', [229] 'occupation.11th' + [230] 'occupation.Never-married', [231] 'occupation.Machine-op-inspct', [232] 'occupation.Own-child', [233] 'occupation.Black', [234] 'occupation.Male', [235] 'occupation.United-States', [236] 'occupation.HS-grad', [237] 'occupation.Married-civ-spouse', [238] 'occupation.Farming-fishing', [239] 'occupation.Husband' + [240] 'occupation.White', [241] 'occupation.Local-gov', [242] 'occupation.Assoc-acdm', [243] 'occupation.Protective-serv', [244] 'occupation.Some-college', [245] 'occupation.?', [246] 'occupation.Female', [247] 'occupation.10th', [248] 'occupation.Other-service', [249] 'occupation.Not-in-family' + [250] 'occupation.Unmarried', [251] 'occupation.Self-emp-not-inc', [252] 'occupation.Prof-school', [253] 'occupation.Prof-specialty', [254] 'occupation.7th-8th', [255] 'occupation.Craft-repair', [256] 'occupation.Federal-gov', [257] 'occupation.Bachelors', [258] 'occupation.Adm-clerical', [259] 'occupation.Masters' + [260] 'occupation.Exec-managerial', [261] 'occupation.State-gov', [262] 'occupation.Wife', [263] 'occupation.Widowed', [264] 'occupation.Doctorate', [265] 'occupation.Asian-Pac-Islander', [266] 'occupation.Tech-support', [267] 'occupation.Divorced', [268] 'occupation.Peru', [269] 'occupation.Separated' + [270] 'occupation.Sales', [271] 'occupation.5th-6th', [272] 'occupation.Priv-house-serv', [273] 'occupation.Guatemala', [274] 'occupation.Self-emp-inc', [275] 'occupation.Assoc-voc', [276] 'occupation.Mexico', [277] 'occupation.Transport-moving', [278] 'occupation.Handlers-cleaners', [279] 'occupation.9th' + [280] 'occupation.Married-spouse-absent', [281] 'occupation.Other', [282] 'occupation.Dominican-Republic', [283] 'occupation.Armed-Forces', [284] 'occupation.Amer-Indian-Inuit', [285] 'occupation.Ireland', [286] 'occupation.Germany', [287] 'occupation.12th', [288] 'occupation.Other-relative', [289] 'occupation.Philippines' + [290] 'occupation.Thailand', [291] 'occupation.Haiti', [292] 'occupation.El-Salvador', [293] 'occupation.Puerto-Rico', [294] 'occupation.Vietnam', [295] 'occupation.1st-4th', [296] 'occupation.South', [297] 'occupation.Married-AF-spouse', [298] 'occupation.Columbia', [299] 'occupation.Japan' + [300] 'occupation.India', [301] 'occupation.Cambodia', [302] 'occupation.Poland', [303] 'occupation.Laos', [304] 'relationship.Private', [305] 'relationship.11th', [306] 'relationship.Never-married', [307] 'relationship.Machine-op-inspct', [308] 'relationship.Own-child', [309] 'relationship.Black' + [310] 'relationship.Male', [311] 'relationship.United-States', [312] 'relationship.HS-grad', [313] 'relationship.Married-civ-spouse', [314] 'relationship.Farming-fishing', [315] 'relationship.Husband', [316] 'relationship.White', [317] 'relationship.Local-gov', [318] 'relationship.Assoc-acdm', [319] 'relationship.Protective-serv' + [320] 'relationship.Some-college', [321] 'relationship.?', [322] 'relationship.Female', [323] 'relationship.10th', [324] 'relationship.Other-service', [325] 'relationship.Not-in-family', [326] 'relationship.Unmarried', [327] 'relationship.Self-emp-not-inc', [328] 'relationship.Prof-school', [329] 'relationship.Prof-specialty' + [330] 'relationship.7th-8th', [331] 'relationship.Craft-repair', [332] 'relationship.Federal-gov', [333] 'relationship.Bachelors', [334] 'relationship.Adm-clerical', [335] 'relationship.Masters', [336] 'relationship.Exec-managerial', [337] 'relationship.State-gov', [338] 'relationship.Wife', [339] 'relationship.Widowed' + [340] 'relationship.Doctorate', [341] 'relationship.Asian-Pac-Islander', [342] 'relationship.Tech-support', [343] 'relationship.Divorced', [344] 'relationship.Peru', [345] 'relationship.Separated', [346] 'relationship.Sales', [347] 'relationship.5th-6th', [348] 'relationship.Priv-house-serv', [349] 'relationship.Guatemala' + [350] 'relationship.Self-emp-inc', [351] 'relationship.Assoc-voc', [352] 'relationship.Mexico', [353] 'relationship.Transport-moving', [354] 'relationship.Handlers-cleaners', [355] 'relationship.9th', [356] 'relationship.Married-spouse-absent', [357] 'relationship.Other', [358] 'relationship.Dominican-Republic', [359] 'relationship.Armed-Forces' + [360] 'relationship.Amer-Indian-Inuit', [361] 'relationship.Ireland', [362] 'relationship.Germany', [363] 'relationship.12th', [364] 'relationship.Other-relative', [365] 'relationship.Philippines', [366] 'relationship.Thailand', [367] 'relationship.Haiti', [368] 'relationship.El-Salvador', [369] 'relationship.Puerto-Rico' + [370] 'relationship.Vietnam', [371] 'relationship.1st-4th', [372] 'relationship.South', [373] 'relationship.Married-AF-spouse', [374] 'relationship.Columbia', [375] 'relationship.Japan', [376] 'relationship.India', [377] 'relationship.Cambodia', [378] 'relationship.Poland', [379] 'relationship.Laos' + [380] 'ethnicity.Private', [381] 'ethnicity.11th', [382] 'ethnicity.Never-married', [383] 'ethnicity.Machine-op-inspct', [384] 'ethnicity.Own-child', [385] 'ethnicity.Black', [386] 'ethnicity.Male', [387] 'ethnicity.United-States', [388] 'ethnicity.HS-grad', [389] 'ethnicity.Married-civ-spouse' + [390] 'ethnicity.Farming-fishing', [391] 'ethnicity.Husband', [392] 'ethnicity.White', [393] 'ethnicity.Local-gov', [394] 'ethnicity.Assoc-acdm', [395] 'ethnicity.Protective-serv', [396] 'ethnicity.Some-college', [397] 'ethnicity.?', [398] 'ethnicity.Female', [399] 'ethnicity.10th' + [400] 'ethnicity.Other-service', [401] 'ethnicity.Not-in-family', [402] 'ethnicity.Unmarried', [403] 'ethnicity.Self-emp-not-inc', [404] 'ethnicity.Prof-school', [405] 'ethnicity.Prof-specialty', [406] 'ethnicity.7th-8th', [407] 'ethnicity.Craft-repair', [408] 'ethnicity.Federal-gov', [409] 'ethnicity.Bachelors' + [410] 'ethnicity.Adm-clerical', [411] 'ethnicity.Masters', [412] 'ethnicity.Exec-managerial', [413] 'ethnicity.State-gov', [414] 'ethnicity.Wife', [415] 'ethnicity.Widowed', [416] 'ethnicity.Doctorate', [417] 'ethnicity.Asian-Pac-Islander', [418] 'ethnicity.Tech-support', [419] 'ethnicity.Divorced' + [420] 'ethnicity.Peru', [421] 'ethnicity.Separated', [422] 'ethnicity.Sales', [423] 'ethnicity.5th-6th', [424] 'ethnicity.Priv-house-serv', [425] 'ethnicity.Guatemala', [426] 'ethnicity.Self-emp-inc', [427] 'ethnicity.Assoc-voc', [428] 'ethnicity.Mexico', [429] 'ethnicity.Transport-moving' + [430] 'ethnicity.Handlers-cleaners', [431] 'ethnicity.9th', [432] 'ethnicity.Married-spouse-absent', [433] 'ethnicity.Other', [434] 'ethnicity.Dominican-Republic', [435] 'ethnicity.Armed-Forces', [436] 'ethnicity.Amer-Indian-Inuit', [437] 'ethnicity.Ireland', [438] 'ethnicity.Germany', [439] 'ethnicity.12th' + [440] 'ethnicity.Other-relative', [441] 'ethnicity.Philippines', [442] 'ethnicity.Thailand', [443] 'ethnicity.Haiti', [444] 'ethnicity.El-Salvador', [445] 'ethnicity.Puerto-Rico', [446] 'ethnicity.Vietnam', [447] 'ethnicity.1st-4th', [448] 'ethnicity.South', [449] 'ethnicity.Married-AF-spouse' + [450] 'ethnicity.Columbia', [451] 'ethnicity.Japan', [452] 'ethnicity.India', [453] 'ethnicity.Cambodia', [454] 'ethnicity.Poland', [455] 'ethnicity.Laos', [456] 'sex.Private', [457] 'sex.11th', [458] 'sex.Never-married', [459] 'sex.Machine-op-inspct' + [460] 'sex.Own-child', [461] 'sex.Black', [462] 'sex.Male', [463] 'sex.United-States', [464] 'sex.HS-grad', [465] 'sex.Married-civ-spouse', [466] 'sex.Farming-fishing', [467] 'sex.Husband', [468] 'sex.White', [469] 'sex.Local-gov' + [470] 'sex.Assoc-acdm', [471] 'sex.Protective-serv', [472] 'sex.Some-college', [473] 'sex.?', [474] 'sex.Female', [475] 'sex.10th', [476] 'sex.Other-service', [477] 'sex.Not-in-family', [478] 'sex.Unmarried', [479] 'sex.Self-emp-not-inc' + [480] 'sex.Prof-school', [481] 'sex.Prof-specialty', [482] 'sex.7th-8th', [483] 'sex.Craft-repair', [484] 'sex.Federal-gov', [485] 'sex.Bachelors', [486] 'sex.Adm-clerical', [487] 'sex.Masters', [488] 'sex.Exec-managerial', [489] 'sex.State-gov' + [490] 'sex.Wife', [491] 'sex.Widowed', [492] 'sex.Doctorate', [493] 'sex.Asian-Pac-Islander', [494] 'sex.Tech-support', [495] 'sex.Divorced', [496] 'sex.Peru', [497] 'sex.Separated', [498] 'sex.Sales', [499] 'sex.5th-6th' + [500] 'sex.Priv-house-serv', [501] 'sex.Guatemala', [502] 'sex.Self-emp-inc', [503] 'sex.Assoc-voc', [504] 'sex.Mexico', [505] 'sex.Transport-moving', [506] 'sex.Handlers-cleaners', [507] 'sex.9th', [508] 'sex.Married-spouse-absent', [509] 'sex.Other' + [510] 'sex.Dominican-Republic', [511] 'sex.Armed-Forces', [512] 'sex.Amer-Indian-Inuit', [513] 'sex.Ireland', [514] 'sex.Germany', [515] 'sex.12th', [516] 'sex.Other-relative', [517] 'sex.Philippines', [518] 'sex.Thailand', [519] 'sex.Haiti' + [520] 'sex.El-Salvador', [521] 'sex.Puerto-Rico', [522] 'sex.Vietnam', [523] 'sex.1st-4th', [524] 'sex.South', [525] 'sex.Married-AF-spouse', [526] 'sex.Columbia', [527] 'sex.Japan', [528] 'sex.India', [529] 'sex.Cambodia' + [530] 'sex.Poland', [531] 'sex.Laos', [532] 'native-country-region.Private', [533] 'native-country-region.11th', [534] 'native-country-region.Never-married', [535] 'native-country-region.Machine-op-inspct', [536] 'native-country-region.Own-child', [537] 'native-country-region.Black', [538] 'native-country-region.Male', [539] 'native-country-region.United-States' + [540] 'native-country-region.HS-grad', [541] 'native-country-region.Married-civ-spouse', [542] 'native-country-region.Farming-fishing', [543] 'native-country-region.Husband', [544] 'native-country-region.White', [545] 'native-country-region.Local-gov', [546] 'native-country-region.Assoc-acdm', [547] 'native-country-region.Protective-serv', [548] 'native-country-region.Some-college', [549] 'native-country-region.?' + [550] 'native-country-region.Female', [551] 'native-country-region.10th', [552] 'native-country-region.Other-service', [553] 'native-country-region.Not-in-family', [554] 'native-country-region.Unmarried', [555] 'native-country-region.Self-emp-not-inc', [556] 'native-country-region.Prof-school', [557] 'native-country-region.Prof-specialty', [558] 'native-country-region.7th-8th', [559] 'native-country-region.Craft-repair' + [560] 'native-country-region.Federal-gov', [561] 'native-country-region.Bachelors', [562] 'native-country-region.Adm-clerical', [563] 'native-country-region.Masters', [564] 'native-country-region.Exec-managerial', [565] 'native-country-region.State-gov', [566] 'native-country-region.Wife', [567] 'native-country-region.Widowed', [568] 'native-country-region.Doctorate', [569] 'native-country-region.Asian-Pac-Islander' + [570] 'native-country-region.Tech-support', [571] 'native-country-region.Divorced', [572] 'native-country-region.Peru', [573] 'native-country-region.Separated', [574] 'native-country-region.Sales', [575] 'native-country-region.5th-6th', [576] 'native-country-region.Priv-house-serv', [577] 'native-country-region.Guatemala', [578] 'native-country-region.Self-emp-inc', [579] 'native-country-region.Assoc-voc' + [580] 'native-country-region.Mexico', [581] 'native-country-region.Transport-moving', [582] 'native-country-region.Handlers-cleaners', [583] 'native-country-region.9th', [584] 'native-country-region.Married-spouse-absent', [585] 'native-country-region.Other', [586] 'native-country-region.Dominican-Republic', [587] 'native-country-region.Armed-Forces', [588] 'native-country-region.Amer-Indian-Inuit', [589] 'native-country-region.Ireland' + [590] 'native-country-region.Germany', [591] 'native-country-region.12th', [592] 'native-country-region.Other-relative', [593] 'native-country-region.Philippines', [594] 'native-country-region.Thailand', [595] 'native-country-region.Haiti', [596] 'native-country-region.El-Salvador', [597] 'native-country-region.Puerto-Rico', [598] 'native-country-region.Vietnam', [599] 'native-country-region.1st-4th' + [600] 'native-country-region.South', [601] 'native-country-region.Married-AF-spouse', [602] 'native-country-region.Columbia', [603] 'native-country-region.Japan', [604] 'native-country-region.India', [605] 'native-country-region.Cambodia', [606] 'native-country-region.Poland', [607] 'native-country-region.Laos' + Features: Vec + Metadata 'CategoricalSlotRanges': Vec: Length=16, Count=16 + [0] '6', [1] '81', [2] '82', [3] '157', [4] '158', [5] '233', [6] '234', [7] '309', [8] '310', [9] '385' + [10] '386', [11] '461', [12] '462', [13] '537', [14] '538', [15] '613' + Metadata 'SlotNames': Vec: Length=614, Count=614 + [0] 'NumFeatures.age', [1] 'NumFeatures.fnlwgt', [2] 'NumFeatures.education-num', [3] 'NumFeatures.capital-gain', [4] 'NumFeatures.capital-loss', [5] 'NumFeatures.hours-per-week', [6] 'CatFeatures.Workclass.Private', [7] 'CatFeatures.Workclass.11th', [8] 'CatFeatures.Workclass.Never-married', [9] 'CatFeatures.Workclass.Machine-op-inspct' + [10] 'CatFeatures.Workclass.Own-child', [11] 'CatFeatures.Workclass.Black', [12] 'CatFeatures.Workclass.Male', [13] 'CatFeatures.Workclass.United-States', [14] 'CatFeatures.Workclass.HS-grad', [15] 'CatFeatures.Workclass.Married-civ-spouse', [16] 'CatFeatures.Workclass.Farming-fishing', [17] 'CatFeatures.Workclass.Husband', [18] 'CatFeatures.Workclass.White', [19] 'CatFeatures.Workclass.Local-gov' + [20] 'CatFeatures.Workclass.Assoc-acdm', [21] 'CatFeatures.Workclass.Protective-serv', [22] 'CatFeatures.Workclass.Some-college', [23] 'CatFeatures.Workclass.?', [24] 'CatFeatures.Workclass.Female', [25] 'CatFeatures.Workclass.10th', [26] 'CatFeatures.Workclass.Other-service', [27] 'CatFeatures.Workclass.Not-in-family', [28] 'CatFeatures.Workclass.Unmarried', [29] 'CatFeatures.Workclass.Self-emp-not-inc' + [30] 'CatFeatures.Workclass.Prof-school', [31] 'CatFeatures.Workclass.Prof-specialty', [32] 'CatFeatures.Workclass.7th-8th', [33] 'CatFeatures.Workclass.Craft-repair', [34] 'CatFeatures.Workclass.Federal-gov', [35] 'CatFeatures.Workclass.Bachelors', [36] 'CatFeatures.Workclass.Adm-clerical', [37] 'CatFeatures.Workclass.Masters', [38] 'CatFeatures.Workclass.Exec-managerial', [39] 'CatFeatures.Workclass.State-gov' + [40] 'CatFeatures.Workclass.Wife', [41] 'CatFeatures.Workclass.Widowed', [42] 'CatFeatures.Workclass.Doctorate', [43] 'CatFeatures.Workclass.Asian-Pac-Islander', [44] 'CatFeatures.Workclass.Tech-support', [45] 'CatFeatures.Workclass.Divorced', [46] 'CatFeatures.Workclass.Peru', [47] 'CatFeatures.Workclass.Separated', [48] 'CatFeatures.Workclass.Sales', [49] 'CatFeatures.Workclass.5th-6th' + [50] 'CatFeatures.Workclass.Priv-house-serv', [51] 'CatFeatures.Workclass.Guatemala', [52] 'CatFeatures.Workclass.Self-emp-inc', [53] 'CatFeatures.Workclass.Assoc-voc', [54] 'CatFeatures.Workclass.Mexico', [55] 'CatFeatures.Workclass.Transport-moving', [56] 'CatFeatures.Workclass.Handlers-cleaners', [57] 'CatFeatures.Workclass.9th', [58] 'CatFeatures.Workclass.Married-spouse-absent', [59] 'CatFeatures.Workclass.Other' + [60] 'CatFeatures.Workclass.Dominican-Republic', [61] 'CatFeatures.Workclass.Armed-Forces', [62] 'CatFeatures.Workclass.Amer-Indian-Inuit', [63] 'CatFeatures.Workclass.Ireland', [64] 'CatFeatures.Workclass.Germany', [65] 'CatFeatures.Workclass.12th', [66] 'CatFeatures.Workclass.Other-relative', [67] 'CatFeatures.Workclass.Philippines', [68] 'CatFeatures.Workclass.Thailand', [69] 'CatFeatures.Workclass.Haiti' + [70] 'CatFeatures.Workclass.El-Salvador', [71] 'CatFeatures.Workclass.Puerto-Rico', [72] 'CatFeatures.Workclass.Vietnam', [73] 'CatFeatures.Workclass.1st-4th', [74] 'CatFeatures.Workclass.South', [75] 'CatFeatures.Workclass.Married-AF-spouse', [76] 'CatFeatures.Workclass.Columbia', [77] 'CatFeatures.Workclass.Japan', [78] 'CatFeatures.Workclass.India', [79] 'CatFeatures.Workclass.Cambodia' + [80] 'CatFeatures.Workclass.Poland', [81] 'CatFeatures.Workclass.Laos', [82] 'CatFeatures.education.Private', [83] 'CatFeatures.education.11th', [84] 'CatFeatures.education.Never-married', [85] 'CatFeatures.education.Machine-op-inspct', [86] 'CatFeatures.education.Own-child', [87] 'CatFeatures.education.Black', [88] 'CatFeatures.education.Male', [89] 'CatFeatures.education.United-States' + [90] 'CatFeatures.education.HS-grad', [91] 'CatFeatures.education.Married-civ-spouse', [92] 'CatFeatures.education.Farming-fishing', [93] 'CatFeatures.education.Husband', [94] 'CatFeatures.education.White', [95] 'CatFeatures.education.Local-gov', [96] 'CatFeatures.education.Assoc-acdm', [97] 'CatFeatures.education.Protective-serv', [98] 'CatFeatures.education.Some-college', [99] 'CatFeatures.education.?' + [100] 'CatFeatures.education.Female', [101] 'CatFeatures.education.10th', [102] 'CatFeatures.education.Other-service', [103] 'CatFeatures.education.Not-in-family', [104] 'CatFeatures.education.Unmarried', [105] 'CatFeatures.education.Self-emp-not-inc', [106] 'CatFeatures.education.Prof-school', [107] 'CatFeatures.education.Prof-specialty', [108] 'CatFeatures.education.7th-8th', [109] 'CatFeatures.education.Craft-repair' + [110] 'CatFeatures.education.Federal-gov', [111] 'CatFeatures.education.Bachelors', [112] 'CatFeatures.education.Adm-clerical', [113] 'CatFeatures.education.Masters', [114] 'CatFeatures.education.Exec-managerial', [115] 'CatFeatures.education.State-gov', [116] 'CatFeatures.education.Wife', [117] 'CatFeatures.education.Widowed', [118] 'CatFeatures.education.Doctorate', [119] 'CatFeatures.education.Asian-Pac-Islander' + [120] 'CatFeatures.education.Tech-support', [121] 'CatFeatures.education.Divorced', [122] 'CatFeatures.education.Peru', [123] 'CatFeatures.education.Separated', [124] 'CatFeatures.education.Sales', [125] 'CatFeatures.education.5th-6th', [126] 'CatFeatures.education.Priv-house-serv', [127] 'CatFeatures.education.Guatemala', [128] 'CatFeatures.education.Self-emp-inc', [129] 'CatFeatures.education.Assoc-voc' + [130] 'CatFeatures.education.Mexico', [131] 'CatFeatures.education.Transport-moving', [132] 'CatFeatures.education.Handlers-cleaners', [133] 'CatFeatures.education.9th', [134] 'CatFeatures.education.Married-spouse-absent', [135] 'CatFeatures.education.Other', [136] 'CatFeatures.education.Dominican-Republic', [137] 'CatFeatures.education.Armed-Forces', [138] 'CatFeatures.education.Amer-Indian-Inuit', [139] 'CatFeatures.education.Ireland' + [140] 'CatFeatures.education.Germany', [141] 'CatFeatures.education.12th', [142] 'CatFeatures.education.Other-relative', [143] 'CatFeatures.education.Philippines', [144] 'CatFeatures.education.Thailand', [145] 'CatFeatures.education.Haiti', [146] 'CatFeatures.education.El-Salvador', [147] 'CatFeatures.education.Puerto-Rico', [148] 'CatFeatures.education.Vietnam', [149] 'CatFeatures.education.1st-4th' + [150] 'CatFeatures.education.South', [151] 'CatFeatures.education.Married-AF-spouse', [152] 'CatFeatures.education.Columbia', [153] 'CatFeatures.education.Japan', [154] 'CatFeatures.education.India', [155] 'CatFeatures.education.Cambodia', [156] 'CatFeatures.education.Poland', [157] 'CatFeatures.education.Laos', [158] 'CatFeatures.marital-status.Private', [159] 'CatFeatures.marital-status.11th' + [160] 'CatFeatures.marital-status.Never-married', [161] 'CatFeatures.marital-status.Machine-op-inspct', [162] 'CatFeatures.marital-status.Own-child', [163] 'CatFeatures.marital-status.Black', [164] 'CatFeatures.marital-status.Male', [165] 'CatFeatures.marital-status.United-States', [166] 'CatFeatures.marital-status.HS-grad', [167] 'CatFeatures.marital-status.Married-civ-spouse', [168] 'CatFeatures.marital-status.Farming-fishing', [169] 'CatFeatures.marital-status.Husband' + [170] 'CatFeatures.marital-status.White', [171] 'CatFeatures.marital-status.Local-gov', [172] 'CatFeatures.marital-status.Assoc-acdm', [173] 'CatFeatures.marital-status.Protective-serv', [174] 'CatFeatures.marital-status.Some-college', [175] 'CatFeatures.marital-status.?', [176] 'CatFeatures.marital-status.Female', [177] 'CatFeatures.marital-status.10th', [178] 'CatFeatures.marital-status.Other-service', [179] 'CatFeatures.marital-status.Not-in-family' + [180] 'CatFeatures.marital-status.Unmarried', [181] 'CatFeatures.marital-status.Self-emp-not-inc', [182] 'CatFeatures.marital-status.Prof-school', [183] 'CatFeatures.marital-status.Prof-specialty', [184] 'CatFeatures.marital-status.7th-8th', [185] 'CatFeatures.marital-status.Craft-repair', [186] 'CatFeatures.marital-status.Federal-gov', [187] 'CatFeatures.marital-status.Bachelors', [188] 'CatFeatures.marital-status.Adm-clerical', [189] 'CatFeatures.marital-status.Masters' + [190] 'CatFeatures.marital-status.Exec-managerial', [191] 'CatFeatures.marital-status.State-gov', [192] 'CatFeatures.marital-status.Wife', [193] 'CatFeatures.marital-status.Widowed', [194] 'CatFeatures.marital-status.Doctorate', [195] 'CatFeatures.marital-status.Asian-Pac-Islander', [196] 'CatFeatures.marital-status.Tech-support', [197] 'CatFeatures.marital-status.Divorced', [198] 'CatFeatures.marital-status.Peru', [199] 'CatFeatures.marital-status.Separated' + [200] 'CatFeatures.marital-status.Sales', [201] 'CatFeatures.marital-status.5th-6th', [202] 'CatFeatures.marital-status.Priv-house-serv', [203] 'CatFeatures.marital-status.Guatemala', [204] 'CatFeatures.marital-status.Self-emp-inc', [205] 'CatFeatures.marital-status.Assoc-voc', [206] 'CatFeatures.marital-status.Mexico', [207] 'CatFeatures.marital-status.Transport-moving', [208] 'CatFeatures.marital-status.Handlers-cleaners', [209] 'CatFeatures.marital-status.9th' + [210] 'CatFeatures.marital-status.Married-spouse-absent', [211] 'CatFeatures.marital-status.Other', [212] 'CatFeatures.marital-status.Dominican-Republic', [213] 'CatFeatures.marital-status.Armed-Forces', [214] 'CatFeatures.marital-status.Amer-Indian-Inuit', [215] 'CatFeatures.marital-status.Ireland', [216] 'CatFeatures.marital-status.Germany', [217] 'CatFeatures.marital-status.12th', [218] 'CatFeatures.marital-status.Other-relative', [219] 'CatFeatures.marital-status.Philippines' + [220] 'CatFeatures.marital-status.Thailand', [221] 'CatFeatures.marital-status.Haiti', [222] 'CatFeatures.marital-status.El-Salvador', [223] 'CatFeatures.marital-status.Puerto-Rico', [224] 'CatFeatures.marital-status.Vietnam', [225] 'CatFeatures.marital-status.1st-4th', [226] 'CatFeatures.marital-status.South', [227] 'CatFeatures.marital-status.Married-AF-spouse', [228] 'CatFeatures.marital-status.Columbia', [229] 'CatFeatures.marital-status.Japan' + [230] 'CatFeatures.marital-status.India', [231] 'CatFeatures.marital-status.Cambodia', [232] 'CatFeatures.marital-status.Poland', [233] 'CatFeatures.marital-status.Laos', [234] 'CatFeatures.occupation.Private', [235] 'CatFeatures.occupation.11th', [236] 'CatFeatures.occupation.Never-married', [237] 'CatFeatures.occupation.Machine-op-inspct', [238] 'CatFeatures.occupation.Own-child', [239] 'CatFeatures.occupation.Black' + [240] 'CatFeatures.occupation.Male', [241] 'CatFeatures.occupation.United-States', [242] 'CatFeatures.occupation.HS-grad', [243] 'CatFeatures.occupation.Married-civ-spouse', [244] 'CatFeatures.occupation.Farming-fishing', [245] 'CatFeatures.occupation.Husband', [246] 'CatFeatures.occupation.White', [247] 'CatFeatures.occupation.Local-gov', [248] 'CatFeatures.occupation.Assoc-acdm', [249] 'CatFeatures.occupation.Protective-serv' + [250] 'CatFeatures.occupation.Some-college', [251] 'CatFeatures.occupation.?', [252] 'CatFeatures.occupation.Female', [253] 'CatFeatures.occupation.10th', [254] 'CatFeatures.occupation.Other-service', [255] 'CatFeatures.occupation.Not-in-family', [256] 'CatFeatures.occupation.Unmarried', [257] 'CatFeatures.occupation.Self-emp-not-inc', [258] 'CatFeatures.occupation.Prof-school', [259] 'CatFeatures.occupation.Prof-specialty' + [260] 'CatFeatures.occupation.7th-8th', [261] 'CatFeatures.occupation.Craft-repair', [262] 'CatFeatures.occupation.Federal-gov', [263] 'CatFeatures.occupation.Bachelors', [264] 'CatFeatures.occupation.Adm-clerical', [265] 'CatFeatures.occupation.Masters', [266] 'CatFeatures.occupation.Exec-managerial', [267] 'CatFeatures.occupation.State-gov', [268] 'CatFeatures.occupation.Wife', [269] 'CatFeatures.occupation.Widowed' + [270] 'CatFeatures.occupation.Doctorate', [271] 'CatFeatures.occupation.Asian-Pac-Islander', [272] 'CatFeatures.occupation.Tech-support', [273] 'CatFeatures.occupation.Divorced', [274] 'CatFeatures.occupation.Peru', [275] 'CatFeatures.occupation.Separated', [276] 'CatFeatures.occupation.Sales', [277] 'CatFeatures.occupation.5th-6th', [278] 'CatFeatures.occupation.Priv-house-serv', [279] 'CatFeatures.occupation.Guatemala' + [280] 'CatFeatures.occupation.Self-emp-inc', [281] 'CatFeatures.occupation.Assoc-voc', [282] 'CatFeatures.occupation.Mexico', [283] 'CatFeatures.occupation.Transport-moving', [284] 'CatFeatures.occupation.Handlers-cleaners', [285] 'CatFeatures.occupation.9th', [286] 'CatFeatures.occupation.Married-spouse-absent', [287] 'CatFeatures.occupation.Other', [288] 'CatFeatures.occupation.Dominican-Republic', [289] 'CatFeatures.occupation.Armed-Forces' + [290] 'CatFeatures.occupation.Amer-Indian-Inuit', [291] 'CatFeatures.occupation.Ireland', [292] 'CatFeatures.occupation.Germany', [293] 'CatFeatures.occupation.12th', [294] 'CatFeatures.occupation.Other-relative', [295] 'CatFeatures.occupation.Philippines', [296] 'CatFeatures.occupation.Thailand', [297] 'CatFeatures.occupation.Haiti', [298] 'CatFeatures.occupation.El-Salvador', [299] 'CatFeatures.occupation.Puerto-Rico' + [300] 'CatFeatures.occupation.Vietnam', [301] 'CatFeatures.occupation.1st-4th', [302] 'CatFeatures.occupation.South', [303] 'CatFeatures.occupation.Married-AF-spouse', [304] 'CatFeatures.occupation.Columbia', [305] 'CatFeatures.occupation.Japan', [306] 'CatFeatures.occupation.India', [307] 'CatFeatures.occupation.Cambodia', [308] 'CatFeatures.occupation.Poland', [309] 'CatFeatures.occupation.Laos' + [310] 'CatFeatures.relationship.Private', [311] 'CatFeatures.relationship.11th', [312] 'CatFeatures.relationship.Never-married', [313] 'CatFeatures.relationship.Machine-op-inspct', [314] 'CatFeatures.relationship.Own-child', [315] 'CatFeatures.relationship.Black', [316] 'CatFeatures.relationship.Male', [317] 'CatFeatures.relationship.United-States', [318] 'CatFeatures.relationship.HS-grad', [319] 'CatFeatures.relationship.Married-civ-spouse' + [320] 'CatFeatures.relationship.Farming-fishing', [321] 'CatFeatures.relationship.Husband', [322] 'CatFeatures.relationship.White', [323] 'CatFeatures.relationship.Local-gov', [324] 'CatFeatures.relationship.Assoc-acdm', [325] 'CatFeatures.relationship.Protective-serv', [326] 'CatFeatures.relationship.Some-college', [327] 'CatFeatures.relationship.?', [328] 'CatFeatures.relationship.Female', [329] 'CatFeatures.relationship.10th' + [330] 'CatFeatures.relationship.Other-service', [331] 'CatFeatures.relationship.Not-in-family', [332] 'CatFeatures.relationship.Unmarried', [333] 'CatFeatures.relationship.Self-emp-not-inc', [334] 'CatFeatures.relationship.Prof-school', [335] 'CatFeatures.relationship.Prof-specialty', [336] 'CatFeatures.relationship.7th-8th', [337] 'CatFeatures.relationship.Craft-repair', [338] 'CatFeatures.relationship.Federal-gov', [339] 'CatFeatures.relationship.Bachelors' + [340] 'CatFeatures.relationship.Adm-clerical', [341] 'CatFeatures.relationship.Masters', [342] 'CatFeatures.relationship.Exec-managerial', [343] 'CatFeatures.relationship.State-gov', [344] 'CatFeatures.relationship.Wife', [345] 'CatFeatures.relationship.Widowed', [346] 'CatFeatures.relationship.Doctorate', [347] 'CatFeatures.relationship.Asian-Pac-Islander', [348] 'CatFeatures.relationship.Tech-support', [349] 'CatFeatures.relationship.Divorced' + [350] 'CatFeatures.relationship.Peru', [351] 'CatFeatures.relationship.Separated', [352] 'CatFeatures.relationship.Sales', [353] 'CatFeatures.relationship.5th-6th', [354] 'CatFeatures.relationship.Priv-house-serv', [355] 'CatFeatures.relationship.Guatemala', [356] 'CatFeatures.relationship.Self-emp-inc', [357] 'CatFeatures.relationship.Assoc-voc', [358] 'CatFeatures.relationship.Mexico', [359] 'CatFeatures.relationship.Transport-moving' + [360] 'CatFeatures.relationship.Handlers-cleaners', [361] 'CatFeatures.relationship.9th', [362] 'CatFeatures.relationship.Married-spouse-absent', [363] 'CatFeatures.relationship.Other', [364] 'CatFeatures.relationship.Dominican-Republic', [365] 'CatFeatures.relationship.Armed-Forces', [366] 'CatFeatures.relationship.Amer-Indian-Inuit', [367] 'CatFeatures.relationship.Ireland', [368] 'CatFeatures.relationship.Germany', [369] 'CatFeatures.relationship.12th' + [370] 'CatFeatures.relationship.Other-relative', [371] 'CatFeatures.relationship.Philippines', [372] 'CatFeatures.relationship.Thailand', [373] 'CatFeatures.relationship.Haiti', [374] 'CatFeatures.relationship.El-Salvador', [375] 'CatFeatures.relationship.Puerto-Rico', [376] 'CatFeatures.relationship.Vietnam', [377] 'CatFeatures.relationship.1st-4th', [378] 'CatFeatures.relationship.South', [379] 'CatFeatures.relationship.Married-AF-spouse' + [380] 'CatFeatures.relationship.Columbia', [381] 'CatFeatures.relationship.Japan', [382] 'CatFeatures.relationship.India', [383] 'CatFeatures.relationship.Cambodia', [384] 'CatFeatures.relationship.Poland', [385] 'CatFeatures.relationship.Laos', [386] 'CatFeatures.ethnicity.Private', [387] 'CatFeatures.ethnicity.11th', [388] 'CatFeatures.ethnicity.Never-married', [389] 'CatFeatures.ethnicity.Machine-op-inspct' + [390] 'CatFeatures.ethnicity.Own-child', [391] 'CatFeatures.ethnicity.Black', [392] 'CatFeatures.ethnicity.Male', [393] 'CatFeatures.ethnicity.United-States', [394] 'CatFeatures.ethnicity.HS-grad', [395] 'CatFeatures.ethnicity.Married-civ-spouse', [396] 'CatFeatures.ethnicity.Farming-fishing', [397] 'CatFeatures.ethnicity.Husband', [398] 'CatFeatures.ethnicity.White', [399] 'CatFeatures.ethnicity.Local-gov' + [400] 'CatFeatures.ethnicity.Assoc-acdm', [401] 'CatFeatures.ethnicity.Protective-serv', [402] 'CatFeatures.ethnicity.Some-college', [403] 'CatFeatures.ethnicity.?', [404] 'CatFeatures.ethnicity.Female', [405] 'CatFeatures.ethnicity.10th', [406] 'CatFeatures.ethnicity.Other-service', [407] 'CatFeatures.ethnicity.Not-in-family', [408] 'CatFeatures.ethnicity.Unmarried', [409] 'CatFeatures.ethnicity.Self-emp-not-inc' + [410] 'CatFeatures.ethnicity.Prof-school', [411] 'CatFeatures.ethnicity.Prof-specialty', [412] 'CatFeatures.ethnicity.7th-8th', [413] 'CatFeatures.ethnicity.Craft-repair', [414] 'CatFeatures.ethnicity.Federal-gov', [415] 'CatFeatures.ethnicity.Bachelors', [416] 'CatFeatures.ethnicity.Adm-clerical', [417] 'CatFeatures.ethnicity.Masters', [418] 'CatFeatures.ethnicity.Exec-managerial', [419] 'CatFeatures.ethnicity.State-gov' + [420] 'CatFeatures.ethnicity.Wife', [421] 'CatFeatures.ethnicity.Widowed', [422] 'CatFeatures.ethnicity.Doctorate', [423] 'CatFeatures.ethnicity.Asian-Pac-Islander', [424] 'CatFeatures.ethnicity.Tech-support', [425] 'CatFeatures.ethnicity.Divorced', [426] 'CatFeatures.ethnicity.Peru', [427] 'CatFeatures.ethnicity.Separated', [428] 'CatFeatures.ethnicity.Sales', [429] 'CatFeatures.ethnicity.5th-6th' + [430] 'CatFeatures.ethnicity.Priv-house-serv', [431] 'CatFeatures.ethnicity.Guatemala', [432] 'CatFeatures.ethnicity.Self-emp-inc', [433] 'CatFeatures.ethnicity.Assoc-voc', [434] 'CatFeatures.ethnicity.Mexico', [435] 'CatFeatures.ethnicity.Transport-moving', [436] 'CatFeatures.ethnicity.Handlers-cleaners', [437] 'CatFeatures.ethnicity.9th', [438] 'CatFeatures.ethnicity.Married-spouse-absent', [439] 'CatFeatures.ethnicity.Other' + [440] 'CatFeatures.ethnicity.Dominican-Republic', [441] 'CatFeatures.ethnicity.Armed-Forces', [442] 'CatFeatures.ethnicity.Amer-Indian-Inuit', [443] 'CatFeatures.ethnicity.Ireland', [444] 'CatFeatures.ethnicity.Germany', [445] 'CatFeatures.ethnicity.12th', [446] 'CatFeatures.ethnicity.Other-relative', [447] 'CatFeatures.ethnicity.Philippines', [448] 'CatFeatures.ethnicity.Thailand', [449] 'CatFeatures.ethnicity.Haiti' + [450] 'CatFeatures.ethnicity.El-Salvador', [451] 'CatFeatures.ethnicity.Puerto-Rico', [452] 'CatFeatures.ethnicity.Vietnam', [453] 'CatFeatures.ethnicity.1st-4th', [454] 'CatFeatures.ethnicity.South', [455] 'CatFeatures.ethnicity.Married-AF-spouse', [456] 'CatFeatures.ethnicity.Columbia', [457] 'CatFeatures.ethnicity.Japan', [458] 'CatFeatures.ethnicity.India', [459] 'CatFeatures.ethnicity.Cambodia' + [460] 'CatFeatures.ethnicity.Poland', [461] 'CatFeatures.ethnicity.Laos', [462] 'CatFeatures.sex.Private', [463] 'CatFeatures.sex.11th', [464] 'CatFeatures.sex.Never-married', [465] 'CatFeatures.sex.Machine-op-inspct', [466] 'CatFeatures.sex.Own-child', [467] 'CatFeatures.sex.Black', [468] 'CatFeatures.sex.Male', [469] 'CatFeatures.sex.United-States' + [470] 'CatFeatures.sex.HS-grad', [471] 'CatFeatures.sex.Married-civ-spouse', [472] 'CatFeatures.sex.Farming-fishing', [473] 'CatFeatures.sex.Husband', [474] 'CatFeatures.sex.White', [475] 'CatFeatures.sex.Local-gov', [476] 'CatFeatures.sex.Assoc-acdm', [477] 'CatFeatures.sex.Protective-serv', [478] 'CatFeatures.sex.Some-college', [479] 'CatFeatures.sex.?' + [480] 'CatFeatures.sex.Female', [481] 'CatFeatures.sex.10th', [482] 'CatFeatures.sex.Other-service', [483] 'CatFeatures.sex.Not-in-family', [484] 'CatFeatures.sex.Unmarried', [485] 'CatFeatures.sex.Self-emp-not-inc', [486] 'CatFeatures.sex.Prof-school', [487] 'CatFeatures.sex.Prof-specialty', [488] 'CatFeatures.sex.7th-8th', [489] 'CatFeatures.sex.Craft-repair' + [490] 'CatFeatures.sex.Federal-gov', [491] 'CatFeatures.sex.Bachelors', [492] 'CatFeatures.sex.Adm-clerical', [493] 'CatFeatures.sex.Masters', [494] 'CatFeatures.sex.Exec-managerial', [495] 'CatFeatures.sex.State-gov', [496] 'CatFeatures.sex.Wife', [497] 'CatFeatures.sex.Widowed', [498] 'CatFeatures.sex.Doctorate', [499] 'CatFeatures.sex.Asian-Pac-Islander' + [500] 'CatFeatures.sex.Tech-support', [501] 'CatFeatures.sex.Divorced', [502] 'CatFeatures.sex.Peru', [503] 'CatFeatures.sex.Separated', [504] 'CatFeatures.sex.Sales', [505] 'CatFeatures.sex.5th-6th', [506] 'CatFeatures.sex.Priv-house-serv', [507] 'CatFeatures.sex.Guatemala', [508] 'CatFeatures.sex.Self-emp-inc', [509] 'CatFeatures.sex.Assoc-voc' + [510] 'CatFeatures.sex.Mexico', [511] 'CatFeatures.sex.Transport-moving', [512] 'CatFeatures.sex.Handlers-cleaners', [513] 'CatFeatures.sex.9th', [514] 'CatFeatures.sex.Married-spouse-absent', [515] 'CatFeatures.sex.Other', [516] 'CatFeatures.sex.Dominican-Republic', [517] 'CatFeatures.sex.Armed-Forces', [518] 'CatFeatures.sex.Amer-Indian-Inuit', [519] 'CatFeatures.sex.Ireland' + [520] 'CatFeatures.sex.Germany', [521] 'CatFeatures.sex.12th', [522] 'CatFeatures.sex.Other-relative', [523] 'CatFeatures.sex.Philippines', [524] 'CatFeatures.sex.Thailand', [525] 'CatFeatures.sex.Haiti', [526] 'CatFeatures.sex.El-Salvador', [527] 'CatFeatures.sex.Puerto-Rico', [528] 'CatFeatures.sex.Vietnam', [529] 'CatFeatures.sex.1st-4th' + [530] 'CatFeatures.sex.South', [531] 'CatFeatures.sex.Married-AF-spouse', [532] 'CatFeatures.sex.Columbia', [533] 'CatFeatures.sex.Japan', [534] 'CatFeatures.sex.India', [535] 'CatFeatures.sex.Cambodia', [536] 'CatFeatures.sex.Poland', [537] 'CatFeatures.sex.Laos', [538] 'CatFeatures.native-country-region.Private', [539] 'CatFeatures.native-country-region.11th' + [540] 'CatFeatures.native-country-region.Never-married', [541] 'CatFeatures.native-country-region.Machine-op-inspct', [542] 'CatFeatures.native-country-region.Own-child', [543] 'CatFeatures.native-country-region.Black', [544] 'CatFeatures.native-country-region.Male', [545] 'CatFeatures.native-country-region.United-States', [546] 'CatFeatures.native-country-region.HS-grad', [547] 'CatFeatures.native-country-region.Married-civ-spouse', [548] 'CatFeatures.native-country-region.Farming-fishing', [549] 'CatFeatures.native-country-region.Husband' + [550] 'CatFeatures.native-country-region.White', [551] 'CatFeatures.native-country-region.Local-gov', [552] 'CatFeatures.native-country-region.Assoc-acdm', [553] 'CatFeatures.native-country-region.Protective-serv', [554] 'CatFeatures.native-country-region.Some-college', [555] 'CatFeatures.native-country-region.?', [556] 'CatFeatures.native-country-region.Female', [557] 'CatFeatures.native-country-region.10th', [558] 'CatFeatures.native-country-region.Other-service', [559] 'CatFeatures.native-country-region.Not-in-family' + [560] 'CatFeatures.native-country-region.Unmarried', [561] 'CatFeatures.native-country-region.Self-emp-not-inc', [562] 'CatFeatures.native-country-region.Prof-school', [563] 'CatFeatures.native-country-region.Prof-specialty', [564] 'CatFeatures.native-country-region.7th-8th', [565] 'CatFeatures.native-country-region.Craft-repair', [566] 'CatFeatures.native-country-region.Federal-gov', [567] 'CatFeatures.native-country-region.Bachelors', [568] 'CatFeatures.native-country-region.Adm-clerical', [569] 'CatFeatures.native-country-region.Masters' + [570] 'CatFeatures.native-country-region.Exec-managerial', [571] 'CatFeatures.native-country-region.State-gov', [572] 'CatFeatures.native-country-region.Wife', [573] 'CatFeatures.native-country-region.Widowed', [574] 'CatFeatures.native-country-region.Doctorate', [575] 'CatFeatures.native-country-region.Asian-Pac-Islander', [576] 'CatFeatures.native-country-region.Tech-support', [577] 'CatFeatures.native-country-region.Divorced', [578] 'CatFeatures.native-country-region.Peru', [579] 'CatFeatures.native-country-region.Separated' + [580] 'CatFeatures.native-country-region.Sales', [581] 'CatFeatures.native-country-region.5th-6th', [582] 'CatFeatures.native-country-region.Priv-house-serv', [583] 'CatFeatures.native-country-region.Guatemala', [584] 'CatFeatures.native-country-region.Self-emp-inc', [585] 'CatFeatures.native-country-region.Assoc-voc', [586] 'CatFeatures.native-country-region.Mexico', [587] 'CatFeatures.native-country-region.Transport-moving', [588] 'CatFeatures.native-country-region.Handlers-cleaners', [589] 'CatFeatures.native-country-region.9th' + [590] 'CatFeatures.native-country-region.Married-spouse-absent', [591] 'CatFeatures.native-country-region.Other', [592] 'CatFeatures.native-country-region.Dominican-Republic', [593] 'CatFeatures.native-country-region.Armed-Forces', [594] 'CatFeatures.native-country-region.Amer-Indian-Inuit', [595] 'CatFeatures.native-country-region.Ireland', [596] 'CatFeatures.native-country-region.Germany', [597] 'CatFeatures.native-country-region.12th', [598] 'CatFeatures.native-country-region.Other-relative', [599] 'CatFeatures.native-country-region.Philippines' + [600] 'CatFeatures.native-country-region.Thailand', [601] 'CatFeatures.native-country-region.Haiti', [602] 'CatFeatures.native-country-region.El-Salvador', [603] 'CatFeatures.native-country-region.Puerto-Rico', [604] 'CatFeatures.native-country-region.Vietnam', [605] 'CatFeatures.native-country-region.1st-4th', [606] 'CatFeatures.native-country-region.South', [607] 'CatFeatures.native-country-region.Married-AF-spouse', [608] 'CatFeatures.native-country-region.Columbia', [609] 'CatFeatures.native-country-region.Japan' + [610] 'CatFeatures.native-country-region.India', [611] 'CatFeatures.native-country-region.Cambodia', [612] 'CatFeatures.native-country-region.Poland', [613] 'CatFeatures.native-country-region.Laos' diff --git a/test/BaselineOutput/Common/Command/codegen-out.cs b/test/BaselineOutput/Common/Command/codegen-out.cs new file mode 100644 index 0000000000..052a079dad --- /dev/null +++ b/test/BaselineOutput/Common/Command/codegen-out.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using Microsoft.ML.Legacy; +using Microsoft.ML.Runtime.Api; + +namespace MLGeneratedCode +{ +public class Program +{ +/// +/// This is the input to the trained model. +/// +/// In most pipelines, not all columns that are used in training are also used in scoring. Namely, the label +/// and weight columns are almost never required at scoring time. Since we don't know which columns +/// are 'optional' in this sense, all the columns are listed below. +/// +/// You are free to remove any fields from the below class. If the fields are not required for scoring, the model +/// will continue to work. Otherwise, the exception will be thrown when a prediction engine is created. +/// +/// +public class InputData +{ + public Single Label; + + [VectorType(5)] + [ColumnName("F!1")] + public Single[] Column1 = new Single[5]; + + [VectorType(4)] + public Single[] F2 = new Single[4]; +} + +/// +/// This is the output of the scored model, the prediction. +/// +/// +public class ScoredOutput +{ + public Boolean PredictedLabel; + + public Single Score; + + public Single Probability; + + // These are all remaining available columns, either supplied as the input, or intermediate + // columns generated by the transforms. Materializing these columns has a performance cost, + // so they are commented out. Feel free to uncomment any column that is useful for your scenario. +#if false + public Single Label; + + [VectorType(5)] + [ColumnName("F!1")] + public Single[] Column1; + + [VectorType(4)] + public Single[] F2; + + [VectorType(9)] + public Single[] Features; +#endif +} + +/*public static void Main(string[] args) +{ +string modelPath; +modelPath = "model.zip"; +PredictAsync(modelPath); +}*/ + +/// +/// This method demonstrates how to run prediction. +/// +/// +public static async void PredictAsync(string modelPath) +{ + var model = await PredictionModel.ReadAsync(modelPath); + + var inputData = new InputData(); + // TODO: populate the example's features. + + var score = model.Predict(inputData); + // TODO: consume the resulting score. + + var scores = model.Predict(new List { inputData, inputData }); + // TODO: consume the resulting scores. + } +} +} diff --git a/test/Microsoft.ML.Predictor.Tests/TestParallelFasttreeInterface.cs b/test/Microsoft.ML.Predictor.Tests/TestParallelFasttreeInterface.cs index 280451fd2b..ef45fd8bfa 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestParallelFasttreeInterface.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestParallelFasttreeInterface.cs @@ -173,7 +173,7 @@ public TestParallelFasttreeInterface(ITestOutputHelper helper) { } - [Fact] + [Fact(Skip = "'checker' is not a valid value for the 'parag' argument in FastTree")] [TestCategory("ParallelFasttree")] public void CheckFastTreeParallelInterface() { @@ -185,7 +185,8 @@ public void CheckFastTreeParallelInterface() var trainArgs = string.Format( "train data={{{0}}} loader=Text{{col=Label:0 col=F!1:1-5 col=F2:6-9}} xf=Concat{{col=Features:F!1,F2}} tr=FastTreeBinaryClassification{{lr=0.1 nl=12 mil=10 iter=1 parag=checker}} out={{{1}}}", dataPath, modelOutPath); - MainForTest(trainArgs); + var res = MainForTest(trainArgs); + Assert.Equal(0, res); } } } diff --git a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs index 0a1e7ada2f..59de22b8a1 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Tools; @@ -100,6 +101,7 @@ protected override void Initialize() _env = new ConsoleEnvironment(42, outWriter: LogWriter, errWriter: LogWriter) .AddStandardComponents(); ML = new MLContext(42); + ML.AddStandardComponents(); } // This method is used by subclass to dispose of disposable objects @@ -815,10 +817,9 @@ protected static StreamReader OpenReader(string path) /// This method is used in unit tests when the output is not baselined. /// If the output is to be baselined and compared, the other overload should be used. /// - protected static int MainForTest(string args) + protected int MainForTest(string args) { - var env = new MLContext(); - return Maml.MainCore(env, args, false); + return Maml.MainCore(ML, args, false); } } diff --git a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs index d410a24995..92eb3c7aa9 100644 --- a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs +++ b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Ensemble; using Microsoft.ML.Runtime.Learners; @@ -28,6 +29,7 @@ public static TEnvironment AddStandardComponents(this TEnvironment #pragma warning disable 612 env.ComponentCatalog.RegisterAssembly(typeof(Experiment).Assembly); // ML.Legacy #pragma warning restore 612 + env.ComponentCatalog.RegisterAssembly(typeof(ComponentCreation).Assembly); // ML.Api return env; } } diff --git a/test/Microsoft.ML.TestFramework/TestCommandBase.cs b/test/Microsoft.ML.TestFramework/TestCommandBase.cs index a4593edbb1..ea70208cd6 100644 --- a/test/Microsoft.ML.TestFramework/TestCommandBase.cs +++ b/test/Microsoft.ML.TestFramework/TestCommandBase.cs @@ -672,16 +672,15 @@ public void CommandShowSchema() } [TestCategory(Cat)] - [Fact(Skip = "Need CoreTLC specific baseline update")] + [Fact] public void CommandShowSchemaModel() { - string trainDataPath = GetDataPath(@"..\UCI", "adult.test.tiny"); + string trainDataPath = GetDataPath("adult.tiny.with-schema.txt"); string modelPath = ModelPath().Path; string args = string.Format( @"train data={{{0}}} loader=Text{{ - sep=, header=+ col=NumFeatures:Num:9-14 col=CatFeaturesText:TX:0~* @@ -922,29 +921,27 @@ public void CommandCrossValidationAndSave() // multiple different FastTree (Ranking and Classification for example) instances in different threads. // FastTree internally fails if we try to run it simultaneously and if this happens we wouldn't get model file for training. [TestCategory(Cat)] - [Fact(Skip = "Need CoreTLC specific baseline update")] + [Fact] public void CommandTrainFastTreeInDifferentThreads() { - var dataPath = GetDataPath("vw.dat"); - var firstModelOutPath = CreateOutputPath("TreeTransform-model2.zip"); - var secondModelOutPath = CreateOutputPath("TreeTransform-model1.zip"); - var trainArgs = "Train tr=SDCA loader=TextLoader{sep=space col=Label:R4:0 col=Features:R4:1 col=Name:TX:2,5-17 col=Cat:TX:3 col=Cat01:TX:4}" + "xf=CategoricalTransform{col=Cat col=Cat01} xf=Concat{col=Features:Features,Cat,Cat01} xf=TreeFeat{tr=FastTreeBinaryClassification} xf=TreeFeat" + "{tr=FastTreeRanking} xf=Concat{col=Features:Features,Leaves,Paths,Trees}"; + var dataPath = GetDataPath(TestDatasets.adult.testFilename); + var firstModelOutPath = DeleteOutputPath("TreeTransform-model2.zip"); + var secondModelOutPath = DeleteOutputPath("TreeTransform-model1.zip"); + var trainArgs = $"Train tr=SDCA {TestDatasets.adult.loaderSettings} {TestDatasets.adult.mamlExtraSettings[0]} {TestDatasets.adult.mamlExtraSettings[1]}" + + " xf=TreeFeat{tr=FastTreeBinaryClassification} xf=TreeFeat{tr=FastTreeRanking} xf=Concat{col=Features:Features,Leaves,Paths,Trees}"; - var firsttrainArgs = string.Format("{0} data={1} out={2}", trainArgs, dataPath, firstModelOutPath.Path); - var secondTrainArgs = string.Format("{0} data={1} out={2}", trainArgs, dataPath, secondModelOutPath.Path); + var firsttrainArgs = $"{trainArgs} data={dataPath} out={firstModelOutPath}"; + var secondTrainArgs = $"{trainArgs} data={dataPath} out={secondModelOutPath}"; - var t = new Task[2]; - t[0] = new Task(() => { MainForTest(firsttrainArgs); }); - t[1] = new Task(() => { MainForTest(secondTrainArgs); }); + var t = new Task[2]; + t[0] = new Task(() => MainForTest(firsttrainArgs)); + t[1] = new Task(() => MainForTest(secondTrainArgs)); t[0].Start(); t[1].Start(); Task.WaitAll(t); - if (!File.Exists(firstModelOutPath.Path)) - Fail("First model doesn't exist"); - if (!File.Exists(secondModelOutPath.Path)) - Fail("Second model doesn't exist"); - Done(); + Assert.Equal(0, t[0].Result); + Assert.Equal(0, t[1].Result); } [TestCategory(Cat), TestCategory("FastTree")] @@ -2096,5 +2093,32 @@ public void Datatypes() TestCore("savedata", intermediateData.Path, "loader=binary", "saver=text", textOutputPath.Arg("dout")); Done(); } + + [Fact] + public void CommandCodeGen() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + // REVIEW: this tests that the generated output matches the baseline. This does NOT baseline + // the console output. Currently, there's no console output either, but if some is added, a baseline test + // will be in order. + + // First, train a model on breast-cancer. + var dataPath = GetDataPath("breast-cancer.txt"); + var modelOutPath = DeleteOutputPath("Command", "codegen-model.zip"); + var csOutPath = DeleteOutputPath("Command", "codegen-out.cs"); + + var trainArgs = string.Format( + "train data={{{0}}} loader=Text{{col=Label:0 col=F!1:1-5 col=F2:6-9}} xf=Concat{{col=Features:F!1,F2}} tr=lr out={{{1}}}", + dataPath, modelOutPath); + MainForTest(trainArgs); + + // Now, generate the prediction code. + MainForTest(string.Format("codegen in={{{0}}} cs={{{1}}} modelNameOverride=model.zip", modelOutPath, csOutPath)); + CheckEquality("Command", "codegen-out.cs"); + + Done(); + } } }